/* Einstellungen, Baugruppe belege: 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-bg-, nur Marken aus oo.css.
   Eingebunden in Dokument.razor nach oo.einstellungen.css. */

/* ── Nummernkreise ───────────────────────────────────────────────────────────── */
.es-bg-arten { padding: 6px 8px; }
.es-bg-arten td:first-child { display: flex; align-items: center; gap: 6px; min-width: 0; }
/* Der Name ist ein Knopf (Tastatur), sieht aber aus wie Text der Zeile. */
.es-bg-wahl { flex: 0 1 auto; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-bg-wahl:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 3px; }
.es-bg-nr { color: var(--tinte-3); white-space: nowrap; }
.es-bg-leise { color: var(--tinte-6); font-size: 12px; }

.es-bg-formular .fm-z { grid-template-columns: 120px minmax(0, 1fr); max-width: 480px; }
.es-bg-zahl { max-width: 140px; }
/* Text unter einem Feld, bündig mit dem Feld (Beschriftung 120 px + Abstand 10 px). */
.es-bg-unter { max-width: 480px; margin: -2px 0 10px 130px; color: var(--tinte-5); font-size: 12px; }
.es-bg-formular .es-bg-fehler { margin-left: 130px; color: var(--alarm); }
.es-bg-notiz { margin-bottom: 12px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche-2); color: var(--tinte-4); }

.es-bg-vorschau { display: grid; gap: 2px; margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 3px; background: var(--grund); }
.es-bg-vorschau-titel { color: var(--tinte-5); font-size: 12px; font-weight: 600; }
.es-bg-vorschau-nr { color: var(--tinte-1); font-size: 20px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }

/* Hinweis mit der Bedeutung „Achtung“ (gleiches Präfix, Nachdruck, Meldung beim Speichern). */
.es-bg-warnung { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--warn); border-radius: 3px; background: var(--warn-grund); color: var(--warn); }

/* ── Mahnwesen ───────────────────────────────────────────────────────────────── */
.es-bg-raster { width: 100%; max-width: 860px; border-collapse: collapse; }
.es-bg-raster th { padding: 0 8px; color: var(--tinte-5); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.es-bg-raster thead th { height: 28px; border-bottom: 1px solid var(--linie); }
.es-bg-raster tbody th { padding-top: 14px; color: var(--tinte-3); font-size: 13px; font-weight: 400; white-space: normal; vertical-align: top; }
.es-bg-raster td { padding: 8px 8px 6px; border-bottom: 1px solid var(--linie-fein); vertical-align: top; }
.es-bg-zelle { display: flex; align-items: center; gap: 6px; }
.es-bg-zelle .ein { max-width: 110px; }
.es-bg-einheit { color: var(--tinte-5); }
.es-bg-falsch { color: var(--alarm); }
.es-bg-vorschau-text { margin-top: 12px; color: var(--tinte-2); font-weight: 600; }
.es-bg-stand { margin-top: 4px; color: var(--tinte-5); font-size: 12px; }
.es-bg-mahnregeln .es-hinweis { max-width: 90ch; }

/* ── Laufkarten-Präfixe (Karte unter den Nummernkreisen) ─────────────────────── */
.es-bg-praefix-wirkung { margin-bottom: 8px; color: var(--tinte-4); }
.es-bg-praefixe .es-bg-notiz { margin-bottom: 10px; }
.es-bg-praefix-tab { table-layout: fixed; }
.es-bg-praefix-tab th.es-bg-praefix-kuerzel { width: 104px; }
.es-bg-praefix-tab th.es-bg-praefix-beispiel { width: 170px; }
.es-bg-praefix-tab th.es-bg-praefix-aktion { width: 40px; }
.es-bg-praefix-tab td { padding-top: 1px; padding-bottom: 1px; }
.es-bg-praefix-tab td.es-bg-praefix-beispiel { overflow: hidden; color: var(--tinte-4); text-overflow: ellipsis; white-space: nowrap; }
.es-bg-praefix-tab td.es-bg-praefix-aktion { padding-right: 0; text-align: right; }
/* Kürzel wie im PC-Programm groß (gespeichert wird groß, die Regel macht es beim Verlassen des Felds). */
.es-bg-kuerzel { text-transform: uppercase; letter-spacing: .02em; }
.es-bg-praefixe .es-bg-praefix-fehler { margin-top: 8px; color: var(--alarm); }
.es-bg-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  .es-bg-praefix-tab th.es-bg-praefix-kuerzel { width: 80px; }
  .es-bg-praefix-tab .es-bg-praefix-beispiel { display: none; }
}

@media (max-width: 860px) {
  .es-bg-formular .fm-z { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .es-bg-unter, .es-bg-formular .es-bg-fehler { margin-left: 0; }
  .es-bg-raster, .es-bg-raster tbody, .es-bg-raster tr { display: block; }
  .es-bg-raster thead { display: none; }
  .es-bg-raster tbody th { display: block; padding: 12px 0 4px; }
  .es-bg-raster td { display: block; padding: 4px 0; border-bottom: 0; }
  .es-bg-raster td::before { content: attr(data-titel); display: block; margin-bottom: 2px; color: var(--tinte-5); font-size: 12px; }
  .es-bg-raster tr { padding-bottom: 8px; border-bottom: 1px solid var(--linie-fein); }
}

/* ── Belegdesign ─────────────────────────────────────────────────────────────── */
/* Karten der Designs: Vorschau der ersten Seite, Name, ein Satz. Gewählt = Rahmen in der Akzentfarbe (Blau nur für Auswahl und Fokus). */
.es-bg-bd-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
/* Am Handy zwei Karten nebeneinander: einspaltig füllten die fünf Vorschauen fast drei Bildschirmhöhen. */
@media (max-width: 640.98px) { .es-bg-bd-wahl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.es-bg-bd-option { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; border: 1px solid var(--linie);
  border-radius: 3px; background: var(--flaeche); cursor: pointer; }
.es-bg-bd-option:hover { border-color: var(--linie-stark); }
.es-bg-bd-option.an { border-color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.es-bg-bd-option:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
/* Das Auswahlfeld bleibt für Tastatur und Vorlesehilfen da, sichtbar ist die Karte. */
.es-bg-bd-option input, .es-bg-bd-farbe input { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; opacity: 0; }
/* Das Blatt bleibt weiß, auch im dunklen Design: so sieht der Beleg aus. */
.es-bg-bd-blatt { display: block; aspect-ratio: 210 / 297; overflow: hidden; border: 1px solid var(--linie); border-radius: 2px; background: #FFFFFF; }
.es-bg-bd-blatt img { display: block; width: 100%; height: auto; }
.es-bg-bd-name { color: var(--tinte-1); font-weight: 600; line-height: 1.3; }
.es-bg-bd-text { color: var(--tinte-5); font-size: 12px; line-height: 1.4; }
.es-bg-bd-arten, .es-bg-bd-stand { margin: 10px 0 0; color: var(--tinte-5); font-size: 12px; }
.es-bg-bd-stand { margin-top: 12px; }

/* Farben: Kreise wie die Palette des PC-Programms. „Keine eigene Farbe“ ist ein weißer Kreis mit Schrägstrich. */
.es-bg-bd-farben { display: flex; flex-wrap: wrap; gap: 6px; max-width: 560px; }
.es-bg-bd-farbe { position: relative; display: inline-block; width: 24px; height: 24px; border: 1px solid rgba(0, 0, 0, .25); border-radius: 50%;
  background: var(--farbe, #FFFFFF); cursor: pointer; }
.es-bg-bd-farbe.an { outline: 2px solid var(--akzent); outline-offset: 2px; }
.es-bg-bd-farbe:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
.es-bg-bd-ohne { background: linear-gradient(135deg, #FFFFFF 45%, #DC2626 45%, #DC2626 55%, #FFFFFF 55%); }
.es-bg-bd-eigene { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; color: var(--tinte-4); }
.es-bg-bd-eigene input[type="color"] { width: 40px; height: 26px; padding: 0 2px; border: 1px solid var(--linie); border-radius: 3px; background: var(--flaeche); }
.es-bg-bd-gewaehlt { color: var(--tinte-5); font-size: 12px; }
