/* Kommunikation 1: Zustellprotokoll /kommunikation/mails, Detail, Kundenakte-Reiter Kommunikation, Vorlagenseite und Vorschau. Dauerhaft eingebunden in components/layout/kopf.blade.php (neben kurse.css). */

/* Vorlagenseite /einstellungen/mails: Zustands-Pillen (lange Sätze, maskierte Prüfadresse) umbrechen statt die Seite zu verbreitern (Matrix-Befund 390/1024 px) */
.mails-zustand { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.mails-zustand li { min-width: 0; max-width: 100%; }
.mails-zustand .pille { white-space: normal; overflow-wrap: anywhere; text-align: left; max-width: 100%; }

/* Vorschau /einstellungen/mails/{vorlage}/{sprache}: Klartext bricht um (Matrix-Befund horizontales Scrollen), HTML im sandbox-iframe mit Rahmen */
.vorformatiert { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; max-width: 100%; }
.mails-vorschau-html { display: block; width: 100%; max-width: 100%; height: 760px; border: 1px solid var(--rahmen); border-radius: var(--radius-kachel); background: #fff; }
@media (max-width: 900px) { .mails-vorschau-html { height: 560px; } }

/* Tabelle: Adressen und Fehlertexte brechen innerhalb der Zelle, nie die Seite (390 px ohne horizontales Scrollen – die Karte rollt) */
.mails-tabelle { min-width: 720px; }
.mails-tabelle td.mails-adresse { max-width: 260px; overflow-wrap: anywhere; }
.mails-tabelle td.mails-adresse .klein { display: block; }
.mails-tabelle td.mails-fehler { max-width: 260px; overflow-wrap: anywhere; }

/* Detail: zwei Karten nebeneinander (Status, Vorlage), ab 900 px untereinander; Werte brechen */
.mails-detail .karte { min-width: 0; }
.mails-detail .definition dd { overflow-wrap: anywhere; min-width: 0; }
.mails-adresse { overflow-wrap: anywhere; }
.mails-fehler-voll { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.mails-anhaenge { margin: 0; padding: 0 0 0 18px; }
.mails-anhaenge li { overflow-wrap: anywhere; }
.mails-text { max-height: 480px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

/* HTML-Ansicht: eigenes Dokument im sandbox-iframe (Route kommunikation.mails.html mit eigener CSP), heller Rahmen, feste Höhe, volle Breite */
.mails-html { display: block; width: 100%; height: 640px; border: 1px solid var(--rahmen); border-radius: var(--radius-kachel); background: #fff; }
@media (max-width: 900px) { .mails-detail { grid-template-columns: minmax(0, 1fr); } .mails-html { height: 520px; } }

/* 4-2 C4 (Paket S): Anfragen der Kundenseite /kommunikation/anfragen – Nachricht und Adresse brechen in der Zelle, nie die Seite */
.anfragen-tabelle { min-width: 760px; }
.anfragen-tabelle td.anfragen-adresse { max-width: 220px; overflow-wrap: anywhere; }
.anfragen-tabelle td.anfragen-nachricht { max-width: 320px; overflow-wrap: anywhere; }
.anfragen-definition dd { overflow-wrap: anywhere; min-width: 0; }
.anfragen-nachricht-voll { white-space: pre-wrap; }

/* 4-2 Nachweis: Status-Pille als Link ohne Unterstrich (sonst zeichnet der Link einen Strich neben der Pille) */
a:has(> .pille) { text-decoration: none; }
