/* ─────────────────────────────────────────────────────────────
   Designsystem der Kundenseiten – abgeleitet aus /webprojekt.
   Schrift, Formen und Flächen sind überall gleich; die Marke
   steuert ausschließlich --accent (und bei Schichtly das
   dunkle Grundthema über body.brand-dark).
   ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #EDE8DF;
  --surface:   #FFFFFF;
  --surface-2: #FAFAF8;
  --surface-3: #F7F4F0;
  --text:      #0A0A0A;
  --muted:     #6B6560;
  --border:    rgba(10,10,10,0.12);
  --accent:    #E8432D;
  --on-accent: #FFFFFF;
  --radius:    10px;
  --radius-lg: 12px;
  --shadow:    0 2px 8px rgba(10,10,10,.05);
}

body.brand-dark {
  --bg:        #0E0E0E;
  --surface:   rgba(255,255,255,.05);
  --surface-2: rgba(255,255,255,.03);
  --surface-3: rgba(255,255,255,.09);
  --text:      #FFFFFF;
  --muted:     rgba(255,255,255,.55);
  --border:    rgba(255,255,255,.13);
  --on-accent: #0E0E0E;
  --shadow:    none;
}

body.booking-page {
  background: var(--bg);
  color: var(--text);
  font-family: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  padding-bottom: 100px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ── Rahmen ───────────────────────────────────────────────── */
.booking-wrapper, .pub-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.back-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s;
}
.back-link:hover { color: var(--text); }

/* ── Kopfbereich ──────────────────────────────────────────── */
.booking-header, .pub-header { margin: 24px 0 36px; }

.booking-header h1, .pub-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--text);
}
.booking-header h1::before, .pub-header h1::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 14px;
}

.booking-meta, .pub-header p {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pub-header p { display: block; }
.meta-sep { opacity: .35; }

.booking-location, .booking-notes {
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
}

.slots-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ── Tage und Zeiten ──────────────────────────────────────── */
.day-block {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.day-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: transparent;
  border: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: background .1s;
  text-align: left;
}
.day-toggle:hover { background: var(--surface-3); }
.day-count {
  font-family: 'Epilogue', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: auto;
  margin-right: 12px;
}
.chevron { font-size: 12px; color: var(--muted); }

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 12px 16px 16px;
  background: var(--surface-2);
}
.time-btn {
  padding: 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: 'Epilogue', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .12s;
}
.time-btn:hover { border-color: var(--text); background: var(--surface-3); }
.time-btn.selected {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ── Bestätigungsleiste ───────────────────────────────────── */
.confirm-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--text);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -4px 24px rgba(10,10,10,.2);
  z-index: 20;
}
.confirm-info strong {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--bg);
  display: block;
}
/* Die Leiste ist immer in --text eingefärbt, der Text darauf also invers */
.confirm-info span { font-size: 13px; color: rgba(255,255,255,.55); }
body.brand-dark .confirm-info span { color: rgba(14,14,14,.6); }

/* ── Schaltflächen ────────────────────────────────────────── */
.btn {
  padding: 12px 28px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity .15s, transform .1s, border-color .15s, color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.btn:active { transform: scale(.99); }

.btn-primary, .btn-confirm, .btn-verschieben {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn-primary:hover, .btn-confirm:hover, .btn-verschieben:hover { opacity: .88; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

/* ── Meldungen und Leerzustand ────────────────────────────── */
.alert, .alert-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}

.no-slots {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.no-slots p { margin-bottom: 8px; }
.no-slots a { color: var(--accent); font-weight: 600; }

/* ── Abschlusskarte ───────────────────────────────────────── */
.confirmed-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}
.confirmed-icon {
  width: 64px; height: 64px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
}
.confirmed-icon.error-icon { background: #DC2626; color: #fff; }
.confirmed-card h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -.03em;
  margin-bottom: 14px;
  color: var(--text);
}
.confirmed-sub, .confirmed-card p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}
.confirmed-details {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 28px 0;
  text-align: left;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--muted); font-size: 13px; }
.detail-value { font-weight: 600; text-align: right; color: var(--text); }
.confirmed-footer {
  font-size: 13px;
  color: var(--muted);
  margin-top: 24px;
}

.aendern-aktionen {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 8px;
}
.aendern-aktionen form { margin: 0; }
.aendern-hinweis { font-size: 13px; color: var(--muted); margin-top: 20px; }

/* ── Formulare ────────────────────────────────────────────── */
.pub-form-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pub-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
}
.pub-section:last-of-type { border-bottom: none; }
.pub-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.pub-actions {
  padding: 20px 28px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 200px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
}
.field input, .field textarea, .field select {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-family: 'Epilogue', sans-serif;
  font-size: 15px;
  width: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(10,10,10,.08);
  background: var(--surface);
}
body.brand-dark .field input:focus,
body.brand-dark .field textarea:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.10); }
.field textarea { resize: vertical; min-height: 80px; }

/* ── Auswahlkacheln ───────────────────────────────────────── */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.brand-card { position: relative; }
.brand-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.brand-card-inner {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column; gap: 6px;
}
.brand-card-inner:hover { border-color: var(--text); }
.brand-card input:checked + .brand-card-inner {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(10,10,10,.06);
}
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bc-primary, var(--accent)); }
.brand-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); }
.brand-desc { font-size: 12px; color: var(--muted); }

.duration-grid, .type-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.type-opt { flex: 1; min-width: 120px; }
.dur-opt, .type-opt { position: relative; }
.dur-opt input[type="radio"], .type-opt input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.dur-btn, .type-btn {
  display: block;
  text-align: center;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-family: 'Epilogue', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
}
.dur-btn:hover, .type-btn:hover { border-color: var(--text); }
.dur-opt input:checked + .dur-btn,
.type-opt input:checked + .type-btn {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ── Schmale Bildschirme ──────────────────────────────────── */
@media (max-width: 560px) {
  .booking-wrapper, .pub-wrapper { padding: 28px 18px 0; }
  .booking-header h1, .pub-header h1 { font-size: 26px; }
  .confirmed-card { padding: 32px 22px; }
  .pub-section, .pub-actions { padding: 18px 18px; }
  .confirm-bar { flex-direction: column; align-items: stretch; padding: 14px 18px; }
  .confirm-bar .btn { width: 100%; }
}
