/* Einstellungen, Baugruppe infobox: Stilregeln, die nur diese Baugruppe braucht. Gemeinsames (es-…) steht in oo.einstellungen.css,
   Allgemeines in oo.css – hier nie etwas davon überschreiben. Eigene Klassen mit der Vorsilbe es-ib-, nur Marken aus oo.css.
   Eingebunden in Dokument.razor nach oo.einstellungen.css. */

/* ── Liste ───────────────────────────────────────────────────────────────────── */
.es-ib-karte .es-karte-aktionen { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.es-ib-suche { width: 220px; max-width: 100%; height: 28px; }
.es-ib-tab { table-layout: fixed; width: 100%; }
.es-ib-tab th.es-ib-name, .es-ib-tab td.es-ib-name { width: 200px; }
.es-ib-tab .es-ib-name-text { font-weight: 500; overflow-wrap: anywhere; }
.es-ib-tab td.es-ib-text { overflow: hidden; }
.es-ib-auszug { display: block; overflow: hidden; color: var(--tinte-3); white-space: nowrap; text-overflow: ellipsis; }
.es-ib-tab th.es-ib-standard, .es-ib-tab td.es-ib-standard { width: 76px; text-align: center; }
.es-ib-tab th.es-ib-aktionen, .es-ib-tab td.es-ib-aktionen { width: 68px; padding-right: 2px; text-align: right; white-space: nowrap; }
.es-ib-tab td.es-ib-aktionen .kn { height: 24px; width: 26px; color: var(--tinte-5); }
.es-ib-tab td.es-ib-aktionen .kn:hover { color: var(--tinte-1); }
.es-ib-tab td.es-ib-aktionen .es-ib-loeschen:hover { color: var(--alarm); background: var(--alarm-grund); }
.es-ib-keiner { margin-bottom: 0; }

/* Standard je Zeile (gedrückt bei der Standardzeile, aria-pressed) */
.es-ib-std { height: 22px; padding: 0 7px; font-size: 11.5px; border-color: var(--linie); white-space: nowrap; }
.es-ib-std[aria-pressed="true"] { border-color: var(--tinte-3); color: var(--tinte-1); font-weight: 600; cursor: default; }

/* Fuß: Legende links, Zähler rechts */
.es-ib-fuss { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--linie-fein); color: var(--tinte-4); font-size: 12px; }
.es-ib-zaehler { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Leere Liste: „Werksvorgaben übernehmen“ */
.es-ib-leer { display: grid; justify-items: start; gap: 6px; }
.es-ib-leer .es-leer { margin-bottom: 0; }
.es-ib-werk-hinweis { margin: 0; color: var(--tinte-4); font-size: 12.5px; }

/* ── Dialog ──────────────────────────────────────────────────────────────────── */
.oo-dialog.es-ib-dlg { top: 7vh; width: min(600px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto; }
.es-ib-dlg .fm-z { grid-template-columns: 132px minmax(0, 1fr); margin-bottom: 5px; }
.es-ib-dlg .fm-haken { margin: 6px 0 8px 142px; }
.es-ib-dlg .fm-haken .es-hinweis { margin-top: 0; }
.oo-dialog p.es-ib-einleitung { margin: -2px 0 12px; color: var(--tinte-4); white-space: normal; }
.es-ib-eingabe { min-height: 96px; resize: vertical; }
/* Die Zeichenzahl steht UNTER dem Textfeld: die Zeile eines Felds (.fm-f) legt sonst alles nebeneinander, das Textfeld wäre
   schmaler als das Namensfeld und die Zahl bräche daneben um. */
.es-ib-dlg .fm-f:has(> .es-ib-eingabe) { flex-wrap: wrap; align-items: flex-start; gap: 0; }
.es-ib-dlg .fm-f > .es-ib-eingabe { flex: 1 1 100%; }
.es-ib-zeichen { display: block; flex: 1 1 100%; margin-top: 2px; color: var(--tinte-4); font-size: 12px; font-variant-numeric: tabular-nums; }
.es-ib-vorschau { display: grid; gap: 4px; margin: 8px 0 6px 142px; }
.es-ib-vorschau-titel { color: var(--tinte-5); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
/* Wie die Infobox auf dem Blatt des Beleg-Editors (gelber Kasten, Absätze bleiben). */
.es-ib-kasten { padding: 6px 10px; border-radius: 3px; background: var(--warn-grund); color: var(--tinte-1); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30vh; overflow-y: auto; }
.es-ib-kasten.leer { color: var(--tinte-4); }
.es-ib-pruefung { margin: 10px 0 12px; padding: 6px 10px; border-left: 3px solid var(--ampel-rot); border-radius: 0 3px 3px 0; background: var(--alarm-grund); color: var(--alarm); }
.es-ib-pruefung.warn { border-left-color: var(--ampel-gelb); background: var(--warn-grund); color: var(--warn); }
.oo-dialog .es-ib-pruefung p { margin: 0; color: inherit; white-space: normal; }
.oo-dialog .es-ib-pruefung p + p { margin-top: 3px; }

/* ── Beleg-Editor: Auswahl „Vorlage …“ der Infobox (EditorTexte, im Kopf der Box und neben „+ Infobox an Kunde“) ───────── */
.aus.es-ib-wahl { width: auto; max-width: 220px; height: 24px; padding-top: 0; padding-bottom: 0; font-size: 12px; }
.dk-ed-infobox:not(.an) > .es-ib-wahl { margin-left: 10px; vertical-align: middle; }

/* ── Schmale Fenster ─────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .es-ib-schmal-weg { display: none; }
  .es-ib-suche { width: 100%; }
  .es-ib-tab th.es-ib-name, .es-ib-tab td.es-ib-name { width: 40%; }
  .es-ib-tab th.es-ib-standard, .es-ib-tab td.es-ib-standard { width: 66px; }
  .es-ib-std { padding: 0 4px; }
  .es-ib-tab th.es-ib-aktionen, .es-ib-tab td.es-ib-aktionen { width: 32px; }
  .es-ib-dlg .fm-z { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .es-ib-dlg .fm-haken, .es-ib-vorschau { margin-left: 0; }
  .aus.es-ib-wahl { max-width: 100%; height: 32px; }
}
