/* Explicitly loaded: the app intentionally does not load the global scoped-CSS bundle.
   Keep every selector local to the mail workspace. */
.mail-workspace { max-width: 1500px; margin: 0 auto; }
.mail-workspace .mail-loading { min-height: 1.5rem; margin: 0 0 .5rem; }
.mail-workspace .mail-sidebar, .mail-workspace .mail-reader { min-width: 0; }
.mail-workspace .mail-sidebar > .card { height: clamp(18rem, 45vh, 28rem); display: flex; flex-direction: column; }
.mail-workspace .mail-sidebar .card-header, .mail-workspace .mail-sidebar .card-footer { flex: 0 0 auto; }
.mail-workspace .mail-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.mail-workspace .mail-reader { height: clamp(28rem, 70vh, 52rem); overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; overflow-wrap: anywhere; }
.mail-workspace .mail-item { display: block; width: 100%; padding: 1rem; text-align: left; background: transparent; color: inherit; border: 0; border-bottom: 1px solid #e3e6ed; overflow-wrap: anywhere; }
.mail-workspace .mail-item:hover, .mail-workspace .mail-item.selected { background: #edf3ff; }
.mail-workspace .mail-item.selected { box-shadow: inset 3px 0 #2c7be5; }
.mail-workspace .mail-item:focus-visible { outline: 2px solid #2c7be5; outline-offset: -3px; }
.mail-workspace .mail-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.mail-workspace .mail-thread .card-body { max-height: 18rem; overflow-y: auto; scrollbar-gutter: stable; }
.mail-workspace .mail-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-workspace summary { cursor: pointer; }
.mail-workspace .mail-html-body { display: block; width: 100%; height: 32rem; max-height: 65vh; border: 1px solid #e3e6ed; background: white; }
.mail-workspace fieldset { min-width: 0; }
.mail-workspace .mail-preview { width: min(96vw, 1100px); height: 90vh; max-height: 95vh; padding: 0; border: 1px solid #d8e2ef; border-radius: .6rem; color: inherit; background: #fff; }
.mail-workspace .mail-preview[open] { display: flex; flex-direction: column; }
.mail-workspace .mail-preview::backdrop { background: rgb(20 35 55 / 55%); }
.mail-workspace .mail-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid #d8e2ef; }
.mail-workspace .mail-preview-header h2 { overflow-wrap: anywhere; }
.mail-workspace .mail-preview-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; padding: .5rem; }
.mail-workspace .mail-preview-controls:empty { display: none; }
.mail-workspace .mail-preview-status { padding: .5rem 1rem; margin: 0; font-size: .85rem; color: #526478; }
.mail-workspace .mail-preview-body { flex: 1; min-height: 0; overflow: auto; padding: 1rem; background: #f4f7fb; overscroll-behavior: contain; scrollbar-gutter: stable; }
.mail-workspace .mail-preview-body canvas { display: block; margin: 0 auto; background: white; }
.mail-workspace .mail-preview-body img { display: block; max-width: 100%; margin: auto; }
.mail-workspace .mail-preview-body pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; padding: 1rem 0; }
.mail-workspace .mail-preview-invoice dd { overflow-wrap: anywhere; }
@media (min-width: 992px) {
    .mail-workspace .mail-sidebar > .card, .mail-workspace .mail-reader { height: clamp(28rem, calc(100vh - 18rem), 52rem); }
}
