.action-modal .modal-content { background: var(--surface, var(--bs-body-bg)); color: var(--text, var(--bs-body-color)); border-color: var(--line); }
.action-modal .modal-header { border-color: var(--line); padding: 20px 24px; }
.action-modal .modal-title { font-size: 20px; font-weight: 600; }
.action-modal .modal-body { padding: 24px; scroll-behavior: auto; }
.action-modal [data-modal-content] > .back-link,
.action-modal [data-modal-content] > .edit-heading,
.action-modal [data-modal-content] > h1,
.action-modal [data-modal-content] > .page-heading h1 { display: none; }
.action-modal [data-modal-content] .form-page { max-width: none; }
.action-modal .mail-head > h1 { display: none; } /* the modal header already carries the subject */
/* The conversation fills the dialog with white cards; a subtle body lets them read as cards. */
.action-modal .modal-body:has(.mail-head) { background: var(--surface-subtle); }
.action-modal [data-modal-content] > form.card,
.action-modal [data-modal-content] > .auth-card { padding: 0 !important; border: 0; box-shadow: none; max-width: none; margin: 0; }
.action-modal .form-actions { position: sticky; bottom: -24px; z-index: 2; background: var(--surface, var(--bs-body-bg)); padding: 16px 0; margin-top: 24px; }
.action-modal .modal-footer { padding: 0 24px; border-color: var(--line); background: var(--surface, var(--bs-body-bg)); }
.action-modal .modal-footer:empty { display: none; }
.action-modal .modal-footer .form-actions { width: 100%; position: static; border: 0; margin: 0; padding: 16px 0; }
.action-modal label { margin-top: 14px; margin-bottom: 6px; }
.action-modal [hidden], .dialog-confirm[hidden] { display: none !important; }
.dialog-confirm { padding: 24px; border-top: 1px solid var(--line); background: var(--surface, var(--bs-body-bg)); }
.dialog-confirm h3 { font-size: 18px; }
.dialog-notices { position: fixed; bottom: 20px; right: 20px; z-index: 1040; max-width: min(560px, calc(100vw - 40px)); }
.dialog-notices:empty { display: none; }
.dialog-notices .alert { margin-bottom: 8px; }
.action-modal .mail-editor .ql-editor { min-height: 230px; }
.action-modal .modal-body[aria-busy="true"]::before { content: "Loading…"; display: block; padding: 12px 0; }
@media (max-width: 575px) { .action-modal .modal-body { padding: 16px; } .action-modal .form-actions { bottom: -16px; flex-wrap: wrap; } .action-modal .modal-header { padding: 16px; } }
@media print { .action-modal, .modal-backdrop, .dialog-notices { display: none !important; } }
.file-preview { min-width: 0; }
.action-modal .file-preview > h1 { display: none; }
.preview-actions { display: flex; gap: .5rem; position: sticky; top: 0; padding: .75rem 0; background: var(--bs-body-bg); z-index: 1; }
.file-preview img, .file-preview video { display: block; max-width: 100%; max-height: 65vh; margin: 0 auto; object-fit: contain; }
.file-preview iframe { display: block; width: 100%; height: 65vh; border: 1px solid var(--bs-border-color); }
.file-preview audio { width: 100%; }
.preview-text { max-height: 65vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; border: 1px solid var(--bs-border-color); }
