/* ===========================================================================
   Abwesenheit (Zeitraeume je Person)
   ---------------------------------------------------------------------------
   Spezifikation: docs/specs/abwesenheit.md

   Nur .abw-*-Klassen: keine :root-Variablen, keine nackten Element-Regeln.
   Damit darf die Datei fuer index.html und register.html wegfallen
   (ti_css_ohne in kopf-css.php). Felder und Knoepfe kommen aus den
   vorhandenen Regeln (.content input/select, .so-btn).
   =========================================================================== */

.abw-karte { display: flex; flex-direction: column; gap: 12px; }

.abw-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.abw-liste li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border: 1px solid var(--glass-22); border-radius: 12px; background: var(--glass-06); }
.abw-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.abw-zeit { font-weight: 700; }
.abw-fein { flex-basis: 100%; font-size: 0.8rem; opacity: 0.8; }
.abw-fein b { font-size: inherit; color: inherit; }   /* <b> erbt sonst die helle Absatzfarbe nicht (Portal-Falle) */

.abw-meldung { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 0.85rem; }
.abw-meldung.ok { background: var(--ok-bg); color: var(--ok-text); }
.abw-meldung.fehler { background: var(--warn-bg); color: var(--warn-text); }

.abw-neu { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.abw-felder { display: flex; flex-wrap: wrap; gap: 12px; }
.abw-felder label, .abw-notiz { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; }
.abw-notiz { width: min(100%, 28rem); }
.abw-notiz input { width: 100%; }
.abw-hinweis { margin: -4px 0 0; font-size: 0.75rem; opacity: 0.75; }

.abw-tage { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.abw-tage legend { padding: 0; margin-bottom: 4px; font-size: 0.8rem; }
.abw-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; }

/* Zu-/Absage unter einem Termin auf der Startseite */
.abw-termin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -2px 0 8px; padding: 0 14px; font-size: 0.76rem; }
.abw-termin form { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.abw-stand.abw-kommt { color: var(--ok-text); }
.abw-stand.abw-kommt_nicht { color: var(--warn-text); }
.abw-ab summary { list-style: none; cursor: pointer; display: inline-block; }
.abw-ab summary::-webkit-details-marker { display: none; }
.abw-ab[open] summary { margin-bottom: 6px; }
.abw-ab input[type=text] { min-width: 12rem; }

/* Uebersicht fuer Trainer: Zahlen und Namensliste */
.abw-uebersicht { margin: 4px 0 8px; font-size: 0.8rem; }
.abw-uebersicht .so-btn b { font-size: inherit; color: inherit; }   /* <b> erbt sonst die Absatzfarbe nicht (Portal-Falle) */
.abw-unter { margin: 14px 0 4px; font-size: 0.85rem; }
.abw-dlg h2 .abw-fein { display: block; font-weight: 400; }
/* Das Popup Wer kommt nutzt die Breite: die Personen stehen in Spalten nebeneinander, nicht in einer langen Reihe */
.abw-uliste { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 6px 10px; }
.abw-uliste li { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border: 1px solid var(--glass-22); border-radius: 10px; background: var(--glass-06); min-width: 0; }
.abw-uname { font-weight: 600; }
.abw-uk, .abw-uk:hover, .abw-uk:focus-visible { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.abw-uk:hover .abw-uname, .abw-uk:focus-visible .abw-uname { text-decoration: underline; }
.abw-dlg label { display: flex; flex-direction: column; gap: 2px; }
.abw-dlg .abw-andern [hidden], .abw-dlg label[hidden] { display: none; }
.abw-andern { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.abw-andern input[type=text] { min-width: 12rem; }

/* Eintragen als Popup; .so-dlg kommt aus 08-spielerorganisation-mannschaften.css (bewusst ohne display-Regel, sonst
   bliebe das Popup dauerhaft offen). */
.abw-dlg { width: min(560px, calc(100vw - 32px)); }
.abw-dlg-breit { width: min(860px, calc(100vw - 32px)); }
/* Knopf zugesagt | Kader in der Hallenbelegung: wie das bisherige Schild, aber bedienbar */
.hb-grid button.hb-anw { border: 0; cursor: pointer; font-family: inherit; }
.hb-grid button.hb-anw:hover { background: var(--glass-22); }
.hb-grid button.hb-anw:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.abw-dlg .abw-karte { margin-top: 8px; }
.abw-zeilenknoepfe { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Popup am Termin: zwei Wege mit je eigenem Grund */
.abw-wahl { border: 0; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.abw-radio { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; }
.abw-wahl-feld { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px 26px; }
.abw-wahl-feld input[type=text] { flex: 1 1 12rem; }
.abw-eing { display: flex; align-items: flex-start; gap: 8px; font-size: 0.85rem; }
.abw-eing[hidden] { display: none; }   /* display:flex oben wuerde hidden sonst aushebeln */

/* Statistik Anwesenheit (Auswertungen): Zahlen und Prozent nicht umbrechen */
.aw-anw .num { white-space: nowrap; }

/* Startseite: der Kasten eines Termins traegt links den Link und rechts die Meldung (Abmelden, Doch zusagen) */
.abw-zeile-link { display: flex; align-items: center; gap: 0.8rem; flex: 1 1 14rem; min-width: 0; color: inherit; text-decoration: none; }
.abw-zeile > .abw-termin { margin: 0 0 0 auto; padding: 0; justify-content: flex-end; }
.abw-zeile > .abw-uebersicht { margin: 0 0 0 auto; padding: 0; }
.abw-zeile > .abw-uebersicht + .abw-termin { margin-left: 0; }   /* Knopf und Abmelden stehen nebeneinander rechts im Kasten */

/* Handy (2026-10-19): Meldung ueber die ganze Breite, darunter Abmelden/Doch zusagen und
   die Uebersicht nebeneinander, linksbuendig. display:contents loest .abw-termin und sein
   Formular auf, damit Knoepfe und Uebersicht Geschwister in einer Reihe werden. */
@media (max-width: 600px) {
    .abw-zeile { gap: 0.5rem; }
    .abw-zeile-link { flex: 1 1 100%; }
    .abw-zeile > .abw-termin,
    .abw-zeile > .abw-termin form { display: contents; }
    .abw-zeile > .abw-termin .abw-stand { flex: 1 1 100%; }
    .abw-zeile > .abw-uebersicht { margin: 0; }
    .abw-zeile .so-btn-mini { min-height: 40px; }
}

/* Eltern: ein Block je Kind rechts im Kasten; die Abwesenheiten je Kind in "Meine Kinder" */
.abw-termine { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; }
.abw-termine > .abw-termin { margin: 0; padding: 0; justify-content: flex-end; }
.mk-abw-kopf { margin-top: 16px; }

.abw-stand { font-size: inherit; }   /* sonst setzt eine Seitenregel fuer span 1rem und der Text wirkt groesser als der Knopf */

/* Popup Wer kommt: Kopf mit Schliessen-Kreuz, damit der Weg zu auch bei langer Liste oben erreichbar bleibt */
.abw-dlg-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.abw-dlg-kopf h2 { margin: 0; }
.abw-x { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; font-size: 1.5rem; line-height: 1; }
.hb-anw-text { display: none; }

/* Handy */
@media (max-width: 1024px) {
    /* Hallenbelegung: der Knopf zugesagt | Kader ist eine ganze Zeile mit 44 px Tippflaeche */
    .content .hb-grid-team button.hb-anw { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between;
        margin: 6px 0 0; padding: 0 12px; border-radius: 10px; font-size: 0.85rem; }
    .content .hb-grid-team .hb-anw-text { display: inline; font-weight: 600; }
}
@media (max-width: 640px) {
    .abw-dlg { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 14px; }
    .abw-dlg-breit { width: calc(100vw - 16px); }
    .abw-uliste { grid-template-columns: 1fr; gap: 4px; }
    .abw-uliste li, .abw-uk, .abw-uk:hover, .abw-uk:focus-visible { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
    .abw-uliste li { padding: 8px 10px; }
    .abw-uliste li > .abw-uk { padding: 0; }
    .abw-andern { flex-direction: column; align-items: stretch; }
    .abw-andern select, .abw-andern input[type=text], .abw-andern .so-btn { width: 100%; min-height: 44px; }
    .abw-dlg .so-dlg-fuss .so-btn { min-height: 44px; }
}
