/* Registrierungsseite (registrierung.html + danke.html)
   Umsetzung gemäss docs/uebergabe-registrierungsseite.md und
   docs/ki-hafen-registrierung-prototyp.html (massgebliche visuelle Referenz).
   Baut auf styles.css auf (.wrap, .card, .eyebrow, .dot); alles Seitenspezifische
   trägt das Präfix .reg- um Kollisionen mit den geteilten Klassen zu vermeiden.
   Sekundärtext hier bewusst #6E6357 statt var(--caption) (WCAG-AA, Entscheid Übergabe). */

.reg-page { font-size: 16px; line-height: 1.55; }
.reg-muted { color: #6E6357; }

/* ---- Header / Bestätigung ---- */
.reg-head { padding: 36px 0 28px; }
.reg-crumb { font-size: 13.5px; color: #6E6357; margin-bottom: 14px; }
.reg-crumb a { color: #6E6357; text-decoration: none; }
.reg-crumb a:hover { color: var(--magenta); }
.reg-head-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: center; }
.reg-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--magenta); margin-bottom: 10px; }
.reg-pill { display: inline-block; background: var(--yellow); color: var(--ink); font-size: 13px; font-weight: 600; padding: 4px 14px; border-radius: 999px; }
.reg-pill.gratis { background: var(--teal); color: #fff; }
.reg-pill.eb { background: var(--ocher); color: #fff; margin-left: 8px; }
.reg-pill.warn { background: var(--orange); color: #fff; margin-left: 8px; }
.reg-pill.out { background: var(--ink); color: #fff; margin-left: 8px; }
.reg-head h1 { font-family: var(--serif); font-size: 42px; line-height: 1.15; margin: 14px 0 10px; }
.reg-meta { font-size: 17px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.reg-meta span { display: inline-flex; align-items: center; gap: 7px; }
.reg-meta .d { width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); flex: none; }
.reg-meta .d.t { background: var(--teal); }
.reg-meta .d.o { background: var(--ocher); }
.reg-confirm { margin-top: 14px; font-size: 16px; color: var(--muted); }
.reg-avatar { position: relative; text-align: center; }
.reg-avatar img { width: 210px; height: auto; margin: 0 auto; }
.reg-bubble { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; font-size: 14px; margin-bottom: 10px; }
.reg-bubble:after { content: ''; position: absolute; bottom: -8px; left: 50%; margin-left: -8px; width: 14px; height: 14px; background: var(--card); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: rotate(45deg); }

/* ---- Spalten-Layout ---- */
.reg-cols { display: grid; grid-template-columns: 1fr 350px; gap: 36px; align-items: start; padding-bottom: 12px; }
.reg-cols > *, .reg-main > * { min-width: 0; } /* Grid-Kinder dürfen schrumpfen (kein horizontaler Überlauf mobil) */
.reg-main > .card { margin-bottom: 20px; }
.reg-aside { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 20px; }
.reg-page .card { border-radius: 16px; padding: 24px; }
.reg-page .card h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; }
.reg-page .card h3 { font-family: var(--serif); font-size: 18px; margin: 0 0 10px; }
.reg-sub { color: #6E6357; font-size: 14.5px; margin: 0 0 18px; }

/* ---- Formular-Karte (WSB-Widget) ---- */
.reg-payerr { display: none; background: #FBEDE7; border: 1.5px solid var(--orange); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; font-size: 14.5px; }
.reg-payerr p { margin: 5px 0 0; color: var(--muted2); }
.reg-payerr .reg-payerr-tech { margin-top: 9px; padding-top: 8px; border-top: 1px solid #F0D9CC; font-size: 12.5px; color: #8A7B6C; }
.reg-form-dim { opacity: .45; pointer-events: none; }
.reg-soldout-form { font-size: 14.5px; color: #6E6357; margin: 0 0 14px; }

/* Skeleton-Platzhalter: reservierte Höhen, keine Layout-Shifts beim Nachladen */
.reg-skel { border-radius: 10px; background: linear-gradient(100deg, var(--tint) 40%, #F6EFE3 50%, var(--tint) 60%); background-size: 200% 100%; animation: regSkel 1.4s infinite linear; }
@keyframes regSkel { from { background-position: 130% 0; } to { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) { .reg-skel { animation: none; } }
.reg-skel-line { height: 16px; margin: 8px 0; }
.reg-skel-form { min-height: 520px; }

/* ---- Einschiffung ---- */
.reg-steps-head { display: flex; align-items: flex-start; gap: 16px; }
.reg-steps-head img { width: 72px; height: auto; flex: none; }
.reg-step { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.reg-step:last-child { border-bottom: none; padding-bottom: 0; }
.reg-step img { width: 34px; height: auto; flex: none; align-self: flex-start; }
.reg-step h4 { font-family: var(--serif); font-size: 16.5px; margin: 0 0 3px; }
.reg-step p { font-size: 14.5px; color: var(--muted); margin: 0; }
.reg-step a { color: var(--magenta); }

/* ---- Preisbox ---- */
.reg-price { border: 2px solid var(--magenta) !important; }
.reg-cap { font-size: 13.5px; color: #6E6357; margin: 2px 0 6px; }
.reg-tk { border: 1.5px solid var(--border); border-radius: 12px; padding: 13px 15px; margin-top: 10px; }
.reg-tk.on { border-color: var(--teal); background: #F0FAF8; }
.reg-tk.off { opacity: .55; }
.reg-tk .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.reg-tk .name { font-weight: 600; font-size: 15px; }
.reg-tk .prc { font-family: var(--serif); font-size: 19px; font-weight: 700; white-space: nowrap; }
.reg-tk.off .prc { font-weight: 400; }
.reg-tk .sub { font-size: 13px; color: #6E6357; margin-top: 2px; }
.reg-mwst { font-size: 12.5px; color: #6E6357; font-weight: 400; margin: 8px 0 0; }
.reg-scarce { display: none; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--orange); align-items: center; gap: 8px; }
.reg-scarce .d { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); flex: none; }
.reg-soldout-box { display: none; margin: 10px 0 4px; background: #FBEDE7; border: 1px solid var(--orange); border-radius: 12px; padding: 13px 15px; font-size: 14.5px; }
.reg-soldout-box a { color: var(--magenta); }
.reg-gratis-box { display: none; margin-top: 10px; border: 1.5px solid var(--teal); background: #F0FAF8; border-radius: 12px; padding: 14px 16px; }
.reg-gratis-box .prc { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.reg-gratis-box .sub { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* ---- Trainer-Box ---- */
.reg-tr { display: flex; gap: 13px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.reg-tr:last-child { border-bottom: none; padding-bottom: 0; }
.reg-tr .ph { width: 52px; height: 52px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 18px; flex: none; overflow: hidden; }
.reg-tr .ph img { width: 100%; height: 100%; object-fit: cover; }
.reg-tr .nm { font-weight: 600; font-size: 15px; }
.reg-tr .rt { font-size: 13.5px; color: var(--muted); }
.reg-tr .rt b { color: var(--ink); }
.reg-tr .star { color: var(--ocher); }

/* ---- Weitere Termine ---- */
.reg-ev { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--ink); }
.reg-ev:last-of-type { border-bottom: none; }
.reg-ev:hover .et { color: var(--magenta); }
.reg-ev .dt { flex: none; width: 46px; text-align: center; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; padding: 5px 0; align-self: flex-start; }
.reg-ev .dt .dd { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.1; }
.reg-ev .dt .mm { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #6E6357; }
.reg-ev .et { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.reg-ev .el { font-size: 13px; color: #6E6357; }
.reg-all-link { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--magenta); }
.reg-all-link:hover { color: var(--magenta-hover); }

/* ---- Kontakt ---- */
.reg-contact-flex { display: flex; gap: 14px; align-items: flex-start; }
.reg-contact-flex .txt { flex: 1; }
.reg-contact-flex .txt p { font-size: 14.5px; color: var(--muted); margin: 0 0 4px; }
.reg-contact-flex .who { font-weight: 600; color: var(--ink); margin-top: 8px !important; }
.reg-contact-flex .role { font-size: 13.5px; color: #6E6357; }
.reg-contact-flex a { color: var(--magenta); }
.reg-contact-poller { width: 72px; height: auto; flex: none; align-self: flex-end; }

/* ---- Beschreibung ---- */
.reg-desc .card { padding: 28px 30px; }
.reg-desc h2 { font-size: 30px !important; margin-bottom: 4px !important; }
.reg-desc .lead { color: var(--muted); margin: 0 0 22px; max-width: 640px; font-size: 16px; }
.reg-desc h3 { margin: 24px 0 10px !important; display: flex; align-items: center; gap: 10px; }
.reg-desc h3 img { width: 22px; }
.reg-desc p, .reg-desc li { font-size: 15.5px; color: var(--muted2); max-width: 680px; }
.reg-desc p { margin: 0 0 10px; }
.reg-desc ul { list-style: none; margin: 8px 0 0; padding: 0; }
.reg-desc ul li { padding-left: 22px; position: relative; margin-bottom: 7px; }
.reg-desc ul li:before { content: ''; position: absolute; left: 2px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); }
.reg-desc ul li:nth-child(2n):before { background: var(--teal); }
.reg-desc ul li:nth-child(3n):before { background: var(--ocher); }
.reg-desc a { color: var(--magenta); }
.reg-rahmen { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.reg-rahmen div { background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 15px 17px; font-size: 14.5px; }
.reg-rahmen b { display: block; font-family: var(--serif); margin-bottom: 3px; }

/* ---- Zustand ohne Termin-ID / Danke-Seite ---- */
.reg-notid { display: none; padding: 20px 0 40px; }
.reg-notid .card { text-align: center; padding: 44px 30px; }
.reg-notid img { width: 150px; height: auto; margin: 0 auto 14px; }
.reg-notid h2 { font-size: 28px !important; margin-bottom: 8px !important; }
.reg-notid p { color: var(--muted); max-width: 440px; margin: 0 auto 6px; }
.reg-notid .btn-primary { margin-top: 16px; }
.reg-notid a:not(.btn) { color: var(--magenta); }

/* Danke-Seite: KI-Lotse mit Sprechblase, Termin-Badge (Datum prominent),
   Bordkarten-Hinweis (Vorkurs) + Willkommensgeschenk */
.danke-lotse { max-width: 340px; margin: 0 auto; }
.danke-gift { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; margin: 14px auto 0; max-width: 480px; text-align: left; }
.danke-gift h3 { margin: 0 0 8px !important; }
.reg-notid .danke-gift p { color: var(--ink); max-width: none; margin: 0; font-size: 15px; line-height: 1.55; }
.reg-notid .danke-gift .draft-note { margin-top: 14px; color: var(--ocher); }
.danke-termin { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; color: var(--ink); background: var(--paper); border: 1px solid var(--border); border-radius: 999px; padding: 10px 20px; margin: 6px auto 10px; }
.danke-termin .dot { width: 9px; height: 9px; background: var(--magenta); }
.danke-next { background: var(--paper); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; margin: 22px auto 0; max-width: 480px; text-align: left; }
.danke-next h3 { margin: 0 0 8px !important; }
.reg-notid .danke-next p { color: var(--ink); max-width: none; margin: 0; font-size: 15px; line-height: 1.55; }
.reg-notid .danke-next .danke-next-cta { margin-top: 16px; }
.danke-next .btn-primary { margin-top: 0; }

/* ---- Mobile ---- */
@media (max-width: 900px) {
  .reg-head-grid { grid-template-columns: 1fr; }
  .reg-avatar { display: flex; align-items: center; gap: 14px; text-align: left; }
  .reg-avatar img { width: 110px; height: auto; margin: 0; }
  .reg-bubble { margin-bottom: 0; }
  .reg-bubble:after { display: none; }
  .reg-head h1 { font-size: 32px; }
  .reg-cols { grid-template-columns: 1fr; }
  .reg-aside { position: static; }
}

/* =====================================================================
   WSB-RegistrationPage-Widget im Zieldesign (Stufe 1: CSS-Overrides)
   Gilt nur innerhalb der Formular-Karte der Registrierungsseite.
   ===================================================================== */

#wsb-registration { font-family: var(--sans); color: var(--ink); }

/* Widget begrenzt das Formular auf 600px; die Formular-Karte gibt die Breite vor */
#wsb-registration .wsb-body { max-width: none; }
#wsb-registration .wsb-form__body { width: auto; }

/* Widget-eigenen Kopf und Info-Block (Titel, Details, Trainers) ausblenden:
   Seitenkopf und rechte Spalte übernehmen Titel, Datum, Ort und Trainer. */
#wsb-registration .wsb-header,
#wsb-registration .wsb-info-section { display: none !important; }

/* Formular-Gliederung: gestapelte Labels statt Widget-Zweispalter (Label links) */
#wsb-registration .wsb-form__body > section { margin-bottom: 22px; }
#wsb-registration .wsb-form__field { display: block; margin: 0 0 12px; } /* Widget-margin-top neutralisieren, sonst versetzte Grid-Zeilen */
#wsb-registration .wsb-form__field > label.wsb-label { display: block; width: auto; margin-bottom: 5px; }
#wsb-registration .wsb-form__required { color: var(--magenta); }

/* Felder paarweise nebeneinander wie im Prototyp (Vorname|Nachname, E-Mail|Organisation,
   Strasse|Zusatz, PLZ|Ort). Die Organisation wird per JS aus "Arbeitsinfo" zu den
   persönlichen Angaben verschoben (wsb-registration.js), das Land bleibt volle Breite. */
#wsb-registration .wsb-form-section__general,
#wsb-registration .wsb-form-section__work,
#wsb-registration .wsb-form-section__billing {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start;
}
#wsb-registration .wsb-form-section__general > .wsb-form__section-title,
#wsb-registration .wsb-form-section__work > .wsb-form__section-title,
#wsb-registration .wsb-form-section__billing > .wsb-form__section-title,
#wsb-registration .wsb-form__billing-message { grid-column: 1 / -1; }
#wsb-registration .wsb-form-section__billing .wsb-form__field:has(select) { grid-column: 1 / -1; }
@media (max-width: 600px) {
  #wsb-registration .wsb-form-section__general,
  #wsb-registration .wsb-form-section__work,
  #wsb-registration .wsb-form-section__billing { grid-template-columns: 1fr; }
}

/* Sektions-Titel im Formular (Poller 20px wie legend img.poller-b im Prototyp) */
#wsb-registration .wsb-form__section-title,
#wsb-registration legend {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  color: var(--ink); margin-bottom: 10px;
  padding-left: 29px;
  background: url('bilder/poller-klein.png') left center / 20px auto no-repeat;
}

/* Labels + Felder */
#wsb-registration label { font-size: 13.5px; font-weight: 500; color: var(--ink); }
#wsb-registration input[type="text"],
#wsb-registration input[type="email"],
#wsb-registration input[type="tel"],
#wsb-registration input[type="number"],
#wsb-registration select,
#wsb-registration textarea {
  width: 100%; font-family: var(--sans); font-size: 15px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--ink); box-shadow: none;
}
/* Widget setzt height:2em auf Inputs/Selects; mit unserem Padding schneidet das den
   Text ab. Alle Eingabefelder auf dieselbe volle Höhe wie das Land-Feld bringen. */
#wsb-registration input[type="text"],
#wsb-registration input[type="email"],
#wsb-registration input[type="tel"],
#wsb-registration input[type="number"],
#wsb-registration select { height: auto; line-height: 1.4; }
#wsb-registration select {
  padding-right: 32px; background-position: right 12px center;
}
/* Fokus-Zustände Magenta (Widget setzt outline:none !important, darum ebenfalls !important) */
#wsb-registration input:focus,
#wsb-registration select:focus,
#wsb-registration textarea:focus {
  outline: 2px solid var(--magenta) !important; outline-offset: 1px;
  border-color: var(--magenta) !important; box-shadow: none !important;
}

/* Fehlerzustände: orange Rahmung, Meldung unter dem Feld */
#wsb-registration .wsb-error,
#wsb-registration .wsb-form__error,
#wsb-registration .has-error input,
#wsb-registration input.error,
#wsb-registration select.error,
#wsb-registration textarea.error { border-color: var(--orange) !important; }
#wsb-registration .wsb-form__error,
#wsb-registration .wsb-error,
#wsb-registration label.error {
  display: block; background: none; border: none;
  color: #B44A1D; font-size: 13px; margin-top: 4px; padding: 0;
}

/* Ticket- und Zahlarten-Wahl als Karten (Radio bei mehreren aktiven Tickets) */
#wsb-registration .wsb-form__radio {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 14px; background: #fff; font-size: 15px;
  margin-bottom: 10px; cursor: pointer;
}
#wsb-registration .wsb-form__radio.wsb-active { border-color: var(--teal); background: #F0FAF8; }
#wsb-registration .wsb-form__radio input { margin-top: 4px; flex: none; width: auto; }
#wsb-registration .wsb-form__radio label.wsb-label { margin: 0; font-size: 14px; cursor: pointer; }
#wsb-registration .wsb-form__radio label.wsb-label strong { display: block; font-family: var(--serif); font-size: 16px; }
#wsb-registration .wsb-form__tax { font-size: 12.5px; color: #6E6357; margin-top: 4px; }

/* Statische Ticketzeile bei genau einem aktiven Ticket (.ticket-line im Prototyp):
   Name links, Preis + "exkl. MwSt." rechts, kein Radio-Kreis. */
#wsb-registration .wsb-form__radio.reg-tk-static { padding: 12px 16px; }
#wsb-registration .wsb-form__radio.reg-tk-static input { display: none; }
#wsb-registration .wsb-form__radio.reg-tk-static label.wsb-label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  width: 100%; font-size: 15px;
}
#wsb-registration .wsb-form__radio.reg-tk-static label.wsb-label strong {
  display: inline; font-family: var(--serif); font-size: 15px;
}
#wsb-registration .reg-mwst-inline { font-size: 12.5px; color: #6E6357; font-weight: 400; }
#wsb-registration input[type="radio"],
#wsb-registration input[type="checkbox"] { accent-color: var(--magenta); width: auto; }
#wsb-registration .wsb-form__checkbox-wrapper { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
#wsb-registration .wsb-form__checkbox-wrapper input { margin-top: 3px; flex: none; }
#wsb-registration .wsb-form__checkbox-wrapper label.wsb-checkbox { margin: 0; font-weight: 400; font-size: 14.5px; }
#wsb-registration .wsb-form__checkbox-wrapper a { color: var(--magenta); }

/* Absende-Button */
#wsb-registration .wsb-form__btn,
#wsb-registration #default-submit-button,
#wsb-registration button[type="submit"],
#wsb-registration input[type="submit"] {
  display: block; width: 100%; max-width: none; margin-left: 0; text-align: center;
  font-family: var(--sans); font-size: 17px; font-weight: 600;
  background: var(--magenta); color: #fff;
  padding: 15px 20px; border: none; border-radius: 12px; cursor: pointer; margin-top: 6px;
}
#wsb-registration .wsb-form__btn:hover,
#wsb-registration #default-submit-button:hover,
#wsb-registration button[type="submit"]:hover,
#wsb-registration input[type="submit"]:hover { background: var(--magenta-hover); box-shadow: 0 4px 14px rgba(192,0,112,.25); }

/* Hinweis unter dem Button */
.reg-btn-note { font-size: 13.5px; color: #6E6357; text-align: center; margin: 10px 0 0; }

/* Preis-Zusammenfassung/Betragszeile des Widgets dezent */
#wsb-registration .wsb-form__total { font-family: var(--serif); font-weight: 700; }
