/* ───────────────────────────────────────────────
   LAB 36 — Anmeldung (Reservieren / Verbindlich)
   Geteilter Stil für index.html (Entscheider:in)
   und teilnehmer.html (Teilnehmer:in).
   Alles unter .af-card gescoped, um nicht mit den
   bestehenden Seitenstilen zu kollidieren.
   ─────────────────────────────────────────────── */

/* ─── Karte (ersetzt .reserve-form) ─── */
.af-card {
  background: var(--green-deep);
  color: #fff;
  padding: 38px 36px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(5,43,31,0.5);
}
.af-card .blob-corner {
  position: absolute; left: -60px; bottom: -60px;
  width: 200px; height: 200px;
  opacity: 0.07; pointer-events: none; z-index: 0;
}
.af-card .blob-corner svg { fill: var(--lime); width: 100%; height: 100%; }
.af-card > * { position: relative; z-index: 2; }

.af-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.af-eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(206,241,123,0.7);
}
.af-badge {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--lime); color: var(--green-deep);
  padding: 5px 11px; border-radius: 100px; white-space: nowrap;
}
.af-title {
  font-family: var(--display); font-weight: 700;
  font-size: 28px; color: #fff;
  letter-spacing: -0.02em; line-height: 1.08;
  margin-bottom: 20px;
}

/* ─── Toggle (Reservieren / Verbindlich) ─── */
.af-toggle {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  margin-bottom: 12px;
}
.af-toggle-opt {
  position: relative; z-index: 2;
  padding: 11px 12px; border-radius: 100px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color 0.25s; white-space: nowrap; text-align: center;
}
.af-toggle-opt.is-active { color: var(--green-deep); font-weight: 600; }
.af-toggle-pill {
  position: absolute; z-index: 1; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 6px);
  background: var(--lime); border-radius: 100px;
  transition: transform 0.32s cubic-bezier(.4,.05,.2,1);
}
.af-toggle[data-mode="binding"] .af-toggle-pill { transform: translateX(calc(100% + 4px)); }
.af-mode-hint {
  font-size: 12.5px; color: rgba(255,255,255,0.5);
  line-height: 1.5; margin-bottom: 22px; min-height: 19px;
}

/* Hinweise nur im verbindlichen Modus (Entscheider-Seite) */
.af-binding-note,
.af-billing-hint { display: none; }
.af-card[data-mode="binding"] .af-binding-note {
  display: block;
  font-size: 12.5px; color: rgba(255,255,255,0.5);
  line-height: 1.5; margin: -14px 0 20px;
}
.af-card[data-mode="binding"] .af-billing-hint {
  display: block;
  font-size: 12.5px; color: rgba(255,255,255,0.5);
  line-height: 1.5; margin-bottom: 14px;
}

/* ─── Schritt-Anzeige ─── */
.af-progress {
  display: none; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}
.af-card[data-mode="binding"] .af-progress { display: flex; }
.af-progress .bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.12); overflow: hidden; }
.af-progress .bar span { display: block; height: 100%; width: 50%; background: var(--lime); transition: width 0.35s ease; }
.af-card[data-step="2"] .af-progress .bar span { width: 100%; }

/* ─── Steps ─── */
.af-step { display: none; }
.af-step.is-active { display: block; animation: afStepIn 0.4s ease both; }
@keyframes afStepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Felder ─── */
.af-card .field { margin-bottom: 16px; position: relative; }
.af-card .field label {
  display: block;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 7px;
}
.af-card .field label .opt { color: rgba(255,255,255,0.3); text-transform: none; letter-spacing: 0; }
.af-card .field input,
.af-card .field textarea,
.af-card .field select {
  width: 100%;
  background: transparent;
  border: none; border-bottom: 1.5px solid rgba(255,255,255,0.18);
  color: #fff; font-family: var(--body); font-size: 15px; font-weight: 400;
  padding: 9px 0;
  transition: border-color 0.2s;
}
.af-card .field textarea {
  resize: vertical; min-height: 58px; line-height: 1.5;
  border: 1.5px solid rgba(255,255,255,0.18); border-radius: 12px;
  padding: 12px 14px;
}
.af-card .field input:focus,
.af-card .field textarea:focus,
.af-card .field select:focus { outline: none; border-color: var(--lime); }
.af-card .field input::placeholder,
.af-card .field textarea::placeholder { color: rgba(255,255,255,0.28); }
.af-card .field select {
  color: #fff; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23CEF17B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: right 2px center; background-repeat: no-repeat;
  padding-right: 24px;
}
.af-card .field select:invalid { color: rgba(255,255,255,0.4); }
.af-card .field select option { background: var(--green-deep); color: #fff; }
/* datalist input keeps its native dropdown affordance */
.af-card .field input[list]::-webkit-calendar-picker-indicator { opacity: 0.4; filter: invert(1); }

.af-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* validation */
.af-card .field.is-invalid input,
.af-card .field.is-invalid textarea,
.af-card .field.is-invalid select { border-color: var(--orange); }
.af-err {
  display: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.01em;
  color: var(--orange); margin-top: 6px;
}
.af-card .field.is-invalid .af-err { display: block; }

/* ─── Gruppen (Rechnungsadresse, Teilnehmer:in …) ─── */
.af-group { margin: 4px 0 18px; padding-top: 18px; border-top: 1.5px dashed rgba(255,255,255,0.14); }
.af-group:first-child { padding-top: 0; border-top: none; }
.af-group-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 14px;
  display: flex; align-items: center; gap: 9px;
}
.af-group-label .n {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(206,241,123,0.16); color: var(--lime);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px;
}
.af-group-hint { font-size: 11.5px; color: rgba(255,255,255,0.4); margin: -8px 0 14px; line-height: 1.45; }

/* slide-down for conditional Teilnehmer:in 2 */
.af-collapse[hidden] { display: none; }

/* ─── Honeypot ─── */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* ─── Consent ─── */
.af-consent {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 6px 0 20px; cursor: pointer; position: relative;
}
.af-consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.af-consent .box {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px;
  border: 1.5px solid rgba(255,255,255,0.3); border-radius: 7px;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.af-consent .box svg { width: 13px; height: 13px; opacity: 0; transform: scale(0.5); transition: all 0.2s; }
.af-consent input:checked ~ .box { background: var(--lime); border-color: var(--lime); }
.af-consent input:checked ~ .box svg { opacity: 1; transform: scale(1); }
.af-consent.is-invalid .box { border-color: var(--orange); }
.af-consent .txt { font-size: 12.5px; color: rgba(255,255,255,0.55); line-height: 1.45; }
.af-consent .txt a { color: var(--lime); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Aktionen ─── */
.af-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.af-back {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  padding: 16px 18px; border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.18);
  transition: all 0.2s; white-space: nowrap;
}
.af-back:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.af-back[hidden] { display: none; } /* nur in Schritt 2 sichtbar (überschreibt inline-flex) */

/* Pflichtfelder mit * kennzeichnen */
.af-form .field[data-validate="required"] > label::after,
.af-form .field[data-validate="email"] > label::after,
.forward-card .field[data-validate="required"] > label::after,
.forward-card .field[data-validate="email"] > label::after {
  content: ' *';
  color: var(--orange, #FC703C);
  font-weight: 700;
}
.af-submit {
  flex: 1;
  background: var(--lime); color: var(--green-deep);
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 17px 24px; border-radius: 100px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.2s, background 0.3s, opacity 0.2s;
}
.af-submit:hover { transform: translateY(-1px); }
.af-submit:active { transform: translateY(0); }
.af-submit[disabled] { opacity: 0.6; cursor: default; transform: none; }
.af-submit .arrow { font-size: 18px; line-height: 1; }
.af-note {
  font-size: 11px; color: rgba(255,255,255,0.34);
  text-align: center; margin-top: 16px; line-height: 1.5;
}

/* ─── Erfolg ─── */
.af-success {
  display: none; text-align: center; padding: 18px 6px 8px;
}
.af-card.is-success .af-form,
.af-card.is-success .af-toggle,
.af-card.is-success .af-mode-hint,
.af-card.is-success .af-title { display: none; }
.af-card.is-success .af-success { display: block; animation: afStepIn 0.5s ease both; }
.af-check {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--lime);
  display: flex; align-items: center; justify-content: center;
  margin: 6px auto 22px;
  animation: afPop 0.5s cubic-bezier(.2,.9,.3,1.4) 0.05s both;
}
@keyframes afPop { from { transform: scale(0); } to { transform: scale(1); } }
.af-check svg { width: 38px; height: 38px; }
.af-check svg path {
  stroke: var(--green-deep); stroke-width: 4; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: afDraw 0.45s ease 0.35s forwards;
}
@keyframes afDraw { to { stroke-dashoffset: 0; } }
.af-success h3 {
  font-family: var(--display); font-weight: 800; font-size: 30px;
  color: #fff; letter-spacing: -0.025em; margin-bottom: 10px;
}
.af-success h3 .hl { font-family: var(--script); font-style: italic; color: var(--lime); }
.af-success p { font-size: 14.5px; color: rgba(255,255,255,0.6); max-width: 34ch; margin: 0 auto; line-height: 1.6; }
.af-success p strong { color: var(--lime); font-weight: 500; }
.af-success-meta {
  margin-top: 20px; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.42);
  letter-spacing: 0.03em;
}
.af-reset {
  display: inline-block; margin-top: 24px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--lime); text-decoration: underline; text-underline-offset: 3px;
}

/* ─── Countdown (linke Spalte) ─── */
.af-countdown {
  margin-top: 30px;
  background: var(--green-deep);
  border-radius: 20px; padding: 24px 26px;
  color: #fff; position: relative; overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
}
.af-countdown .cd-blob { position: absolute; right: -60px; bottom: -60px; width: 180px; height: 180px; opacity: 0.14; pointer-events: none; }
.af-countdown .cd-blob svg { width: 100%; height: 100%; fill: var(--lime); }
.af-cd-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 4px; position: relative; z-index: 2;
}
.af-cd-deadline {
  font-family: var(--display); font-weight: 700; font-size: 18px;
  color: #fff; margin-bottom: 16px; letter-spacing: -0.01em; position: relative; z-index: 2;
}
.af-cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; z-index: 2; }
.af-cd-tile {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(206,241,123,0.14);
  border-radius: 11px; padding: 13px 6px; text-align: center;
}
.af-cd-num {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(24px, 3vw, 34px); line-height: 1;
  color: var(--lime); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.af-cd-unit {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.45);
}
.af-cd-closed { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--lime); position: relative; z-index: 2; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .af-card { padding: 32px 26px; }
}
@media (max-width: 640px) {
  .af-card { padding: 28px 22px; }
  .af-row-2 { grid-template-columns: 1fr; gap: 0; }
  .af-toggle-opt { font-size: 9.5px; letter-spacing: 0.02em; }
  .af-actions { flex-wrap: wrap; }
  .af-back { width: 100%; justify-content: center; }
}
