/* W4 Einstellungen › E-Mail (Konten, Signaturen, Vorlagen): Klassen „es-em-“. Gehört allein W4. Gemeinsames (es-…) steht in
   oo.einstellungen.css, Allgemeines in oo.css – hier nie etwas davon überschreiben. Nur Marken aus oo.css (hell und dunkel). */

/* ── Karten und Listen ───────────────────────────────────────────────────────── */
.es-em-karte .es-karte-aktionen { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.es-em-karte + .es-em-karte { margin-top: 14px; }
.es-em-tab { table-layout: fixed; width: 100%; }
.es-em-tab td { height: auto; min-height: 30px; padding-top: 5px; padding-bottom: 5px; }
.es-em-tab tr.es-em-inaktiv td { color: var(--tinte-5); }
.es-em-name { display: block; font-weight: 500; overflow-wrap: anywhere; }
.es-em-adresse { display: block; color: var(--tinte-5); font-size: 12px; overflow-wrap: anywhere; }
.es-em-marken { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.es-em-marke { display: inline-block; max-width: 100%; padding: 0 6px; overflow: hidden; border-radius: 3px; background: var(--flaeche-2); color: var(--tinte-4); font-size: 11.5px; line-height: 18px; white-space: nowrap; text-overflow: ellipsis; vertical-align: middle; }
.es-em-marke.persoenlich { background: var(--auswahl); color: var(--tinte-2); }
.es-em-marke.pc { background: var(--warn-grund); color: var(--warn); }
.es-em-marke.eigen { background: var(--ok-grund); color: var(--ok); }
.es-em-marke.leer { background: var(--alarm-grund); color: var(--alarm); }
.es-em-marke.leise { background: transparent; border: 1px dashed var(--linie-stark); color: var(--tinte-5); }
.es-em-tab th.es-em-art, .es-em-tab td.es-em-art { width: 140px; }
.es-em-tab th.es-em-server, .es-em-tab td.es-em-server { width: 34%; }
.es-em-server-text { display: block; overflow: hidden; color: var(--tinte-4); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.es-em-tab th.es-em-standard, .es-em-tab td.es-em-standard { width: 84px; text-align: center; }
.es-em-tab th.es-em-aktionen, .es-em-tab td.es-em-aktionen { width: 68px; padding-right: 2px; text-align: right; white-space: nowrap; }
.es-em-tab td.es-em-aktionen .kn { height: 24px; width: 26px; color: var(--tinte-5); }
.es-em-tab td.es-em-aktionen .kn:hover { color: var(--tinte-1); }
.es-em-tab td.es-em-aktionen .es-em-loeschen:hover { color: var(--alarm); background: var(--alarm-grund); }
.es-em-std { height: 22px; padding: 0 7px; font-size: 11.5px; border-color: var(--linie); white-space: nowrap; }
.es-em-std[aria-pressed="true"] { border-color: var(--tinte-3); color: var(--tinte-1); font-weight: 600; cursor: default; }
.es-em-fuss { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--linie-fein); color: var(--tinte-4); font-size: 12px; }
.es-em-leer { margin-bottom: 0; }
.es-em-suche { width: 200px; max-width: 100%; height: 28px; }
.aus.es-em-ordnerwahl { width: auto; max-width: 180px; }
.es-em-mitgeliefert-wahl { font-size: 12.5px; }

/* Signaturen: Auszug in einer Zeile */
.es-em-sig-tab th.es-em-sig-name, .es-em-sig-tab td.es-em-sig-name { width: 34%; }
.es-em-sig-tab th.es-em-sig-zustand, .es-em-sig-tab td.es-em-sig-zustand { width: 110px; }
.es-em-auszug { display: block; overflow: hidden; color: var(--tinte-4); white-space: nowrap; text-overflow: ellipsis; }

/* Vorlagen: Gruppen nach Art, mitgelieferte leiser */
.es-em-vl-tab tr.es-em-gruppe th { height: 26px; padding-top: 8px; border-bottom: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte-3); font-size: 12px; }
.es-em-vl-tab tbody:first-of-type tr.es-em-gruppe th { padding-top: 2px; }
.es-em-vl-tab tr.es-em-mitgeliefert .es-em-name { color: var(--tinte-4); font-weight: 400; font-style: italic; }
.es-em-vl-tab .es-em-vl-betreff .es-em-marke { margin-top: 2px; }
.es-em-vl-tab th.es-em-vl-ordner, .es-em-vl-tab td.es-em-vl-ordner { width: 160px; color: var(--tinte-4); }
.es-em-ord-tab td.es-em-ord-zahl { width: 110px; color: var(--tinte-5); font-size: 12px; }

/* ── Dialoge ─────────────────────────────────────────────────────────────────── */
.oo-dialog.es-em-dlg { top: 5vh; width: min(640px, calc(100vw - 32px)); max-height: 90vh; overflow-y: auto; }
.oo-dialog.es-em-dlg.es-em-gross { width: min(980px, calc(100vw - 32px)); }
.es-em-dlg .fm-z { grid-template-columns: 132px minmax(0, 1fr); margin-bottom: 5px; }
.es-em-dlg .fm-haken.es-em-haken { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 4px 0 8px 142px; }
.es-em-dlg .fm-haken .es-hinweis { flex: 1 1 100%; margin-top: 0; }
.oo-dialog p.es-em-einleitung { margin: -2px 0 10px; color: var(--tinte-4); white-space: normal; }
.oo-dialog p.es-em-feldhinweis { margin: -2px 0 8px 142px; white-space: normal; }
.es-em-abschnitt { margin: 14px 0 6px; padding-top: 8px; border-top: 1px solid var(--linie-fein); color: var(--tinte-3); font-size: 12px; font-weight: 600; }
.es-em-server-zeile { display: flex; align-items: center; gap: 8px; width: 100%; }
.es-em-server-zeile .es-em-host { flex: 1 1 auto; }
.es-em-port-titel { flex: 0 0 auto; color: var(--tinte-5); font-size: 12px; }
.ein.es-em-zahl { flex: 0 0 76px; width: 76px; }
.es-em-anmeldung { display: grid; gap: 2px; margin: 0 0 6px 142px; }
.es-em-anmeldung-art { font-weight: 500; }
.es-em-pruefung { margin: 8px 0 10px; padding: 6px 10px; border-left: 3px solid var(--ampel-rot); border-radius: 0 3px 3px 0; background: var(--alarm-grund); color: var(--alarm); }
.es-em-pruefung.warn { border-left-color: var(--ampel-gelb); background: var(--warn-grund); color: var(--warn); }
.es-em-pruefung.info { border-left-color: var(--linie-stark); background: var(--flaeche-2); color: var(--tinte-3); }
.oo-dialog .es-em-pruefung p { margin: 0; color: inherit; white-space: normal; }
.oo-dialog .es-em-pruefung p + p { margin-top: 3px; }

/* Text (HTML) links, Vorschau rechts; schmal untereinander */
.es-em-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 8px; }
.es-em-editor-feld, .es-em-vorschau { display: grid; align-content: start; gap: 4px; min-width: 0; }
.es-em-editor-titel { color: var(--tinte-5); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.ein.es-em-quelltext { height: auto; min-height: 260px; padding: 6px 8px; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; line-height: 1.45; }
.oo-dialog .es-em-editor p.es-hinweis { margin: 0; white-space: normal; }
.es-em-platzhalter { overflow-wrap: anywhere; }
/* Das Blatt einer E-Mail ist weiß wie in jedem Mailprogramm, auch im dunklen Design. */
.es-em-vorschau-rahmen { width: 100%; height: 300px; border: 1px solid var(--linie-stark); border-radius: 3px; background: #FFFFFF; }

/* ── Schmale Fenster ─────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .es-em-editor { grid-template-columns: minmax(0, 1fr); }
  .ein.es-em-quelltext { min-height: 180px; }
  .es-em-vorschau-rahmen { height: 220px; }
}
@media (max-width: 560px) {
  .es-em-schmal-weg { display: none; }
  /* ☠️ Am Handy stehen Suche, Ordner, „Mitgelieferte“ und „Neue Vorlage“ UNTER dem Titel (Befund U3: in einer Zeile mit dem Titel
     überdeckte die Suche ihn, „Neue Vorlage“ lag außerhalb des Bildes). */
  .es-em-karte .es-karte-kopf { flex-wrap: wrap; }
  .es-em-karte .es-karte-text { flex: 1 1 100%; }
  .es-em-karte .es-karte-aktionen { flex: 1 1 100%; justify-content: flex-start; }
  .es-em-suche, .aus.es-em-ordnerwahl { width: 100%; max-width: none; }
  /* Die Ordnerspalte der Vorlagen bleibt als leere Spalte stehen: die Gruppenzeilen tragen colspan="4", ohne sie bekäme eine leere
     vierte Spalte den Rest der Breite und der Betreff bräche nach jedem Wort um (U3). */
  .es-em-vl-tab th.es-em-vl-ordner.es-em-schmal-weg, .es-em-vl-tab td.es-em-vl-ordner.es-em-schmal-weg { display: table-cell; width: 0; padding: 0; border: 0;
    overflow: hidden; font-size: 0; }
  /* B6 der Prüfung vor der Auslieferung: die leise Marke „Standard“ der mitgelieferten Vorlagen stand bei 70 px als „Stand…“ da. */
  .es-em-tab th.es-em-standard, .es-em-tab td.es-em-standard { width: 76px; padding-left: 2px; padding-right: 2px; }
  .es-em-marke.leise { padding: 0 3px; }
  .es-em-std { padding: 0 4px; }
  .es-em-sig-tab th.es-em-sig-name, .es-em-sig-tab td.es-em-sig-name { width: auto; }
  .es-em-dlg .fm-z { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .es-em-dlg .fm-haken.es-em-haken, .oo-dialog p.es-em-feldhinweis, .es-em-anmeldung { margin-left: 0; }
}
