/* A TaikaNakka demo message drawn as an e-mail client's message view (DemoMailPreview.razor, MR 28.10.2026).
   A plain stylesheet, not scoped CSS: the public order form (/tilaus/...) does not load the scoped bundle
   AppTaikaTilaus.Web.styles.css, so App.razor and OrderForm.razor both link this file. */
.dm-mail {
    margin: 0 0 14px; border: 1px solid #d8dbe0; border-radius: 8px; background: #fff; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); font-family: "Segoe UI", Arial, Helvetica, sans-serif; color: #202124;
    text-align: left;
}

.dm-mail:last-child { margin-bottom: 0; }
.dm-mail-head { padding: 14px 18px 12px; border-bottom: 1px solid #e6e8eb; background: #f6f8fa; }
.dm-mail-subject { margin: 0 0 10px; font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.dm-mail-from { display: flex; align-items: center; gap: 12px; }

.dm-mail-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px;
    border-radius: 50%; background: #5f6b7a; color: #fff; font-weight: 700;
}

.dm-mail-meta { flex: 1; min-width: 0; font-size: 0.85rem; line-height: 1.45; overflow-wrap: anywhere; }
.dm-mail-label { display: inline-block; min-width: 92px; color: #5f6368; }
.dm-mail-time { flex: none; align-self: flex-start; color: #5f6368; font-size: 0.8rem; white-space: nowrap; }
.dm-mail-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

.dm-mail-attachment {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
    border: 1px solid #d8dbe0; border-radius: 6px; background: #fff; color: #202124; font-size: 0.82rem;
}

.dm-mail-attachment-link { color: #1a5fb4; text-decoration: none; cursor: pointer; }
.dm-mail-attachment-link:hover { border-color: #1a5fb4; background: #eef4fc; text-decoration: underline; }
.dm-mail-body { padding: 18px; }
.dm-mail-body pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 0.92rem; line-height: 1.6; color: inherit; }
.dm-mail-html { display: block; width: 100%; min-height: 24rem; border: 0; }

@media (max-width: 560px) {
    .dm-mail-from { flex-wrap: wrap; }
    .dm-mail-label { min-width: 0; margin-right: 4px; }
}
