/* Terminanfrage – Gestaltung, Version 2 (12.11.2026). Jede Demo setzt nur die Variablen auf .termin:
   --t-bg, --t-surface, --t-fg, --t-muted, --t-line, --t-accent, --t-accent-fg, --t-radius, --t-font, --t-font-head
   optional: --t-weich (zarte Akzentfläche), --t-leiste (Hintergrund der Leiste unten), --t-oben (Abstand für feste Kopfleisten) */
.termin{
  --t-bg:#fff; --t-surface:#fff; --t-fg:#111; --t-muted:#666; --t-line:#ddd; --t-accent:#111; --t-accent-fg:#fff;
  --t-radius:8px; --t-font:inherit; --t-font-head:inherit; --t-oben:84px;
  --t-weich:color-mix(in srgb, var(--t-accent) 9%, var(--t-surface));
  --t-leiste:var(--t-surface);
  font-family:var(--t-font); color:var(--t-fg); background:var(--t-bg); scroll-margin-top:var(--t-oben);
  font-size:1rem; line-height:1.45; -webkit-tap-highlight-color:transparent
}
.termin *, .termin *::before, .termin *::after{box-sizing:border-box}
.termin button{font:inherit; color:inherit}
.t-form{display:flex; flex-direction:column; gap:22px; margin:0}
.termin [hidden]{display:none !important}

/* Schritte oben */
.t-schritte{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px}
.t-schritt-marke{min-width:0}
.t-schritt-knopf{width:100%; display:flex; flex-direction:column; align-items:flex-start; gap:7px; padding:0; border:0; background:none; cursor:default; text-align:left}
.t-schritt-knopf::before{content:""; display:block; width:100%; height:4px; border-radius:2px; background:var(--t-line); transition:background .2s}
.t-schritt-nr{display:none}
.t-schritt-name{font-size:.78rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--t-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%}
.ist-aktiv .t-schritt-knopf::before, .ist-fertig .t-schritt-knopf::before{background:var(--t-accent)}
.ist-aktiv .t-schritt-name{color:var(--t-fg)}
.ist-fertig .t-schritt-knopf{cursor:pointer}
.ist-fertig .t-schritt-knopf:hover .t-schritt-name{color:var(--t-fg); text-decoration:underline}

/* Abschnitt */
.t-abschnitt{display:flex; flex-direction:column; gap:14px; min-width:0}
.t-titel{font-family:var(--t-font-head); font-size:1.35rem; line-height:1.2; margin:0; outline:none}
.t-hilfe{margin:-6px 0 0; color:var(--t-muted); font-size:.92rem}
.t-rein{animation:t-rein .22s ease-out}
@keyframes t-rein{from{transform:translateX(10px)} to{transform:none}}

/* Schritt 1: Leistungen als Zeilen */
.t-gruppe{border:0; margin:0; padding:0; min-width:0; display:flex; flex-direction:column}
.t-gruppe-name{padding:0; margin:0 0 6px; font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--t-muted)}
.t-leistung{position:relative; display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:12px; min-height:56px; padding:10px 14px;
  background:var(--t-surface); border:1.5px solid var(--t-line); cursor:pointer; transition:border-color .15s, background .15s}
.t-gruppe .t-leistung + .t-leistung{margin-top:-1.5px}
.t-gruppe .t-leistung:first-of-type{border-radius:var(--t-radius) var(--t-radius) 0 0}
.t-gruppe .t-leistung:last-of-type{border-radius:0 0 var(--t-radius) var(--t-radius)}
.t-gruppe .t-leistung:only-of-type{border-radius:var(--t-radius)}
.t-cb{position:absolute; opacity:0; width:1px; height:1px; margin:0; pointer-events:none}
.t-haken{width:24px; height:24px; border-radius:50%; border:1.5px solid var(--t-line); display:grid; place-items:center; color:transparent; background:var(--t-surface); transition:background .15s, border-color .15s}
.t-haken svg{width:16px; height:16px}
.t-leistung-text{display:flex; flex-direction:column; min-width:0}
.t-leistung-name{font-weight:600; line-height:1.25}
.t-leistung-dauer{font-size:.8rem; color:var(--t-muted)}
.t-preis{font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap}
.t-leistung:has(.t-cb:checked){background:var(--t-weich); border-color:var(--t-accent); z-index:1}
.t-cb:checked + .t-haken, .t-ok input:checked + .t-haken{background:var(--t-accent); border-color:var(--t-accent); color:var(--t-accent-fg)}
.t-leistung:has(.t-cb:focus-visible), .t-ok:has(input:focus-visible){outline:2px solid var(--t-accent); outline-offset:2px; z-index:2}
@media (hover:hover){ .t-leistung:hover{border-color:color-mix(in srgb, var(--t-accent) 45%, var(--t-line)); z-index:1} }

/* Schritt 2: Tage und Zeiten, seitlich wischbar */
.t-zeile-kopf{display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:28px}
.t-unterkopf{font-size:.78rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--t-muted)}
.t-anzahl{font-size:.8rem; color:var(--t-muted)}
.t-pfeile{display:none; gap:6px}
.t-pfeil{width:36px; height:36px; border-radius:50%; border:1.5px solid var(--t-line); background:var(--t-surface); display:grid; place-items:center; cursor:pointer}
.t-pfeil svg{width:18px; height:18px}
.t-pfeil:hover{border-color:var(--t-accent)}
.t-wisch{display:flex; gap:8px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x proximity; scroll-padding:0 2px;
  padding:2px 2px 10px; margin:0 -2px; scrollbar-width:thin; scrollbar-color:var(--t-line) transparent;
  -webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image:linear-gradient(90deg, #000 calc(100% - 28px), transparent)}
.t-wisch > *{scroll-snap-align:start; flex:none}
@media (hover:none){ .t-wisch{scrollbar-width:none} .t-wisch::-webkit-scrollbar{display:none} }
.t-tag{width:62px; min-height:76px; padding:8px 4px; border:1.5px solid var(--t-line); border-radius:var(--t-radius); background:var(--t-surface);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; cursor:pointer; transition:border-color .15s, background .15s}
.t-tag-wt{font-size:.72rem; font-weight:600; color:var(--t-muted); white-space:nowrap}
.t-tag-nr{font-size:1.3rem; font-weight:700; line-height:1.1; font-variant-numeric:tabular-nums}
.t-tag-mon{font-size:.72rem; color:var(--t-muted)}
.t-tag[aria-pressed="true"]{background:var(--t-accent); border-color:var(--t-accent); color:var(--t-accent-fg)}
.t-tag[aria-pressed="true"] .t-tag-wt, .t-tag[aria-pressed="true"] .t-tag-mon{color:inherit; opacity:.85}
.t-tag:disabled{cursor:not-allowed; background:transparent; border-style:dashed; opacity:.5}
.t-zeiten-box{display:flex; flex-direction:column; gap:14px; margin-top:4px}
.t-zeitgruppe{display:flex; flex-direction:column; gap:6px; min-width:0}
.t-zeit{min-width:76px; min-height:46px; padding:0 12px; border:1.5px solid var(--t-line); border-radius:999px; background:var(--t-surface);
  font-weight:600; font-variant-numeric:tabular-nums; cursor:pointer; transition:border-color .15s, background .15s}
.t-zeit[aria-pressed="true"]{background:var(--t-accent); border-color:var(--t-accent); color:var(--t-accent-fg)}
@media (hover:hover){ .t-tag:not(:disabled):hover, .t-zeit:hover{border-color:var(--t-accent)} }
.t-hinweis{margin:0; color:var(--t-muted); font-size:.88rem}

/* Schritt 3: Kontakt */
.t-felder{display:grid; grid-template-columns:minmax(0,1fr); gap:14px}
.t-feld{display:flex; flex-direction:column; gap:6px; min-width:0}
.t-feld label{font-size:.9rem; font-weight:600}
.t-frei{font-weight:400; color:var(--t-muted)}
.t-feld input, .t-feld textarea{width:100%; font:inherit; font-size:16px; color:var(--t-fg); background:var(--t-surface); border:1.5px solid var(--t-line);
  border-radius:var(--t-radius); padding:12px 14px; min-height:50px; transition:border-color .15s, box-shadow .15s}
.t-feld textarea{min-height:76px; resize:vertical}
.t-feld input::placeholder, .t-feld textarea::placeholder{color:var(--t-muted); opacity:.7}
.t-feld input:focus, .t-feld textarea:focus{outline:none; border-color:var(--t-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--t-accent) 22%, transparent)}
.t-feld.hat-fehler input{border-color:#B3232B}
.t-feldfehler{color:#B3232B; font-size:.84rem; line-height:1.35}
.t-ok{display:grid; grid-template-columns:24px minmax(0,1fr); gap:12px; align-items:start; font-size:.9rem; color:var(--t-muted); cursor:pointer; padding:4px 0; position:relative}
.t-ok input{position:absolute; opacity:0; width:1px; height:1px; margin:0}
.t-ok .t-haken{border-radius:6px}
.t-ok a{color:var(--t-fg)}
.t-ok.hat-fehler .t-haken{border-color:#B3232B}
.t-topf{position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden}

/* Leiste unten: klebt am Handy am unteren Rand */
.t-leiste{position:sticky; bottom:0; z-index:5; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px;
  margin:4px -6px 0; padding:12px 6px calc(12px + env(safe-area-inset-bottom, 0px)); background:var(--t-leiste);
  border-top:1px solid var(--t-line); box-shadow:0 -10px 18px -16px rgba(0,0,0,.45)}
.t-zurueck{width:44px; height:48px; border-radius:var(--t-radius); border:1.5px solid var(--t-line); background:var(--t-surface); display:grid; place-items:center; cursor:pointer}
.t-zurueck svg{width:20px; height:20px}
.t-zurueck[hidden] + .t-stand{grid-column:1 / 3}
.t-stand{display:flex; flex-direction:column; min-width:0; line-height:1.25}
.t-stand-oben{font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.t-stand-unten{font-size:.82rem; color:var(--t-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.t-weiter{min-height:48px; padding:0 22px; border:0; border-radius:var(--t-radius); background:var(--t-accent); color:var(--t-accent-fg) !important; font-weight:700; cursor:pointer; white-space:nowrap; transition:opacity .15s, transform .1s}
.t-weiter:active{transform:translateY(1px)}
.t-weiter.ist-gesperrt{opacity:.45}
.ist-laedt .t-weiter{opacity:.7; cursor:progress}
.t-zurueck:focus-visible, .t-weiter:focus-visible, .t-tag:focus-visible, .t-zeit:focus-visible, .t-pfeil:focus-visible, .t-schritt-knopf:focus-visible, .t-nochmal:focus-visible{outline:2px solid var(--t-accent); outline-offset:2px}
.t-fehler{margin:0; color:#B3232B; font-size:.9rem; font-weight:600}

/* Fertig */
.t-fertig{display:flex; flex-direction:column; gap:12px; padding:6px 0; outline:none}
.t-fertig-icon{width:52px; height:52px; border-radius:50%; background:var(--t-accent); color:var(--t-accent-fg); display:grid; place-items:center}
.t-fertig-icon svg{width:28px; height:28px}
.t-fertig .t-hilfe{margin:0; overflow-wrap:anywhere}
.t-zusammen{display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 16px; margin:4px 0 0; padding:14px 16px; border:1.5px solid var(--t-line); border-radius:var(--t-radius); background:var(--t-weich)}
.t-zusammen dt{color:var(--t-muted); font-size:.85rem; padding-top:1px}
.t-zusammen dd{margin:0; font-weight:600}
.t-demo{margin:0; font-size:.82rem; color:var(--t-muted)}
.t-nochmal{align-self:flex-start; min-height:44px; padding:0 18px; border:1.5px solid var(--t-line); border-radius:var(--t-radius); background:var(--t-surface); font-weight:600; cursor:pointer}
.t-karte{display:grid; grid-template-columns:44px minmax(0,1fr); gap:14px; align-items:start; margin-top:6px; padding:16px; border:1.5px dashed var(--t-accent); border-radius:var(--t-radius); background:var(--t-weich)}
.t-karte-icon{width:44px; height:44px; border-radius:50%; background:var(--t-accent); color:var(--t-accent-fg); display:grid; place-items:center}
.t-karte-icon svg{width:24px; height:24px}
.t-karte-text{display:flex; flex-direction:column; gap:4px; min-width:0}
.t-karte-text strong{font-size:1rem; line-height:1.3}
.t-karte-text p{margin:0; font-size:.9rem}
.t-karte-klein{color:var(--t-muted); font-size:.82rem !important}
.t-karte-link{align-self:flex-start; display:inline-flex; align-items:center; gap:6px; min-height:44px; margin-top:4px; padding:0 16px; border-radius:var(--t-radius);
  background:var(--t-accent); color:var(--t-accent-fg) !important; font-weight:700; text-decoration:none}
.t-karte-link svg{width:16px; height:16px}
.t-karte-link:hover{filter:brightness(1.08)}
.t-karte-link:focus-visible{outline:2px solid var(--t-accent); outline-offset:2px}

/* Ab Tablet: Zeiten als Raster statt Wischreihe, Pfeile für die Tage, zwei Felder nebeneinander */
@media (min-width:640px){
  .t-pfeile{display:flex}
  .t-zeiten{flex-wrap:wrap; overflow:visible; -webkit-mask-image:none; mask-image:none; padding-bottom:2px}
  .t-felder{grid-template-columns:1fr 1fr}
  .t-feld.ganz, .t-feld:first-child{grid-column:1 / -1}
  .t-titel{font-size:1.5rem}
}
@media (max-width:380px){
  .t-leistung{padding:10px 12px; gap:10px}
  .t-weiter{padding:0 16px}
  .t-tag{width:56px}
}
@media (prefers-reduced-motion:reduce){
  .t-rein{animation:none}
  .termin *{transition:none !important}
}
