/* Einheiten - Liste und Formular (Paket 34).
   Farben ueber die Variablen aus style.css / dunkelmodus.css, damit hell
   und dunkel ohne Sonderregeln tragen.

   Was sich gegenueber vorher geaendert hat:
   - Die Tabelle hat keine Mindestbreite mehr und keine Auswahlfelder in
     den Zeilen. Vorher schob beides die Knoepfe rechts aus der Seite.
   - Auf dem Handy wird jede Zeile zur Karte.
   - Das Formular steht unter der Liste; oben fuehrt ein Knopf hin. */

.einheiten-seite { max-width: 1040px; }

.eh-kopf {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px; flex-wrap: wrap; margin: 4px 0 18px;
}
.eh-kopf h1 { margin: 0 0 6px; font-size: 28px; color: var(--ueberschrift, var(--ink)); }

.eh-erklaerung {
  margin: 0; color: var(--ink-soft); max-width: 46rem; line-height: 1.5; font-size: 14.5px;
}

.eh-stoerung {
  border-left: 3px solid #C0392B;
  background: color-mix(in srgb, #C0392B 8%, transparent);
  padding: 0.7rem 0.9rem; margin: 0 0 1rem; border-radius: 0 6px 6px 0;
}

/* -------------------------------------------------------------- Liste */

.eh-listentitel {
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
  margin: 0 0 10px; font-size: 14px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft);
}
.eh-anzahl {
  font-size: 12px; font-weight: 600; letter-spacing: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: 0 0.5rem;
}
.eh-umschalter, .eh-umschalter:visited {
  margin-left: auto; text-transform: none; letter-spacing: 0;
  font-size: 13px; color: var(--link);
}
.eh-leer { color: var(--ink-soft); }

.eh-tabelle {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--schatten); overflow: hidden;
}
.eh-tabelle th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); font-weight: 600;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--flaeche-weich);
}
.eh-tabelle td {
  padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top;
  font-size: 14px; line-height: 1.4;
}
.eh-tabelle tr:last-child td { border-bottom: 0; }

.eh-funk { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 500; max-width: 15rem; }
.eh-klein { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.eh-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.eh-stand { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.eh-stand::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: 1px; background: currentColor;
}
.eh-stand--fertig  { color: var(--green-ok); }
.eh-stand--hand    { color: #B26A00; }
.eh-stand--offen   { color: #C0392B; }
.eh-stand--neutral { color: var(--ink-soft); font-weight: 500; }

.eh-aktionen { white-space: nowrap; text-align: right; width: 1%; }
.eh-aktionen form { display: inline; margin: 0; }

.eh-leise, .eh-leise:visited {
  display: inline-block; font: inherit; font-size: 13px; line-height: 1.2;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; color: var(--link); text-decoration: none; cursor: pointer;
}
.eh-leise:hover { border-color: var(--thw-blue); }
.eh-leise--grau, .eh-leise--grau:visited { color: var(--ink-soft); }

/* ------------------------------------------------------------ Formular */

/* hidden muss gewinnen - sonst zeigt display:flex versteckte Zeilen an. */
.eh-formular [hidden] { display: none !important; }

.eh-neu {
  margin: 28px 0 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px; box-shadow: var(--schatten); max-width: 560px;
  scroll-margin-top: 80px;
}
.eh-neu h2, .eh-neu h1 { margin: 0 0 14px; font-size: 18px; color: var(--ueberschrift, var(--ink)); }
.eh-neu--allein { margin-top: 8px; }
.eh-neu--allein .eh-erklaerung { margin-bottom: 16px; font-size: 14px; }
.eh-zurueck { margin: 0 0 10px; font-size: 14px; }
.eh-zurueck a, .eh-zurueck a:visited { color: var(--link); }

.eh-zeile { display: flex; flex-direction: column; margin: 0 0 14px; }
.eh-zeile > label:first-child {
  font-size: 13px; font-weight: 600; margin: 0 0 5px; color: var(--ink);
}
.eh-zeile select, .eh-zeile input[type="text"], .eh-zeile input[type="tel"], .eh-zeile input:not([type]),
.eh-ausnahme input {
  font: inherit; font-size: max(15px, 16px); padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--feld, var(--panel)); color: var(--ink); width: 100%; box-sizing: border-box;
}
.eh-zeile select { max-width: 100%; text-overflow: ellipsis; }
.eh-hinweis { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; line-height: 1.45; }
.eh-haken {
  display: flex; gap: 8px; align-items: center; margin-top: 7px;
  font-size: 13px; color: var(--ink-soft); font-weight: 400;
}

.eh-vorschau {
  display: flex; flex-direction: column; gap: 2px;
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 4px 0 12px;
  background: var(--flaeche-weich);
}
.eh-vorschau-titel { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.eh-vorschau-wert {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 18px; font-weight: 500;
  overflow-wrap: anywhere; color: var(--ink);
}

.eh-vorschau-wert.eh-vorschau-hinweis {
  font-family: inherit; font-size: 13.5px; font-weight: 400; color: var(--ink-soft);
}

.eh-ausnahme { margin: 0 0 16px; }
.eh-ausnahme summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.eh-ausnahme p { margin: 6px 0 8px; }

.eh-knoepfe { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.eh-knopf, .eh-knopf:visited {
  display: inline-block; font: inherit; font-weight: 600; font-size: 15px;
  padding: 10px 18px; border: 0; border-radius: 10px;
  background: var(--knopf, #0E6BA8); color: #fff; cursor: pointer; text-decoration: none;
}
.eh-knopf--neu { font-size: 14px; padding: 9px 14px; }
.eh-abbrechen, .eh-abbrechen:visited { color: var(--ink-soft); font-size: 14px; }

/* ------------------------------------------------ Handy: Zeilen als Karten */

@media (max-width: 720px) {
  .eh-kopf h1 { font-size: 24px; }
  .eh-tabelle, .eh-tabelle tbody, .eh-tabelle tr, .eh-tabelle td { display: block; width: auto; }
  .eh-tabelle { background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
  .eh-tabelle thead { display: none; }
  .eh-tabelle tr {
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--schatten); margin: 0 0 10px; padding: 10px 14px;
  }
  .eh-tabelle td { border: 0; padding: 4px 0; }
  .eh-tabelle td[data-titel="Träger"]::before {
    content: "Träger: "; color: var(--ink-soft); font-size: 12.5px;
  }
  .eh-funk { font-size: 16px; }
  .eh-aktionen { text-align: left; width: auto; padding-top: 8px !important; }
  .eh-neu { padding: 16px; }
}
