/*
 * Copyright © 2026 Krzysztof Kasprowicz
 * Licensed under the GNU Affero General Public License, Version 3. See LICENSE in the project root for license information.
 * Project repository: https://github.com/fathomise/MailFathom
 */
:root { --row: 76px; --row-folded: 40px; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5;
}
.sheet { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 34px; }
h1 { font-size: 24px; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0; }
.lede { color: var(--text2); max-width: 72ch; text-wrap: pretty; margin: 0; }
.state { display: flex; flex-direction: column; gap: 10px; }
.note { color: var(--muted); font-size: 13px; max-width: 78ch; text-wrap: pretty; margin: 0; }
.column { width: 420px; max-width: 100%; background: var(--panel); border: 1px solid var(--line);
          border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.pill { display: flex; align-items: center; gap: 8px; background: var(--rail); border: 1px solid var(--line);
        border-radius: 999px; padding: 8px 13px; color: var(--faint); font-size: 14px; }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--text2);
       border-radius: 8px; padding: 5px 11px; font-size: 13px; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chip { display: flex; align-items: center; gap: 5px; background: var(--accent-soft); color: var(--accent-d);
        border-radius: 6px; padding: 3px 8px; font-size: 13px; }
.chip button { all: unset; line-height: 1; padding: 1px 3px; border-radius: 4px; cursor: pointer; }
.chip button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fold { color: var(--muted); font-size: 13px; }
.rows { background: var(--panel); }
.row { height: var(--row); border-bottom: 1px solid var(--line2); padding: 0 12px;
       display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden; }
.row.open { box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); color: var(--accent-d); }
.line1 { display: flex; align-items: baseline; gap: 8px; }
.who { font-size: 14px; font-weight: 600; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org { font-size: 12px; color: var(--faint); }
/* The sender mark, as the folder list draws it: the glyph alone, its state in the tone, the glyph and the name. */
.mark { all: unset; align-self: center; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
        width: 24px; height: 24px; margin: -4px -3px; border-radius: 8px; cursor: pointer; color: var(--muted);
        font-family: 'Material Symbols Rounded'; font-variation-settings: 'wght' 300; font-size: 18px; line-height: 1; }
.mark:hover { background: var(--hover); }
.mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mark.ok { color: var(--ok-text); }
.mark.accent { color: var(--accent-d); }
.mark.err { color: var(--err-text); }
.when { margin-left: auto; font-size: 11px; color: var(--faint); }
.line2 { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.subject { max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview { color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Third line. There is one row shape — folder and results draw the same one — and the height always
   reserves it, so a row with something to say is the same row, not a taller one. */
.why { height: 16px; overflow: hidden; font-size: 12px; color: var(--faint); }
.why mark { background: none; color: var(--accent-d); font-weight: 600; }
.cat { float: right; box-sizing: border-box; max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 14px; color: var(--muted); border: 1px solid var(--border2); border-radius: 4px; padding: 0 5px; }
/* A spam row folds to one muted line, as the folder list draws it outside the Spam folder. */
.row.fold { height: var(--row-folded); flex-direction: row; align-items: center; gap: 8px; position: relative; }
.row.fold .who { flex: 0 0 auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.row.fold .subject { flex: 1 1 auto; max-width: none; font-size: 13px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.foot { padding: 8px 12px; font-size: 13px; color: var(--faint); }
.banner { margin: 10px 12px; padding: 9px 11px; border-radius: 8px; font-size: 13px;
          background: var(--warn-soft); color: var(--warn-text); text-wrap: pretty; }
.empty { padding: 22px 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.empty p { margin: 0; color: var(--text2); text-wrap: pretty; }
.waiting { padding: 14px 12px; font-size: 13px; color: var(--muted); }
.recent { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line2); }
.recent .btn { border-radius: 999px; }
.gallery { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
