/*
CHANGE LOG - mail.css (the look of HQ's one email renderer, mail.js: tiles, the We sent / They wrote line, the red line; used by the app and by HQ desk pages)
LAST CHANGED: 18/11/2026
18/11/2026 | written: every attachment a tile (a picture, a PDF's first page on white, a sheet or file with its type, name and size), the red line naming what could not be shown, the label of who wrote it and when; colours fall back for desk pages that don't carry the app's theme | vswear-programme/rollouts/2026-11-18-hq-pipe/WORKLOG-6.md
*/
.hm-mail { display: block; }
.hm-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; }
.hm-who b { font-weight: 700; }
.hm-who .sub { color: var(--muted, #667085); font-size: 13px; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.hm-tiles .dr-file { position: relative; aspect-ratio: 1; background: var(--hover, #eef1f5); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hm-tiles .dr-file > a, .hm-tiles .dr-file > button.hm-open, .hm-tiles .dr-file > button.dr-their-img, .hm-tiles .dr-file > button.dr-file-doc, .hm-tiles .dr-file > span { width: 100%; height: 100%; display: flex; border: 0; background: none; padding: 0; margin: 0; color: inherit; font: inherit; cursor: pointer; }
.hm-tiles .dr-file img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.hm-tiles .dr-file > .dr-file-doc { flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: inherit; padding: 6px; text-align: center; }
.hm-tiles .dr-doc-ico { font: 700 13px var(--body, system-ui, sans-serif); background: var(--bad-wash, #fdecec); color: var(--bad, #b42318); border-radius: 6px; padding: 6px 8px; }
.hm-tiles .dr-doc-ico.hm-sheet { background: var(--good-wash, #e7f6ec); color: var(--good, #1a7f37); }
.hm-tiles .dr-file-name { font-size: 11px; line-height: 1.2; word-break: break-all; padding: 2px 4px; }
.hm-tiles .dr-file > .hm-pdf { justify-content: flex-start; padding: 0; gap: 0; }
.hm-tiles .hm-page { flex: 1; width: 100%; min-height: 0; display: flex; align-items: flex-start; justify-content: center; background: #fff; overflow: hidden; }
.hm-tiles .hm-page img { object-fit: cover; object-position: top; }
.hm-tiles .hm-pdf .dr-file-name { width: 100%; background: var(--hover, #eef1f5); padding: 3px 4px; }
.hm-tiles img.hm-wait { opacity: 0; }
.hm-tiles .hm-open { position: relative; }
.hm-tiles .hm-cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.62); color: #fff; text-align: left; }
.hm-tiles .hm-bad { outline: 2px solid var(--bad, #b42318); }
.hm-miss { color: var(--bad, #b42318); font-size: 14px; line-height: 1.35; margin: 6px 0; font-weight: 500; }
.hm-fold { margin: 8px 0; }
.hm-fold > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; }
@media (max-width: 560px) { .hm-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px) { .hm-tiles { grid-template-columns: repeat(2, 1fr); } }
.mail > .hm-who { padding: 12px 16px 0; margin: 0; }
.mail > .hm-tiles { padding: 0 16px; margin: 12px 0; }
.mail > .hm-miss { padding: 0 16px; }
