/* ==========================================================================
   Fahrschule Protect — Online-Anmeldung (Wizard)
   Seitenspezifisches CSS, wird NACH style.css eingebunden.
   Signatur: „Fahrbahn"-Fortschrittsanzeige — Asphalt-Leiste mit gelber
   Mittellinie, 4 Stations-Punkte und Pylonen-Marker.
   ========================================================================== */

/* ---------- Utility ---------- */
.hidden { display: none !important; }

/* ---------- Kompakter Page-Hero (ohne Bild) ---------- */
.page-hero--slim .page-hero__inner { padding-block: clamp(2.8rem, 7vh, 4.5rem); }

/* ---------- Wizard-Karte ---------- */
.wizard-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  padding: clamp(1.4rem, 4vw, 3rem);
}
.wizard-intro p:first-child { color: var(--c-body); }
.wizard-note { font-size: 0.85rem; color: var(--c-muted); }
.wizard-noscript {
  background: var(--c-vermilion-tint);
  border: 1px solid rgba(230, 59, 15, 0.35);
  border-radius: var(--radius-s);
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  margin: 1rem 0;
}

/* ---------- Entwurf-Leiste ---------- */
.draft-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  background: rgba(255, 210, 30, 0.16);
  border: 1px solid rgba(255, 210, 30, 0.6);
  border-radius: var(--radius-s);
  padding: 0.65rem 1rem;
  margin-bottom: 1.4rem;
  font-size: 0.9rem;
  color: var(--c-ink);
}
.draft-bar p { margin: 0; }

/* ---------- Fortschritt: Fahrbahn ---------- */
.fahrbahn {
  --fb-pos: 0;          /* aktueller Schritt (0–3), setzt Marker-Position */
  --fb-dot: 36px;       /* Durchmesser der Stations-Punkte */
  --fb-space: 38px;     /* Platz über den Punkten für den Marker */
  position: relative;
  margin: 2.2rem 0 2.4rem;
}
.fahrbahn__stops {
  list-style: none;
  margin: 0;
  padding: var(--fb-space) 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 1;
}
/* Asphalt-Leiste von Punktmitte zu Punktmitte */
.fahrbahn__road {
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: calc(var(--fb-space) + var(--fb-dot) / 2 - 7px);
  height: 14px;
  border-radius: 999px;
  background: var(--c-asphalt);
  display: flex;
  overflow: hidden;
}
.fahrbahn__seg { position: relative; flex: 1; }
.fahrbahn__seg::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: var(--lane-dash-idle);
  background-size: 38px 3px;
  background-repeat: repeat-x;
}
.fahrbahn__seg.is-done::after {
  background: var(--lane-dash);
  background-size: 38px 3px;
  background-repeat: repeat-x;
}
.fahrbahn__stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
}
.fahrbahn__dot {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--fb-dot);
  height: var(--fb-dot);
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--c-line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-muted);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.fahrbahn__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-muted);
  line-height: 1.3;
}
.fahrbahn__stop.is-current .fahrbahn__dot {
  background: var(--c-vermilion);
  border-color: var(--c-vermilion);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(230, 59, 15, 0.16);
}
.fahrbahn__stop.is-current .fahrbahn__label { color: var(--c-ink); }
.fahrbahn__stop.is-done .fahrbahn__dot {
  background: var(--c-asphalt);
  border-color: var(--c-asphalt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd21e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 17px;
  background-position: center;
  background-repeat: no-repeat;
}
.fahrbahn__stop.is-done .fahrbahn__num { visibility: hidden; }
/* Pylonen-Marker fährt über der Fahrbahn mit */
.fahrbahn__marker {
  position: absolute;
  top: 2px;
  left: calc(12.5% + var(--fb-pos) * 25%);
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  color: var(--c-vermilion);
  transition: left 0.55s var(--ease-out);
  z-index: 3;
  pointer-events: none;
}
.fahrbahn__marker svg { width: 100%; height: 100%; }

@media (max-width: 600px) {
  .fahrbahn { --fb-dot: 30px; --fb-space: 32px; }
  .fahrbahn__road { height: 12px; top: calc(var(--fb-space) + var(--fb-dot) / 2 - 6px); }
  .fahrbahn__marker { width: 26px; height: 26px; top: 4px; }
  .fahrbahn__dot { font-size: 0.9rem; }
  /* Kompakt: nur Nummern, Label nur am aktiven Punkt */
  .fahrbahn__label { display: none; }
  .fahrbahn__stop.is-current .fahrbahn__label { display: block; }
}

/* ---------- Schritte ---------- */
/* style.css setzt „.field label" auf display:block (kleine Feld-Labels).
   Auswahl-Kacheln und Checkzeilen sind hier Labels IN .field-Wrappern —
   deshalb Flex-Layout und Typo gezielt wiederherstellen. */
.field label.choice,
.field label.checkrow {
  display: flex;
  margin-bottom: 0;
  font-weight: 400;
  color: var(--c-body);
}
.field label.choice { font-size: inherit; }
.field label.checkrow { font-size: 0.95rem; }

.step-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-vermilion);
  margin: 0 0 0.3rem;
}
.wizard-step h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.35em;
}
.wizard-step h2:focus { outline: none; }
.wizard-step > p { font-size: 0.975rem; }

.choice-group { margin: 1.6rem 0 0; }
.group-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink);
  margin: 0 0 0.85rem;
}
.group-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--c-line) 0 9px, transparent 9px 15px);
}
.group-note { font-size: 0.78rem; color: var(--c-muted); margin: 0.55rem 0 0; }

/* Filial-Karten (große Auswahl-Kacheln) */
.choice-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice--card { padding: 1.7rem 1.2rem 1.4rem; }
.choice--card .choice__label { font-size: 1.2rem; }
@media (max-width: 560px) {
  .choice-grid--2 { grid-template-columns: 1fr; }
}

/* Zeitmodell & Checkboxen */
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.option-stack { display: grid; gap: 0.7rem; }
@media (max-width: 560px) {
  .option-grid { grid-template-columns: 1fr; }
}
.checkrow strong { display: block; }
.checkrow small {
  display: block;
  font-size: 0.82rem;
  color: var(--c-muted);
  line-height: 1.45;
}

/* Fehlerzustand für Kachel-/Zeilen-Gruppen */
.field.has-error .choice { border-color: rgba(208, 52, 44, 0.55); }
.field.has-error .checkrow { border-color: var(--c-error); }

/* Formular-Raster Schritt 3 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; }
.form-grid .field--full { grid-column: 1 / -1; }
.field--anrede .select { max-width: 240px; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .field--anrede .select { max-width: none; }
}

/* Altershinweis (freundlich, kein Fehler) */
.age-hint {
  grid-column: 1 / -1;
  background: rgba(255, 210, 30, 0.14);
  border-left: 3px solid var(--c-signal);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--c-ink);
  margin: 0 0 1.25rem;
}

/* Schritt-Navigation */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-line);
}
.wizard-actions .btn:only-child { margin-left: auto; }
@media (max-width: 480px) {
  .wizard-actions { flex-wrap: wrap-reverse; }
  .wizard-actions .btn { flex: 1 1 auto; }
}

/* ---------- Zusammenfassung ---------- */
.summary-block {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
}
.summary-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.summary-block__head h3 { font-size: 1.05rem; margin: 0; }
.summary-edit {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-vermilion);
  cursor: pointer;
}
.summary-edit:hover { color: var(--c-vermilion-deep); text-decoration: underline; text-underline-offset: 2px; }
.summary-list { margin: 0; }
.summary-list > div {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 0.35rem 1rem;
  padding: 0.45rem 0;
  border-top: 1px dashed var(--c-line);
  font-size: 0.95rem;
}
.summary-list > div:first-child { border-top: 0; }
.summary-list dt { font-weight: 600; color: var(--c-ink); }
.summary-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .summary-list > div { grid-template-columns: 1fr; gap: 0.1rem; }
}
#field-datenschutz { margin-top: 1.6rem; }

/* ---------- Erfolgs-Screen ---------- */
.wizard-success { text-align: center; padding: 1rem 0 0.5rem; }
.success-badge {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: var(--c-success);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 1.4rem;
  box-shadow: 0 14px 36px -14px rgba(29, 158, 95, 0.6);
}
.success-badge svg { width: 42px; height: 42px; }
.wizard-success h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.wizard-success h2:focus { outline: none; }
.success-steps {
  max-width: 480px;
  margin: 2.2rem auto 0;
  text-align: left;
}
.success-steps h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 1.6rem;
}
.demo-note { font-size: 0.8rem; color: var(--c-muted); margin-top: 1.4rem; }

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fahrbahn__marker { transition: none; }
}
