/* Elektronischer Akt · Ergänzungen zur Gestaltung des Sitzungsmanagers (sm.css) */

/* Reiter in der Vertragsansicht */
.reiter { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--linie); margin: .75rem 0 1rem; }
.reiter button { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: .55rem .8rem; color: var(--text-leise);
  cursor: pointer; min-height: var(--tipp); }
.reiter button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--signal); font-weight: 700; }
.reiter button:hover { color: var(--text); }

/* Kopf eines Vertrags */
.vertrag-kopf { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.vertrag-kopf h1 { margin: .1rem 0 .25rem; }
.vertrag-nummer { font-family: var(--nummer); color: var(--text-leise); font-size: .9rem; }
.angaben { display: grid; grid-template-columns: minmax(9rem, max-content) 1fr; gap: .35rem 1rem; margin: 0; }
.angaben dt { color: var(--text-leise); }
.angaben dd { margin: 0; }
.raster-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 1.25rem; }

/* Formulare in Abschnitten */
.formular-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .5rem 1rem; }
.formular-raster label.feld { margin: 0; }
.abschnitt-titel { margin: 1.25rem 0 .5rem; font-size: 1.05rem; }
label.feld input, label.feld select, label.feld textarea { width: 100%; }

/* Karte */
.vm-karte { height: 26rem; border-radius: var(--radius); border: 1px solid var(--linie); margin: .5rem 0; z-index: 0; }
.vm-karte.gross { height: calc(100vh - 13rem); min-height: 22rem; }
.karten-legende { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .85rem; color: var(--text-leise); margin: .25rem 0; }
.karten-legende span::before { content: ""; display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; margin-right: .35rem;
  vertical-align: -2px; background: var(--farbe); border: 1px solid rgba(0,0,0,.25); }
.zeichenleiste { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .5rem 0; }
.zeichenhinweis { background: var(--warnung-grund); border-left: 4px solid var(--warnung); padding: .5rem .75rem; border-radius: var(--radius); }

/* Vertragstext: Paragrafen nummeriert wie im Word-Dokument */
.vertragstext .ed-text, .vertragstext.richtext { counter-reset: paragraf; }
.vertragstext .ed-text h2::before, .vertragstext.richtext h2::before { counter-increment: paragraf; content: "§ " counter(paragraf); display: block; }
.vertragstext .ed-text h2, .vertragstext.richtext h2 { text-align: center; font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.vertragstext .ed-text h3, .vertragstext.richtext h3 { font-size: 1rem; margin: .9rem 0 .3rem; }
.platzhalter-liste code { font-family: var(--nummer); background: var(--grund); padding: 0 .3rem; border-radius: 4px; }
.vergleich ins { background: var(--ok-grund); color: var(--ok); text-decoration: none; }
.vergleich del { background: var(--fehler-grund); color: var(--fehler); }

/* Verlauf und Zeitleiste */
.zeitleiste { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--linie); }
.zeitleiste li { position: relative; padding: 0 0 .9rem 1rem; }
.zeitleiste li::before { content: ""; position: absolute; left: -.42rem; top: .4rem; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--flaeche); border: 2px solid var(--linie-stark); }
.zeitleiste li.aktiv::before { background: var(--ok); border-color: var(--ok); }
.zeitleiste li.notiz::before { background: var(--signal); border-color: var(--signal-gedrueckt); }
.zeitleiste .wann { font-size: .82rem; color: var(--text-leise); }

/* Termine */
.termin { display: flex; gap: .75rem; align-items: baseline; }
.termin .tage { font-family: var(--nummer); min-width: 5.5rem; color: var(--text-leise); }
.termin .tage.dringend { color: var(--fehler); font-weight: 700; }
.zahl-rechts { text-align: right; font-family: var(--nummer); white-space: nowrap; }
.doppelt { border-left: 4px solid var(--fehler); }

/* Elektronischer Akt */
.zwei-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; align-items: start; }
.feldzeile { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .25rem 1rem; padding: .2rem 0; }
.liste-schlicht { list-style: none; padding: 0; margin: .3rem 0; }
.liste-schlicht > li { padding: .45rem 0; border-top: 1px solid var(--linie); }
.liste-schlicht > li:first-child { border-top: 0; }
.nummer { font-family: var(--nummer); color: var(--text-leise); font-size: .95rem; }
.ablage { border-style: dashed; text-align: center; color: var(--text-leise); padding: 1.2rem; }
.ablage.aktiv { border-color: var(--signal); background: rgba(255, 209, 0, .08); }
.zeitleiste { list-style: none; padding: 0; }
.zeitleiste li { border-left: 3px solid var(--linie); padding: .3rem 0 .6rem .8rem; }
.eingang-titel { font: inherit; font-weight: 700; width: 100%; box-sizing: border-box; padding: .45rem .6rem; margin-bottom: .2rem;
  border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); color: var(--text); min-height: var(--tipp); }
.eingang-titel:focus { outline: 2px solid var(--fokus, var(--signal)); outline-offset: 1px; }
.liegenschaft-karte { height: 360px; border-radius: var(--radius); }
.zeitleiste li.zl-eigentum { border-left-color: var(--neu, #3b82f6); }
.zeitleiste li.zl-vertrag { border-left-color: var(--ok); }
.zeitleiste li.zl-gwr { border-left-color: var(--warnung); }
.zeitleiste li.zl-vermerk { border-left-color: var(--vertraulich); }
.zeitleiste li.zl-akt { border-left-color: var(--signal); }

/* Auswahl mit Suche */
.suchauswahl { position: relative; min-width: 16rem; }
.suchauswahl-feld { width: 100%; box-sizing: border-box; }
.suchauswahl-liste { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); max-height: 18rem; overflow-y: auto; margin: 0; padding: .25rem 0;
  list-style: none; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.suchauswahl-liste li { padding: .45rem .7rem; cursor: pointer; line-height: 1.3; }
.suchauswahl-liste li.aktiv, .suchauswahl-liste li:hover { background: rgba(255, 209, 0, .18); }
.suchauswahl-liste li.leer { color: var(--text-leise); cursor: default; background: none; }
dialog .suchauswahl-liste { position: static; box-shadow: none; margin-top: .25rem; }
.feld-eingabe { font: inherit; box-sizing: border-box; padding: .45rem .6rem; min-height: var(--tipp); border: 1px solid var(--linie);
  border-radius: var(--radius); background: var(--flaeche); color: var(--text); }
.feld-eingabe:focus { outline: 2px solid var(--fokus, var(--signal)); outline-offset: 1px; }

/* Angaben je Schriftstück: Schlagworte als Marken, Bezüge */
.stueck-angaben { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .25rem; }
.marke.schlagwort { background: color-mix(in srgb, var(--signal) 22%, var(--flaeche)); color: var(--text); text-decoration: none; border-radius: 999px; padding: .05rem .55rem; font-size: .78rem; display: inline-flex; align-items: center; gap: .2rem; }
a.marke.schlagwort:hover { background: color-mix(in srgb, var(--signal) 45%, var(--flaeche)); }
.schlagwort-feld { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .35rem; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); }
.schlagwort-feld input { flex: 1 1 12rem; border: 0; outline: none; font: inherit; font-size: max(1rem, 16px); background: transparent; color: var(--text); padding: .25rem; }
.schlagwort-feld .knopf-leise { padding: 0 .2rem; min-height: 0; }
.angaben-dialog .feld { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.angaben-dialog textarea, .angaben-dialog input[type="search"] { width: 100%; box-sizing: border-box; font-size: max(1rem, 16px); }
/* Textfelder in Fenstern so hoch wie die Auswahlfelder */
dialog .feld input[type="text"], dialog .feld input:not([type]), dialog .feld input[type="search"] { min-height: 2.6rem; padding: .45rem .6rem; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); color: var(--text); font-size: max(1rem, 16px); box-sizing: border-box; width: 100%; }
/* Feld „Bürgerportal“ im Akt */
.bp-akt { border-left: 4px solid var(--signal); }
.bp-akt .bp-stand { display: grid; gap: .4rem; margin: .5rem 0 .8rem; }
.bp-akt h3 { margin: .9rem 0 .3rem; font-size: 1rem; }
.einsicht-stuecke { border: 1px solid var(--linie); border-radius: 8px; padding: .5rem .7rem; display: grid; gap: .25rem; max-height: 14rem; overflow-y: auto; margin: .4rem 0; }
.einsicht-dialog code { word-break: break-all; user-select: all; }
.platzhalter { display: contents; }
/* Auswertung der Anliegen: Eingänge je Monat als kleine Balken */
.an-monate { display: grid; grid-template-columns: repeat(12, 1fr); gap: .3rem; align-items: end; height: 5.5rem; margin: .4rem 0 1rem; }
.an-monate span { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .15rem; }
.an-monate i { display: block; width: 70%; min-height: 2px; background: var(--signal); border-radius: 3px 3px 0 0; }
.an-monate small { color: var(--text-leise); font-size: .7rem; }
.kopfzeile .knopfreihe select { width: auto; min-width: 6rem; }

/* Ablage: Akten in der Struktur des Aktenplans (Explorer) */
.ab-rahmen { display: grid; grid-template-columns: minmax(18rem, 26rem) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 52rem) { .ab-rahmen { grid-template-columns: 1fr; } }
.ab-links { position: sticky; top: .5rem; max-height: calc(100vh - 7rem); display: flex; flex-direction: column; gap: .5rem; }
.ab-links input[type=search] { width: 100%; }
.ab-baum { overflow: auto; flex: 1; margin: 0 -.4rem; }
.ab-knoten { display: flex; align-items: center; gap: .15rem; border-radius: 6px; padding-right: .3rem; }
.ab-knoten[data-tiefe="1"] { padding-left: 1.1rem; }
.ab-knoten[data-tiefe="2"] { padding-left: 2.2rem; }
.ab-knoten:hover { background: var(--flaeche-2, rgba(0,0,0,.04)); }
.ab-knoten.gewaehlt { background: color-mix(in srgb, var(--signal) 16%, transparent); }
.ab-knoten.inaktiv { opacity: .55; }
.ab-auf { width: 1.4rem; border: 0; background: none; color: var(--text-leise); cursor: pointer; padding: 0; font-size: .85rem; }
.ab-name { flex: 1; min-width: 0; text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: .3rem .2rem; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; }
.ab-name:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.ab-symbol { margin-right: .3rem; }
.ab-zahl { font-size: .78rem; color: var(--text-leise); white-space: nowrap; }
.ab-mehr { border: 0; background: none; color: var(--text-leise); cursor: pointer; padding: .1rem .35rem; border-radius: 4px; visibility: hidden; font-size: 1rem; }
.ab-knoten:hover .ab-mehr, .ab-knoten.gewaehlt .ab-mehr, .ab-mehr:focus-visible { visibility: visible; }
@media (hover: none) { .ab-mehr { visibility: visible; } }
.ab-akten { list-style: none; margin: 0; padding: 0; }
.ab-akten li { padding: .55rem 0; border-bottom: 1px solid var(--linie); }
.ab-akten li:last-child { border-bottom: 0; }
.ab-menue { position: fixed; z-index: 1000; min-width: 14rem; background: var(--flaeche, #fff); border: 1px solid var(--linie); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: .3rem; display: flex; flex-direction: column; }
.ab-menue button { text-align: left; border: 0; background: none; font: inherit; color: var(--text); padding: .5rem .7rem; border-radius: 6px; cursor: pointer; }
.ab-menue button:hover, .ab-menue button:focus-visible { background: color-mix(in srgb, var(--signal) 14%, transparent); outline: none; }
