/* =====================================================================
   Schritt-fuer-Schritt-Formular  ·  Baustein v2 (06.10.2026, v1 11.08.2026)
   ---------------------------------------------------------------------
   Nutzt die Variablen des Projekts (--gold, --ink, --line ...). Wenn ein
   Projekt andere Namen verwendet: die Variablen im Projekt-CSS auf die
   eigenen abbilden, z. B.
     form[data-schritte] { --ink: var(--tinte); --line: var(--linie); --gold: var(--glut); ... }
   Diese Datei dann unveraendert kopieren. Die Kartenfarben (Hover, Auswahl)
   kommen seit v2 aus --wahl-hover / --wahl-aktiv / --wahl-ring (vorher fest
   Gold - passte auf einer braunen oder gruenen Seite nicht).

   WICHTIG: Ausgeblendet wird NUR, wenn JavaScript die Klasse
   .schritte-aktiv gesetzt hat. Ohne JavaScript stehen alle Fragen
   untereinander und das Formular bleibt voll benutzbar.
   ===================================================================== */

/* Ohne JS: Fieldsets sollen wie normale Abschnitte aussehen */
.schritt { border: 0; margin: 0 0 18px; padding: 0; }
.schritt legend { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0 0 12px; padding: 0; }

/* Mit JS: nur der aktive Schritt ist sichtbar */
.schritte-aktiv .schritt[hidden] { display: none; }
.schritte-aktiv .schritt { margin-bottom: 0; animation: schritt-ein .28s ease; }
@keyframes schritt-ein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .schritte-aktiv .schritt { animation: none; } }

/* Fortschritt */
.schritt-kopf { margin: 0 0 22px; }
.schritt-balken { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.schritt-balken i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 999px; transition: width .3s ease; }
.schritt-zahl { margin: 8px 0 0; font-size: .8rem; font-weight: 600; color: var(--ink-m); letter-spacing: .04em; }

/* Navigation */
.schritt-nav { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.schritt-weiter, .schritt-zurueck {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px;
  padding: 13px 26px; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.schritt-weiter { background: var(--gold); color: var(--navy); }
.schritt-weiter:hover { filter: brightness(.92); }   /* passt zu jeder Akzentfarbe - vorher festes Gold #d29a19 (14.09.2026) */
.schritt-zurueck { background: none; color: var(--ink-m); border-color: var(--line); order: -1; }
.schritt-zurueck:hover { color: var(--ink); border-color: var(--ink-m); }
.schritt-weiter:focus-visible, .schritt-zurueck:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }

/* Auswahl als anklickbare Karten statt winziger Radiobuttons.
   Die Radiobuttons bleiben im DOM (Tastatur + Screenreader), nur optisch ersetzt. */
.wahl { display: grid; gap: 10px; }
@media (min-width: 560px) { .wahl--zwei { grid-template-columns: 1fr 1fr; } }
.wahl label {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: .95rem;
  color: var(--ink); background: var(--paper); transition: border-color .18s, background .18s, box-shadow .18s;
  margin: 0;
}
.wahl label:hover { border-color: var(--gold); background: var(--wahl-hover, #FFFCF4); }
.wahl input[type=radio], .wahl input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--gold-deep); margin: 0; }
/* Karte mit Titel + Unterzeile: <span><b>Titel</b><small>Unterzeile</small></span> (v2, aus GemeinschaftsEi) */
.wahl label span { min-width: 0; }
.wahl label span small { display: block; font-weight: 400; color: var(--ink-m); margin-top: .15em; font-size: .88rem; line-height: 1.4; }
.wahl input[type=radio]:checked + span { color: var(--gold-deep); }
.wahl label:has(input:checked) { border-color: var(--gold); background: var(--wahl-aktiv, #FFF8E8); box-shadow: 0 0 0 2px var(--wahl-ring, rgba(233,169,28,.25)); }
.wahl input[type=radio]:checked + span small { color: var(--ink-m); }
.wahl input[type=radio]:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }

/* Hinweis unter einer Frage */
.schritt-hinweis { margin: -4px 0 14px; font-size: .86rem; color: var(--ink-m); }

/* Zusammenfassung im letzten Schritt (v2): <div data-schritte-uebersicht></div> */
.schritt-uebersicht { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 6px 14px; margin: 0 0 18px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); font-size: .92rem; }
.schritt-uebersicht dt { color: var(--ink-m); font-weight: 600; }
.schritt-uebersicht dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.schritt-aendern { font: inherit; font-size: .82rem; background: none; border: 0; padding: 0 .2em; color: var(--gold-deep); text-decoration: underline; cursor: pointer; }
@media (max-width: 480px) { .schritt-uebersicht { grid-template-columns: 1fr; } .schritt-uebersicht dd { margin-bottom: 6px; } }
