/* Buchung: Wizard, Erfolgsscreen, Meine Buchung, Link erneut senden (Mockup Buchen.dc.html).
   Baut auf den Tokens in app.css auf (wird davor geladen, nutzt dieselben Variablen). */

/* ---------- Feste Leisten: Kopf oben und Zurück/Weiter unten bleiben beim Scrollen stehen ---------- */
.has-wizard .head { position: sticky; top: 0; z-index: 30; transition: box-shadow .2s; }
.has-wizard .head.is-scrolled { box-shadow: 0 3px 12px rgba(28, 37, 64, .35); }
.has-wizard .wiz-bar { box-shadow: 0 -3px 12px rgba(28, 37, 64, .12); }
@media (max-width: 600px), (max-height: 700px) {
  /* Am Handy nur die schmale Leiste einfrieren (Zurück, Tage, Fortschritt) – der große Titel wäre zu hoch */
  .has-wizard .head { padding: 10px 16px 10px; gap: 8px; }
  .has-wizard .head-title { display: none; }
}
/* Hinweis, dass darunter noch mehr kommt */
.wiz-bar.has-more::before {
  content: "Weiter unten \2193"; position: absolute; left: 50%; top: -38px; transform: translateX(-50%);
  background: var(--night); color: var(--white); font-size: 13px; font-weight: 700; line-height: 1;
  padding: 8px 14px; border-radius: 999px; pointer-events: none; box-shadow: 0 2px 8px rgba(28, 37, 64, .3);
  animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 3px); } }
@media (prefers-reduced-motion: reduce) { .wiz-bar.has-more::before { animation: none; } }

/* ---------- Kopf: Fortschritt ---------- */
.wiz-progress-wrap { display: flex; flex-direction: column; gap: 6px; }
.wiz-progress { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.wiz-progress span { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); transition: background .2s; }
.wiz-progress span.is-done { background: var(--gold); }
.wiz-steplabel { font-size: 13px; opacity: .9; }

/* ---------- Formular-Grundlagen ---------- */
.wiz-form, .wiz-step { display: flex; flex-direction: column; gap: 18px; }
.wiz-step[hidden], .wiz-form[hidden] { display: none; }
.wiz-intro h2, .wiz-h2 { margin: 0 0 4px; font-size: 20px; line-height: 1.25; }
.wiz-intro h2:focus, .wiz-h2:focus { outline: none; }
.wiz-intro p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }

.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.lbl { display: block; font-size: 14px; font-weight: 600; margin: 0; }
.opt { font-weight: 400; color: var(--muted); }
.inp, .ta {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  font: inherit; font-size: 16px; color: var(--text);
}
.inp { height: 46px; padding: 0 12px; }
select.inp { padding-right: 8px; }
.ta { min-height: 84px; padding: 10px 12px; font-size: 16px; resize: vertical; line-height: 1.45; }
.inp:focus, .ta:focus { border-color: var(--night); outline: 3px solid rgba(231, 194, 107, .7); outline-offset: 0; }
.inp::placeholder, .ta::placeholder { color: #8A8396; }
.counter { align-self: flex-end; font-size: 12px; color: var(--muted); margin-top: -2px; }
.counter.is-near { color: var(--red); font-weight: 600; }
.field .hint { margin: 0; }

.is-invalid .inp, .is-invalid .ta, .is-invalid.stepper { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.is-invalid .choice-grid, .is-invalid .slot-grid, .is-invalid .chip-grid { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 12px; }
.is-invalid > .check, .is-invalid .check { color: var(--red-hover); }

.wiz-error {
  background: var(--rose); border: 1px solid #E5BDB9; color: #7E1820; border-radius: 12px;
  padding: 12px 14px; font-size: 15px; font-weight: 600; line-height: 1.4;
}

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; cursor: pointer; min-height: 44px; padding: 2px 0; }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--red); }
.check-consent { font-size: 14px; line-height: 1.45; }

.hint-box { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.hint-box svg { flex-shrink: 0; color: #8A6A1C; margin-top: 1px; }

.link-btn {
  background: none; border: none; padding: 0 4px; min-height: 44px; min-width: 44px;
  color: var(--red); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; align-self: flex-start;
}
.link-btn:hover { color: var(--red-hover); }

.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Schritt 1: Tag & Zeitfenster ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice {
  min-height: 64px; border-radius: 12px; padding: 8px; cursor: pointer; font: inherit;
  border: 1px solid var(--line); background: var(--white); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.choice-small { font-size: 13px; }
.choice-big { font-size: 18px; font-weight: 700; }
.choice[aria-pressed="true"] { border: 2px solid var(--red); background: var(--red); color: var(--white); }
.choice:disabled { background: #EFEAE3; border-color: var(--line-soft); color: #6F687C; cursor: not-allowed; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.slot {
  min-height: 60px; border-radius: 10px; padding: 6px; cursor: pointer; font: inherit;
  border: 1px solid var(--line); background: var(--white); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.slot-time { font-size: 17px; font-weight: 700; }
.slot-free { font-size: 12px; }
.slot.is-request { border-style: dashed; }
.slot[aria-pressed="true"] { border: 2px solid var(--red); background: var(--red); color: var(--white); }
.slot:disabled { border-color: var(--line-soft); background: #EFEAE3; color: #6F687C; cursor: not-allowed; }
.slot:disabled .slot-time { text-decoration: line-through; }
.slot-empty { grid-column: 1 / -1; margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- Schritt 2: Kinder ---------- */
.stepper {
  flex-direction: row; align-items: center; justify-content: space-between;
  background: var(--white); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px;
}
.stepper-label { font-weight: 600; }
.stepper-ctrl { display: flex; align-items: center; gap: 14px; }
.stepper-ctrl output { font-size: 20px; font-weight: 700; min-width: 16px; text-align: center; }
.round-btn {
  width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--white);
  font: inherit; font-size: 22px; line-height: 1; color: var(--text); cursor: pointer;
}
.round-btn:hover:not(:disabled) { border-color: var(--text); }
.round-btn:disabled { color: #B3ACBD; border-color: var(--line-soft); cursor: not-allowed; }
.kids-list { display: flex; flex-direction: column; gap: 14px; }
.kid-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }

/* ---------- Schritt 4: Lob/Ermahnung je Kind ---------- */
.kid-note { margin-bottom: 18px; padding-bottom: 6px; border-bottom: 1px dashed #D8D2C8; }
.kid-note-title { font-size: 18px; margin: 0 0 8px; }

/* ---------- Schritt 3: Krampus ---------- */
.chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip {
  min-height: 46px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; padding: 4px 6px;
  border: 1px solid var(--line); background: var(--white); color: var(--text);
}
.chip[aria-checked="true"] { border: 2px solid var(--red); background: var(--rose); color: var(--red-hover); }

/* ---------- Schritt 4: Adresse ---------- */
.geo-status { margin: 0; font-size: 14px; line-height: 1.4; min-height: 0; }
.geo-status:empty { display: none; }
.geo-status.is-ok { color: #23663B; font-weight: 600; }
.geo-status.is-warn { color: #7E1820; font-weight: 600; }
.geo-status.is-busy { color: var(--muted); }
.geo-map-wrap { display: flex; flex-direction: column; gap: 8px; }
.geo-map-wrap[hidden] { display: none; }
.geo-map-hint { margin: 0; }
.geo-map { height: 280px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: #E8E3DA; z-index: 0; }
.geo-map .leaflet-control-zoom.leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }   /* Touch ≥ 44 px */
.house-pin-icon { background: none; border: none; }
.house-pin {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: var(--red); color: var(--white); border: 2px solid var(--white); box-shadow: 0 2px 8px rgba(28, 37, 64, .35);
}
.house-pin svg { width: 20px; height: 20px; transform: rotate(45deg); }

/* ---------- Schritt 5: Überblick ---------- */
.summary { background: var(--white); border: 1px solid var(--line-soft); border-radius: 14px; padding: 4px 16px; }
.sum-sec { padding: 8px 0 10px; border-bottom: 1px solid #EFEAE3; }
.sum-sec:last-child { border-bottom: none; }
.sum-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sum-head h3 { font-size: 15px; font-weight: 700; }
.sum-head .link-btn { align-self: center; }
.sum-rows { margin: 0; display: flex; flex-direction: column; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.sum-row dt { color: var(--muted); flex-shrink: 0; }
.sum-row dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.sum-row dd.is-text { font-weight: 500; }

/* ---------- Aktionsleiste ---------- */
.action-bar.wiz-bar { flex-direction: row; gap: 10px; align-items: stretch; }
.wiz-bar .btn-secondary { flex-shrink: 0; }
.wiz-next { flex: 1; }
.btn:disabled { opacity: .7; cursor: progress; }

/* ---------- Erfolgsscreen ---------- */
.done { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; padding-top: 16px; }
.done:focus { outline: none; }
.done[hidden] { display: none; }
.done-icon { width: 72px; height: 72px; border-radius: 36px; background: var(--rose); color: var(--red); display: flex; align-items: center; justify-content: center; }
.done-icon svg { stroke-width: 2.2; }
.done h2 { font-size: 28px; }
.done-text { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }
.done-text strong { color: var(--text); }
.code-box { background: var(--white); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 18px; }
.code-box span { display: block; font-size: 12px; color: var(--muted); }
.code-box strong { display: block; font-size: 22px; letter-spacing: .08em; }
.done .notice { text-align: left; width: 100%; }
.link-box { width: 100%; text-align: left; background: var(--white); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.link-box .hint { margin: 0; }
.link-box code { display: block; font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #F4F0EA; border-radius: 8px; padding: 10px; word-break: break-all; color: var(--text); }
.done > .hint { margin: 0; }

/* ---------- Meldungen ---------- */
.msg { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--line-soft); border-radius: 14px; padding: 18px 16px; }
.msg p { margin: 0; font-size: 16px; line-height: 1.5; }
.msg-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center; background: #FBF2DC; color: #8A6A1C; }
.msg-warn .msg-icon { background: var(--rose); color: var(--red); }
.msg-ok .msg-icon { background: #E3F1E7; color: #23663B; }
.center { align-self: center; }
.notice-ok { background: #E8F4EC; border: 1px solid #A9D3B5; }
.notice-ok svg { color: #23663B; }
.notice-ok p { color: #3E5546; }

/* ---------- Meine Buchung ---------- */
.status-card { background: var(--white); border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.status-card p { margin: 0; line-height: 1.5; }
.status-card .link-quiet { min-height: 44px; }
.status-badge { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: #FBF2DC; color: #6B5114; border: 1px solid var(--gold); }
.st-confirmed .status-badge { background: #E3F1E7; color: #1F5A34; border-color: #A9D3B5; }
.st-planned { background: var(--night); color: var(--white); border-color: var(--night); }
.st-planned .status-badge { background: var(--gold); color: var(--night); border-color: var(--gold); }
.st-planned .muted { color: #D5D9E8; }
.st-cancelled .status-badge { background: #EFEAE3; color: #5B5568; border-color: var(--line); }
.status-big { font-size: 26px; line-height: 1.15; }
.btn-live { min-height: 60px; font-size: 18px; }
.info-card .card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.info-card .card-title svg { color: var(--red); }
.kid-chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kid-chips li { background: var(--rose); color: #5E1218; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 15px; }
.kid-chips span { font-weight: 400; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.confirm-box { background: var(--rose); border: 1px solid #E5BDB9; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.confirm-box p { margin: 0; line-height: 1.45; }
.confirm-box .wiz-error { background: var(--white); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.done-small { padding-top: 8px; }

@media (max-width: 370px) {
  .choice-big { font-size: 16px; }
  .sum-row { flex-direction: column; gap: 0; }
  .sum-row dd { text-align: left; }
  .wiz-bar .btn-secondary { padding: 0 14px; }
}

/* ---------- Feedback „Wie war’s?“ ---------- */
.rating { display: flex; gap: 4px; }
.rate-opt { position: relative; display: inline-flex; min-width: 48px; min-height: 48px; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer; color: #B9B2C4; }
.rate-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rate-opt:hover { color: #C98E1C; }
.rate-opt:has(input:checked), .rating:has(input:checked) .rate-opt:has(~ .rate-opt input:checked) { color: #C98E1C; }
.rate-opt:has(input:focus-visible) { outline: 3px solid #1C2540; outline-offset: 1px; }
.rating-field { border: 0; padding: 0; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
