/* Mail Triage (Story 3561) -- cleaning up Tony's real Gmail inbox.
   Pinned chrome: the icon band, header, status bar, tabs and rule controls never scroll;
   .mt-body is the one scroller. */

body { background: #F2F2F4; margin: 0; font-family: "Segoe UI", system-ui, sans-serif; }

.page-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#lwIconBand, .ct-header, .mt-bar, .mt-tabs, .mt-controls { flex: 0 0 auto; }
.mt-add [hidden] { display: none; }
.mt-controls[hidden] { display: none; }

.ct-header {
    background: #3C3C3C; color: #fff; padding: 10px 16px;
    display: flex; align-items: center; gap: 12px;
}
.ct-header h1 { margin: 0; font-size: 14pt; font-weight: 600; flex: 1; }
.ct-header button { color: #fff; background: transparent; border: 1px solid #6A6A6A; border-radius: 3px;
    padding: 4px 12px; font: inherit; cursor: pointer; }

/* ---- connection + run bar ---- */
.mt-bar { background: #fff; border-bottom: 1px solid #E2E2E5; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mt-status { flex: 1 1 240px; font-size: 12px; color: #334155; line-height: 1.45; }
.mt-status b { color: #0F172A; }
.mt-status .mt-err { color: #B91C1C; }
.mt-bar-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-bar-btns [hidden] { display: none; }
.mt-note { flex: 1 1 100%; font-size: 12px; border-radius: 4px; padding: 6px 10px; background: #ECFDF5; color: #065F46; }
.mt-note.err { background: #FEF2F2; color: #991B1B; }
.mt-note[hidden] { display: none; }

/* ---- tabs ---- */
.mt-tabs { display: flex; background: #fff; border-bottom: 1px solid #E2E2E5; }
.mt-tabs button {
    flex: 1 1 0; background: none; border: none; border-bottom: 3px solid transparent;
    padding: 10px 8px; font: 600 13px "Segoe UI", system-ui, sans-serif; color: #475569; cursor: pointer;
}
.mt-tabs button.on { color: #0A66C2; border-bottom-color: #0A66C2; }
.mt-tabs .n { font-weight: 400; opacity: .8; }

/* ---- rules controls ---- */
.mt-controls { background: #fff; border-bottom: 1px solid #E2E2E5; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.mt-controls-body { display: flex; flex-direction: column; gap: 8px; }
.mt-controls.folded .mt-controls-body { display: none; }
.mt-fold {
    display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: none; padding: 2px 0;
    font: 600 12px "Segoe UI", system-ui, sans-serif; color: #475569; cursor: pointer; text-align: left;
}
.mt-fold-arrow { display: inline-block; transition: transform .15s; }
.mt-controls.folded .mt-fold-arrow { transform: rotate(-90deg); }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-chip {
    background: #fff; color: #334155; border: 1px solid #CBD5E1; border-radius: 999px;
    padding: 4px 12px; font: 12px "Segoe UI", system-ui, sans-serif; cursor: pointer;
}
.mt-chip.on { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.mt-chip .n { opacity: .8; margin-left: 4px; }
.mt-controls input[type="search"], .mt-add input {
    width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #C9D0D8; border-radius: 4px;
    font: 14px "Segoe UI", system-ui, sans-serif;
}
.mt-add { display: flex; gap: 6px; }
.mt-add input { flex: 1 1 auto; min-width: 0; }

/* ---- buttons ---- */
.mt-btn {
    background: #fff; color: #0A66C2; border: 1px solid #C9D7E8; border-radius: 4px;
    padding: 6px 12px; font: 12px "Segoe UI", system-ui, sans-serif; cursor: pointer; white-space: nowrap;
}
.mt-btn:hover { background: #ECF4FD; }
.mt-btn:disabled { opacity: .55; cursor: default; }
.mt-btn.primary { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.mt-btn.white { color: #15803D; border-color: #A7D7B5; }
.mt-btn.black { color: #fff; background: #1F2937; border-color: #1F2937; }
/* Junk (Story 5567): to Spam -- amber, between the green of Whitelist and the black of Delete */
.mt-btn.junk { color: #92400E; border-color: #F3C98B; }
.mt-btn.danger { color: #B00020; border-color: #E8B4BE; }

/* ---- lists ---- */
.mt-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 8px 24px; }
.mt-more { text-align: center; padding: 8px; }
.mt-empty { color: #64748B; font-size: 13px; padding: 20px 4px; }
.mt-total { font-size: 12px; color: #475569; padding: 2px 4px 8px; }

.mt-card { background: #fff; border: 1px solid #E2E2E5; border-left: 4px solid #94A3B8; border-radius: 6px;
    margin-bottom: 8px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.mt-card.side-white { border-left-color: #15803D; }
.mt-card.side-black { border-left-color: #1F2937; }
.mt-card.side-junk { border-left-color: #D97706; }
.mt-card.mt-flash { animation: mt-flash 1.6s ease-out 2; }
@keyframes mt-flash { 0% { background: #DBEAFE; } 100% { background: #fff; } }
.mt-main { flex: 1 1 220px; min-width: 0; }
.mt-sender { margin: 0; font-size: 15px; font-weight: 700; color: #111; word-break: break-all; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; color: #475569; }
.mt-sample { margin-top: 4px; font-size: 12px; color: #334155; word-break: break-word; }
.mt-sample .from { color: #64748B; }
.mt-pill { border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; background: #EEF2F7; color: #334155; }
.mt-pill.count { background: #E0E7FF; color: #3730A3; }
.mt-pill.white { background: #DCFCE7; color: #15803D; }
.mt-pill.black { background: #1F2937; color: #fff; }
.mt-pill.junk { background: #FEF3C7; color: #92400E; }
.mt-pill.prot { background: #FEF3C7; color: #92400E; }
.mt-actions { display: flex; flex-wrap: wrap; gap: 6px; align-self: center; }

/* The quiet way across to the Gmail Client (Story 5569): a small grey link in the header. */
.ct-header .mt-xlink { color: #A8A8A8; font-size: 11px; text-decoration: none; white-space: nowrap; }
.ct-header .mt-xlink:hover, .ct-header .mt-xlink:focus { color: #fff; text-decoration: underline; }

/* ---- Find a sender (2026-10-07): always on top; while it holds text the tabs step aside ---- */
.mt-find { flex: 0 0 auto; background: #fff; border-bottom: 1px solid #E2E2E5; padding: 8px 12px; }
.mt-find input {
    width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #C9D0D8; border-radius: 4px;
    font: 14px "Segoe UI", system-ui, sans-serif;
}
.mt-tabs[hidden] { display: none; }
.mt-verdict { flex: 1 1 100%; font-size: 13px; color: #334155; margin-bottom: 2px; }
.mt-verdict b { font-weight: 700; }
.mt-verdict.v-white b { color: #15803D; }
.mt-verdict.v-junk b { color: #92400E; }
.mt-verdict.v-black b { color: #111; }
.mt-verdict.v-pending b { color: #475569; }
