/* Anfrageformular: Band, Karte, Fortschritt mit Transporter, Schritte, Felder,
   Kacheln, Ergebnis */

/* --- Band ---------------------------------------------------------------- */

.rechner--navy { background: var(--navy); color: var(--weiss); }
.rechner--navy h2 { color: var(--weiss); }
.rechner--navy .rechner__einleitung a:not(.knopf) { color: var(--weiss); }
.rechner--hell { background: var(--papier); }

.rechner__innen {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(1.75rem, 1rem + 3vw, 4rem);
  align-items: start;
}
.rechner--hell .rechner__innen { grid-template-columns: minmax(0, 1fr); }
.rechner--hell .schalter { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.rechner__einleitung p { color: rgba(255, 255, 255, 0.88); }
.rechner__direkt { display: grid; gap: 0.2rem; margin-top: 1.5rem; font-weight: 600; }
.rechner__direkt a { white-space: nowrap; }
@media (max-width: 899px) {
  .rechner__innen { grid-template-columns: minmax(0, 1fr); }
}

.rechner__karte {
  background: var(--weiss);
  color: var(--text);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-hoch);
  overflow: hidden;
  scroll-margin-top: calc(var(--kopf-hoehe) + 1rem);
}
.rechner__karte a { color: var(--navy); }

/* --- Fortschritt: Transporter faehrt von Station zu Station -------------- */

.fortschritt { padding: 1.1rem clamp(1.15rem, 0.8rem + 1.6vw, 2.25rem) 1.25rem; border-bottom: 1px solid var(--linie); background: var(--papier); }
.fortschritt__zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  max-width: none;
  justify-content: flex-end;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--text-leise);
}
.fortschritt__schiene {
  position: relative;
  height: 30px;
  --wagen: 30px;
}
/* Strecke von Stationsmitte zu Stationsmitte */
.fortschritt__schiene::before {
  content: "";
  position: absolute;
  left: calc(var(--wagen) / 2);
  right: calc(var(--wagen) / 2);
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background-image: linear-gradient(90deg, var(--linie-stark) 60%, transparent 0);
  background-size: 12px 3px;
}
.fortschritt__balken {
  position: absolute;
  left: calc(var(--wagen) / 2);
  right: calc(var(--wagen) / 2);
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: var(--orange);
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform var(--dauer-fahrt) var(--ease);
}
.fortschritt__station {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--weiss);
  border: 2px solid var(--linie-stark);
}
.fortschritt__station:nth-of-type(2) { left: calc(var(--wagen) / 2); }
.fortschritt__station:nth-of-type(3) { left: calc(var(--wagen) / 2 + (100% - var(--wagen)) / 3); }
.fortschritt__station:nth-of-type(4) { left: calc(var(--wagen) / 2 + (100% - var(--wagen)) * 2 / 3); }
.fortschritt__station:nth-of-type(5) { left: calc(100% - var(--wagen) / 2); }
.fortschritt__wagen {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--wagen);
  height: var(--wagen);
  border-radius: 50%;
  background: var(--navy);
  color: var(--weiss);
  transition: transform var(--dauer-fahrt) var(--ease);
}
.fortschritt__wagen svg { width: 18px; height: 18px; }

/* --- Schritte ------------------------------------------------------------ */

.schritt { padding: 0 clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem) clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem); border: 0; margin: 0; min-width: 0; }
.schritt__kopf { padding: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem) 0 0; display: grid; gap: 0.3rem; }
.schritt__titel {
  font: 700 clamp(1.45rem, 1.25rem + 0.9vw, 1.9rem) / 1.1 var(--font-display);
  color: var(--navy);
}
.schritt__sub { font-size: var(--fs-ui); color: var(--text-leise); line-height: 1.5; }
.schritt__hinweis { margin: 1.5rem 0 0; font-size: var(--fs-ui); color: var(--text-leise); }

.feldreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; margin-top: 1.25rem; }
.feld { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.feld--voll { grid-column: 1 / -1; }
.feld > label { font-size: var(--fs-ui); font-weight: 600; color: var(--navy); }
.pflichtmarke { color: var(--fehler); }
.feld__hinweis { font-size: var(--fs-caption); color: var(--text-leise); }

.feld input,
.feld select,
.feld textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--weiss);
  border: 1.5px solid var(--linie-feld);
  border-radius: var(--radius-m);
  padding: 0.7rem 0.8rem;
  min-height: 50px;
  width: 100%;
}
.feld textarea { min-height: 104px; resize: vertical; }
.feld select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.feld input:hover, .feld select:hover, .feld textarea:hover { border-color: var(--navy); }
.feld [aria-invalid="true"] { border-color: var(--fehler); background: var(--fehler-nebel); }
.feldfehler { font-size: var(--fs-caption); font-weight: 600; color: var(--fehler); }
.feldfehler:empty { display: none; }

/* --- Auswahlkacheln (Schritt 1) und Schalter (Schritt 3) ------------------ */

/* Feste Spaltenzahl: alle Kacheln bleiben exakt gleich gross. */
.kacheln {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
@media (max-width: 559px) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
}
.kachel { position: relative; }
.kachel input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kachel span {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.35rem;
  height: 100%;
  padding: 0.9rem;
  border: 1.5px solid var(--linie-feld);
  border-radius: var(--radius-m);
  background: var(--weiss);
  transition: border-color var(--dauer-schnell) var(--ease), background-color var(--dauer-schnell) var(--ease);
}
.kachel__ikon { width: 28px; height: 28px; color: var(--orange-ikon); margin-bottom: 0.2rem; }
.kachel strong { font-weight: 600; line-height: 1.25; color: var(--navy); }
.kachel small { font-size: var(--fs-caption); color: var(--text-leise); line-height: 1.35; }
.kachel input:hover + span { border-color: var(--navy); }
.kachel input:checked + span { border-color: var(--navy); background: var(--navy-nebel); box-shadow: inset 0 0 0 1.5px var(--navy); }
.kachel input:checked + span .kachel__ikon { color: var(--navy); }
.kachel input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 3px; }

.schalter { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0.6rem; margin-top: 1.25rem; }
.schalter label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 56px;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--linie-feld);
  border-radius: var(--radius-m);
  font-size: var(--fs-ui);
  cursor: pointer;
}
.schalter label:hover { border-color: var(--navy); }
.schalter input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--navy); }
.schalter__ikon { width: 24px; height: 24px; flex: none; color: var(--orange-ikon); }
.schalter label:has(input:checked) { border-color: var(--navy); background: var(--navy-nebel); }

/* --- Navigation im Formular ---------------------------------------------- */

.schritt__navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1.1rem clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem);
  border-top: 1px solid var(--linie);
  background: var(--papier);
}
.schritt__navigation .knopf--primaer { margin-left: auto; }
@media (max-width: 479px) {
  .schritt__navigation { flex-direction: column-reverse; align-items: stretch; }
  .schritt__navigation .knopf { width: 100%; margin-left: 0; }
}

.formularfehler {
  margin: 0 clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem) 1rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--fehler);
  background: var(--fehler-nebel);
  color: var(--fehler);
  font-size: var(--fs-ui);
  font-weight: 600;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  max-width: none;
}
.formularfehler:empty { display: none; }

/* --- Ergebnis ------------------------------------------------------------ */

.ergebnis { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.ergebnis__kopf { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; }
.ergebnis__haken { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--orange); color: var(--navy); display: grid; place-items: center; }
.ergebnis__haken svg { width: 26px; height: 26px; }
.ergebnis__titel { margin: 0; font: 700 clamp(1.45rem, 1.25rem + 0.9vw, 1.9rem) / 1.1 var(--font-display); max-width: none; }
.ergebnis__wege { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.ergebnis__weitere { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; margin-top: 1rem; max-width: none; }
.ergebnis__meldung { font-size: var(--fs-caption); font-weight: 600; color: var(--erfolg); }
.ergebnis__fuss { margin-top: 1.5rem; font-size: var(--fs-caption); color: var(--text-leise); }

.zusammenfassung { margin-top: 1.25rem; border: 1px solid var(--linie); border-radius: var(--radius-m); background: var(--papier); }
.zusammenfassung summary { padding: 0.85rem 1rem; font-weight: 600; color: var(--navy); cursor: pointer; }
.zusammenfassung dl { display: grid; grid-template-columns: minmax(8rem, auto) 1fr; gap: 0.45rem 1rem; margin: 0; padding: 0 1rem 1rem; font-size: var(--fs-ui); }
.zusammenfassung dt { font-weight: 600; color: var(--text-leise); }
.zusammenfassung dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 479px) {
  .zusammenfassung dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .zusammenfassung dd { margin-bottom: 0.55rem; }
}
