/* ===========================================================================
   Mails formatiert zeigen (mailhtml.js, Marcel 02.11.2026, Doku docs/mail-html.md).
   Variablen aus stil.css (Hell und Dunkel stimmen von selbst). EINE Ausnahme bei den Farben: der Rahmen mit der Mail ist IMMER
   weiß (--mh-weiss) und hat color-scheme: light, auch im Dunkelmodus: Mails sind für hellen Grund gebaut, sonst stünde schwarzer
   Text auf dunklem Grund. Ziele ab 44 px, Schrift ab 12 px. Präfix: mh.
   =========================================================================== */

.mh { --mh-weiss: white; display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; overflow-y: auto; }
.mh[hidden], .mh [hidden] { display: none; }
.mh .am__hinweis { margin: 12px 20px 0; }

/* Leiste: die zwei Hinweiszeilen (Bilder aus dem Netz, Signaturbilder). Kein Umschalter mehr — Mails sind immer formatiert. */
.mh__leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 20px; border-bottom: 1px solid var(--linie); flex: none; }
.mh__knopf:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }

.mh__zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.mh__knopf { min-height: 44px; padding: 0 14px; border-radius: var(--k-r); font: inherit; font-size: 13px; font-weight: 700; color: var(--tinte); cursor: pointer;
  background: var(--k-weiss) border-box; border: 1px solid var(--k-weiss-rand); box-shadow: var(--k-weiss-sch); transition: background .12s, transform .12s; }
.mh__knopf:hover { background: var(--k-weiss-h) border-box; }
.mh__knopf:active { background: var(--k-weiss-p) border-box; transform: scale(.98); }

/* Der Rahmen: weißer Grund, keine eigene Scroll-Leiste (die Höhe misst mailhtml.js von außen) */
.mh__rahmenbox { flex: none; margin: 14px 20px; border: 1px solid var(--g-glass-line); border-radius: 12px; background: var(--mh-weiss); overflow: hidden; min-width: 0; }
.mh__rahmen { display: block; width: 100%; height: 120px; border: 0; background: var(--mh-weiss); color-scheme: light; }

/* Textansicht: wie bisher (.pf-v__text) */
.mh__text { padding: 16px 20px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.mh__text .mb { margin: 12px -20px 0; white-space: normal; }

@media (max-width: 900px) {
  .mh__leiste { padding: 8px 14px; }
  .mh__rahmenbox { margin: 10px 14px; }
  .mh__text { padding: 14px; }
  .mh .am__hinweis { margin: 10px 14px 0; }
  .mh__text .mb { margin-left: -14px; margin-right: -14px; }
}
