/* A163 Eigene Terminbuchung (termin-buchen.html). Handy zuerst; Farben nur über Tokens je Modus (L15: Schrift mindestens 4,5 : 1). */
:root {
  --tb-an-grund: #0d3b2c;
  --tb-an-text: #ffffff;
  --tb-karte: var(--flaeche);
  --tb-rand: #6f857b;
  --tb-voll-text: #5b4a3a;
  --tb-fehler-grund: #fff1ec;
  --tb-fehler-rand: #c2410c;
  --tb-fehler-text: #5a1a06;
  --tb-gut: #146c43;
  --tb-leiste: #12865a;
  --tb-leiste-grund: rgba(13, 59, 44, 0.14);
}
:root[data-thema='dunkel'] {
  --tb-an-grund: #7be0a8;
  --tb-an-text: #08140f;
  --tb-rand: #7f978b;
  --tb-voll-text: #e3cfb6;
  --tb-fehler-grund: #2a140c;
  --tb-fehler-rand: #fb923c;
  --tb-fehler-text: #ffe2d4;
  --tb-gut: #7be0a8;
  --tb-leiste: #7be0a8;
  --tb-leiste-grund: rgba(123, 224, 168, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema='hell']) {
    --tb-an-grund: #7be0a8;
    --tb-an-text: #08140f;
    --tb-rand: #7f978b;
    --tb-voll-text: #e3cfb6;
    --tb-fehler-grund: #2a140c;
    --tb-fehler-rand: #fb923c;
    --tb-fehler-text: #ffe2d4;
    --tb-gut: #7be0a8;
    --tb-leiste: #7be0a8;
    --tb-leiste-grund: rgba(123, 224, 168, 0.18);
  }
}

.tb { max-width: 760px; margin: 0 auto; padding: 96px 16px 48px; }
.tb__kopf { margin-bottom: 1.25rem; }
.tb__zurueck { display: inline-flex; align-items: center; color: var(--leise); text-decoration: none; padding: 0.4rem 0; min-height: 44px; margin-block: -6px; }
.tb__titel { font-family: var(--titel); font-size: clamp(1.9rem, 6vw, 2.8rem); margin: 0.2rem 0 0.4rem; }
.tb__unter { color: var(--leise); margin: 0; }
.tb__schritt, .tb__karte { background: var(--tb-karte); border: 1px solid var(--rand); border-radius: 20px; padding: 1.1rem 1rem; margin: 0 0 1rem; box-shadow: var(--schatten); }
.tb__h { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; margin: 0 0 0.8rem; }
.tb__nr { flex: none; display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--tb-an-grund); color: var(--tb-an-text); font-size: 0.95rem; font-weight: 800; }
.tb__leise, .tb__opt { color: var(--leise); font-size: 0.92rem; }
.tb__lade, .tb__leer { color: var(--leise); margin: 0.4rem 0; }

/* Auswahl: Arten, Partner, Tage, Zeiten. Gewählt = kräftige Fläche, Rand für alle anderen mindestens 3 : 1 */
.tb__arten { display: grid; gap: 0.6rem; }
.tb__art, .tb__chip, .tb__tag, .tb__zeit { font: inherit; color: var(--text); background: transparent; border: 2px solid var(--tb-rand); border-radius: 14px; cursor: pointer; text-align: left; transition: background 0.2s, border-color 0.2s, transform 0.15s; }
.tb__art { display: grid; gap: 0.2rem; padding: 0.8rem 0.9rem; }
.tb__art-name { font-weight: 800; font-size: 1.05rem; }
.tb__art-text { color: var(--leise); }
.tb__art-info { font-size: 0.9rem; color: var(--leise); }
.tb__art[aria-checked='true'], .tb__chip[aria-checked='true'], .tb__tag[aria-checked='true'], .tb__zeit[aria-checked='true'] { background: var(--tb-an-grund); border-color: var(--tb-an-grund); color: var(--tb-an-text); }
.tb__art[aria-checked='true'] .tb__art-text, .tb__art[aria-checked='true'] .tb__art-info, .tb__zeit[aria-checked='true'] small, .tb__zeit[aria-checked='true'] .tb__uhr2, .tb__zeit[aria-checked='true'] .tpz__klein { color: var(--tb-an-text); }
.tb__art:focus-visible, .tb__chip:focus-visible, .tb__tag:focus-visible, .tb__zeit:focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; }
.tb__partner { margin-top: 1rem; }
.tb__klein-t { font-weight: 700; margin: 0 0 0.5rem; }
.tb__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tb__chip { padding: 0.55rem 0.9rem; border-radius: 999px; min-height: 40px; }

.tb__tage { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.2rem 0.1rem 1rem; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; min-width: 0; flex: 1 1 auto; }
/* A229 (Christian 21.11.2026): Schiebeleiste der Tage immer sichtbar, doppelt so dick, mit Abstand unter den Tagen, gut erkennbare
   Farbe; dazu Pfeile ‹ › links und rechts. Chrome/Edge/Safari über ::-webkit-scrollbar, Firefox über scrollbar-color. */
.tb__tage-leiste { display: flex; align-items: flex-start; gap: 0.4rem; }
.tb__tage::-webkit-scrollbar { height: 14px; -webkit-appearance: none; }
.tb__tage::-webkit-scrollbar-track { background: var(--tb-leiste-grund); border-radius: 999px; }
.tb__tage::-webkit-scrollbar-thumb { background: var(--tb-leiste); border-radius: 999px; border: 2px solid var(--tb-leiste-grund); }
.tb__tage::-webkit-scrollbar-thumb:hover { background: var(--tb-an-grund); }
@supports not selector(::-webkit-scrollbar) { .tb__tage { scrollbar-width: auto; scrollbar-color: var(--tb-leiste) var(--tb-leiste-grund); } }
.tb__pfeil { flex: none; align-self: center; margin-bottom: 1rem; width: 40px; height: 56px; display: grid; place-items: center; font: inherit; font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--tb-an-text); background: var(--tb-an-grund); border: 0; border-radius: 12px; cursor: pointer; }
.tb__pfeil:disabled { opacity: 0.3; cursor: default; }
.tb__pfeil:focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; }
.tb__pfeil[hidden] { display: none; }
.tb__tag { flex: none; display: grid; justify-items: center; gap: 0.05rem; min-width: 66px; padding: 0.5rem 0.4rem; scroll-snap-align: start; text-align: center; }
.tb__tag-wt { font-size: 0.85rem; font-weight: 700; }
.tb__tag-tm { font-size: 1.1rem; font-weight: 800; }
.tb__tag-n { font-size: 0.78rem; }
.tb__tag--voll { border-style: dashed; color: var(--tb-voll-text); }
.tb__tag-titel { font-weight: 700; margin: 0.6rem 0 0.5rem; }
.tb__zeiten { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
.tb__zeiten > p { grid-column: 1 / -1; }
.tb__zeit { display: grid; gap: 0.1rem; padding: 0.55rem 0.7rem; min-height: 48px; }
.tb__uhr { font-size: 1.15rem; font-weight: 800; }
.tb__uhr2 { font-size: 0.9rem; color: var(--leise); }
.tb__zeit small { font-weight: 500; }
.tb__platz { font-size: 0.8rem; font-weight: 700; }

/* Formular */
.tb__gewaehlt { margin: 0 0 0.8rem; line-height: 1.5; }
.tb__felder { display: grid; gap: 0.7rem; }
@media (min-width: 640px) { .tb__felder { grid-template-columns: 1fr 1fr; } }
/* A290: Eingabefelder nebeneinander immer auf gleicher Höhe, auch wenn eine Beschriftung zweizeilig ist */
.tb__felder > label { align-content: end; }
/* A291: Land + Handynummer nebeneinander (schmal untereinander), E-Mail darunter über die ganze Breite; Eingabefelder behalten ihre normale Höhe */
.tb__tel, .tb__mail { grid-column: 1 / -1; min-width: 0; }
.tb__tel { display: grid; gap: 0.2rem 0.7rem; align-items: end; }
.tb__tel .hf { margin: 0; }
.tb__tel .hf__hinweis { grid-column: 1 / -1; margin: 0; }
@media (min-width: 640px) { .tb__tel { grid-template-columns: 1fr 1fr; } }
.tb__mail { display: grid; gap: 0.5rem; align-content: start; }
.tb__mail input:not([type='radio']) { align-self: start; }
.tb__art-mail { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.tb .tb__art-mail label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; min-height: 32px; }
.tb__art-mail input[type='radio'] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--tb-an-grund); }
.tb__link { justify-self: start; font: inherit; font-weight: 700; color: var(--text); background: none; border: 0; padding: 0.4rem 0; min-height: 36px; text-decoration: underline; cursor: pointer; }
.tb__link:focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; }
.tb__mail2 { display: grid; gap: 0.5rem; }
.tb__mail2[hidden] { display: none; }
#tb-fragen { display: grid; gap: 0.7rem; margin-top: 0.7rem; }
.tb label { display: grid; gap: 0.25rem; font-weight: 600; }
.tb input:not([type='checkbox']), .tb select { font: inherit; color: var(--text); background: var(--grund); border: 2px solid var(--tb-rand); border-radius: 12px; padding: 0.65rem 0.75rem; min-height: 46px; width: 100%; }
.tb input:focus, .tb select:focus { outline: 3px solid var(--sonne); outline-offset: 1px; }
.tb .tb__zustimmung { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin: 1rem 0; }
.tb__zustimmung input { width: 22px; height: 22px; flex: none; margin-top: 0.15rem; accent-color: var(--tb-an-grund); }
.tb__falle { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tb__buchen { width: 100%; justify-content: center; font-size: 1.1rem; }
.tb__feldfehler { color: var(--tb-fehler-text); background: var(--tb-fehler-grund); border-left: 4px solid var(--tb-fehler-rand); padding: 0.4rem 0.6rem; border-radius: 8px; margin: 0.3rem 0 0; font-weight: 600; }

.tb__fehler { background: var(--tb-fehler-grund); color: var(--tb-fehler-text); border: 2px solid var(--tb-fehler-rand); border-radius: 16px; padding: 0.9rem 1rem; margin: 0 0 1rem; }
.tb__fehler p { margin: 0.4rem 0; }
.tb__fehler a { color: inherit; font-weight: 700; }

.tb__haken { font-size: 2.4rem; color: var(--tb-gut); margin: 0; line-height: 1; }
.tb__zeitliste { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.25rem; }
.tb__knoepfe { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; }
.tb__fertig:focus { outline: none; }

.tb__dreh { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -0.15em; animation: tb-dreh 0.8s linear infinite; }
@keyframes tb-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .tb__dreh { animation-duration: 2.4s; }
  .tb__art, .tb__chip, .tb__tag, .tb__zeit { transition: none; }
}
.tb__zeitliste .tpz { display: grid; }
