/* ══════════════════════════════════════════════════════════════
   ATS Public Pages — Apple-Style (Booking, Calculator, Review, Status)
   ══════════════════════════════════════════════════════════════ */

:root {
  --primary: #12182f;
  --accent: #12182f;
  --accent-hover: #232c4e;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --border: #d2d2d7;
  --success: #34c759;
  --danger: #ff3b30;
  --radius: 1rem;
  --orange: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Maße in rem; auf QHD/4K wächst die Basis mit (wie hybrid.css). */
html { font-size: max(100%, min(.8333vw, 1.4815vh)); }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 450;
  font-size: 1.0625rem; line-height: 1.47; color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Back Link ─────────────────────────────────────────────── */
.back-link {
  display: inline-flex; align-items: center;
  font-size: .875rem; font-weight: 650;
  color: var(--accent); text-decoration: none;
  margin-bottom: .5rem;
  transition: opacity 200ms;
}
.back-link:hover { opacity: 0.7; }

/* ── Layout ────────────────────────────────────────────────── */
.booking-container {
  max-width: 35rem; margin: 0 auto;
  padding: 3rem 1.5rem;
}
.booking-header {
  text-align: center; margin-bottom: 2rem;
}
.booking-header h1 {
  font-size: 2rem; font-weight: 800;
  letter-spacing: -0.5px; color: var(--primary);
}
.booking-header p {
  font-size: .9375rem; color: var(--text-muted);
  margin-top: .375rem;
}
.booking-header .booking-kicker { color: var(--primary); margin: 0 0 .5rem; }

/* ── Step Indicator ────────────────────────────────────────── */
.step-indicator {
  display: flex; justify-content: center;
  gap: .5rem; margin-bottom: 2rem;
}
.step-dot-public, .step-dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--border);
  transition: all 200ms;
}
.step-dot-public.active, .step-dot.active { background: var(--accent); width: 1.5rem; border-radius: .25rem; }

/* ── Cards ─────────────────────────────────────────────────── */
.booking-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(0,0,0,.04);
}
.booking-card h2 {
  font-size: 1.25rem; font-weight: 750;
  margin-bottom: 1.25rem; letter-spacing: -0.2px;
}
.booking-kicker {
  color: var(--accent); font-size: .75rem; font-weight: 750;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: .5rem;
}
.booking-copy { color: var(--text-muted); font-size: .9375rem; margin-bottom: 1.25rem; }
.option-stack { display: grid; gap: .625rem; }
.option-main { flex: 1; }
.calc-option strong { display: block; font-size: .9375rem; }
.calc-option small { display: block; margin-top: .1875rem; color: var(--text-muted); font-size: .75rem; }
.calc-option small.option-price { color: var(--text); font-weight: 650; font-size: .8125rem; }
.booking-summary {
  display: grid; gap: .3125rem; padding: 1rem; margin-bottom: 1.25rem;
  border-radius: .75rem; background: var(--bg); font-size: .875rem;
}
.booking-summary span { color: var(--text-muted); }
.price-preview {
  display: grid; gap: .3125rem; padding: 1.25rem 0; margin: 1.25rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.price-preview > span { color: var(--text-muted); font-size: .8125rem; }
.price-preview strong { color: var(--primary); font-size: 1.75rem; letter-spacing: -.03em; }
.price-preview small, .booking-legal { color: var(--text-muted); font-size: .75rem; line-height: 1.5; }
.booking-legal { margin-top: .75rem; }
.form-error { color: var(--danger); font-size: .875rem; margin-bottom: .875rem; }
.booking-code-label { color: var(--text-muted); font-size: .8125rem; }
.booking-code { font-family: monospace; font-size: 1.25rem; font-weight: 700; letter-spacing: 1px; margin: .375rem 0 1.25rem; word-break: break-all; }
.preview-notice {
  display: grid; gap: .1875rem; margin: -1rem 0 1.25rem; padding: .75rem 1rem;
  border: 1px solid rgba(18,24,47,.16); border-radius: .75rem;
  background: rgba(18,24,47,.055); color: var(--primary); font-size: .8125rem;
}
.preview-notice span { color: var(--text-muted); }

/* ── Date/Time Slots ───────────────────────────────────────── */
.slot-grid, .date-grid, .time-grid {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(5.625rem, 1fr));
}
.slot, .date-slot {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: .875rem .5rem;
  background: var(--card-bg);
  border: .0938rem solid var(--border);
  border-radius: .75rem;
  cursor: pointer; transition: all 200ms;
  text-decoration: none; color: var(--text); font-family: inherit;
}
.slot:hover, .date-slot:hover { border-color: var(--accent); }
.slot.selected, .date-slot.selected {
  border-color: var(--accent);
  background: rgba(18,24,47,.045);
}
.slot .day-name, .date-slot .day-name {
  font-size: .75rem; color: var(--text-muted);
  font-weight: 500;
}
.slot .day-num, .date-slot .day-num {
  font-size: 1.375rem; font-weight: 600;
  margin: .125rem 0;
}
.slot .month, .date-slot .month { font-size: .75rem; color: var(--text-muted); }
.slot .free-slots, .date-slot .avail, .slot .avail {
  font-size: .6875rem; color: var(--success);
  margin-top: .25rem;
}
.slot.full, .date-slot.full {
  opacity: .35; cursor: not-allowed;
}
.date-slot.full .avail { color: var(--text-muted); }
.time-slot {
  display: flex; align-items: center; justify-content: center;
  padding: .75rem .5rem;
  background: var(--card-bg);
  border: .0938rem solid var(--border);
  border-radius: .75rem;
  cursor: pointer; transition: all 200ms; font-family: inherit;
  font-size: .9375rem; font-weight: 500; color: var(--text);
}
.time-slot:hover { border-color: var(--accent); }
.time-slot.selected {
  border-color: var(--accent);
  background: rgba(18,24,47,.045);
}

/* ── Form Elements ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label, .form-group .group-label {
  display: block; font-size: .875rem; font-weight: 500;
  color: var(--text); margin-bottom: .375rem;
}
.b-input, input.b-input, select.b-input, textarea.b-input {
  width: 100%; height: 3rem;
  padding: 0 1rem;
  font-family: inherit; font-size: 1.0625rem; color: var(--text);
  background: var(--card-bg);
  border: .0938rem solid var(--border);
  border-radius: .75rem;
  outline: none; transition: border-color 200ms;
  -webkit-appearance: none; appearance: none;
}
textarea.b-input {
  height: auto; min-height: 6rem;
  padding: .75rem 1rem; resize: vertical;
}
.b-input:focus { border-color: var(--accent); }
.b-input::placeholder { color: var(--text-muted); }

select.b-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-book {
  display: block; width: 100%;
  padding: 1rem;
  font-family: inherit; font-size: 1.0625rem; font-weight: 600;
  color: white; background: var(--accent);
  border: none; border-radius: 61.25rem;
  cursor: pointer; transition: all 200ms;
  text-align: center; text-decoration: none;
}
.btn-book:hover { background: var(--accent-hover); }
.btn-book:disabled { opacity: .4; cursor: not-allowed; }

.btn-back {
  display: inline-flex; align-items: center;
  padding: .625rem 0;
  font-family: inherit; font-size: .9375rem;
  color: var(--accent); background: none;
  border: none; cursor: pointer;
}
.btn-back:hover { opacity: .7; }

/* ── Success Message ───────────────────────────────────────── */
.success-message {
  text-align: center; padding: 3rem 1.5rem;
}
.success-message .check {
  width: 4rem; height: 4rem; margin: 0 auto 1.25rem;
  border-radius: 50%; background: var(--success);
  color: white; font-size: 1.75rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.success-message h2 {
  font-size: 1.5rem; font-weight: 600;
  margin-bottom: .5rem;
}

/* ── Star Rating (Review page) ─────────────────────────────── */
.star-rating {
  display: flex; justify-content: center;
  gap: .5rem; margin: 1.25rem 0;
}
.star-btn {
  font-size: 2.25rem; background: none; border: none;
  color: var(--border); cursor: pointer;
  transition: color 200ms, transform 200ms;
  padding: 0; line-height: 1;
}
.star-btn.active, .star-btn:hover { color: #FFD700; }
.star-btn:active { transform: scale(1.15); }

/* ── Calculator Styles ─────────────────────────────────────── */
.calc-option {
  display: flex; align-items: center; gap: .75rem;
  width: 100%; text-align: left; font-family: inherit; color: var(--text); background: var(--card-bg);
  padding: .875rem 1rem;
  border: .0938rem solid var(--border);
  border-radius: .75rem; cursor: pointer;
  transition: all 200ms; margin-bottom: .5rem;
}
.calc-option:hover { border-color: var(--accent); }
.calc-option.selected {
  border-color: var(--accent);
  background: rgba(18,24,47,.045);
}
.calc-check {
  width: 1.375rem; height: 1.375rem; border-radius: .375rem;
  border: .0938rem solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 600; color: white;
  flex-shrink: 0; transition: all 200ms;
}
.calc-option.selected .calc-check {
  background: var(--accent); border-color: var(--accent);
}
.calc-total {
  font-size: 2.5rem; font-weight: 700;
  color: var(--accent); text-align: center;
  margin: 1.5rem 0; letter-spacing: -1px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .booking-container { padding: 2rem 1rem; }
  .booking-header h1 { font-size: 1.625rem; }
  .booking-card { padding: 1.25rem; border-radius: .75rem; }
  .slot { padding: .625rem .375rem; }
  .slot .day-num { font-size: 1.125rem; }
  .b-input { height: 2.75rem; font-size: 1rem; }
  .btn-book { padding: .875rem; font-size: 1rem; }
  .calc-total { font-size: 2rem; }
}

/* ══════════════════════════════════════════════════════════════
   NEU (API-Port): Auftragsstatus-Anzeige
   ══════════════════════════════════════════════════════════════ */
.status-badge {
  display: inline-flex; align-items: center; gap: .5625rem;
  font-size: .9375rem; font-weight: 700;
  padding: .5625rem 1.125rem; border-radius: 61.25rem;
}
.status-badge .status-dot { width: .625rem; height: .625rem; border-radius: 50%; flex-shrink: 0; }
.status-badge.pending { color: var(--accent); background: rgba(18,24,47,.1); }
.status-badge.pending .status-dot { background: var(--accent); }
.status-badge.ok { color: var(--success); background: rgba(52,199,89,0.12); }
.status-badge.ok .status-dot { background: var(--success); }
.status-badge.bad { color: var(--danger); background: rgba(255,59,48,0.12); }
.status-badge.bad .status-dot { background: var(--danger); }

.status-row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--border);
  font-size: .9375rem;
}
.status-row:last-child { border-bottom: none; }
.status-row .label { color: var(--text-muted); }
.status-row .value { font-weight: 600; text-align: right; }

/* ── Anfrage-Formulare (anfrage.js: Kontakt, Stellplatz, Gewerbe, XXL) ── */
.f-label { display: block; font-size: .875rem; font-weight: 650; color: var(--text); margin: 0 0 .5rem; }
.form-intro { color: var(--text-muted); font-size: .9375rem; margin: -.375rem 0 1.125rem; }
.form-hint { color: var(--text-muted); font-size: .8125rem; line-height: 1.4; margin-top: .5rem; }
.form-hint a { color: var(--accent); }
.has-error .b-input { border-color: var(--danger); }
.calc-option .opt-text { flex: 1; display: flex; flex-direction: column; gap: .125rem; }
.calc-option .opt-label { font-weight: 600; }
.calc-option .opt-sub { font-size: .8125rem; opacity: .75; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-family: inherit; font-size: .875rem; font-weight: 600; color: var(--text);
  background: var(--card-bg); border: .0938rem solid var(--border); border-radius: 61.25rem;
  padding: .5rem .875rem; cursor: pointer; transition: all 200ms;
}
.chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .625rem; }
.field-cell { display: block; }
.field-cell span { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: .25rem; }
.vehicle-row {
  display: grid; gap: .625rem; padding: .875rem; margin-bottom: .625rem;
  background: var(--bg); border: .0938rem solid var(--border); border-radius: .75rem;
}
.vehicle-row .field-row { grid-template-columns: 2fr 1fr; }
.vehicle-head { display: flex; justify-content: space-between; align-items: center; }
.vehicle-no { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.text-remove { font-family: inherit; font-size: .8125rem; color: var(--danger); background: none; border: none; cursor: pointer; padding: 0; }
.btn-add {
  display: block; width: 100%; padding: .75rem; font-family: inherit; font-size: .9375rem; font-weight: 600;
  color: var(--accent); background: transparent; border: .0938rem dashed var(--border); border-radius: .75rem;
  cursor: pointer; transition: border-color 200ms;
}
.btn-add:hover { border-color: var(--accent); }
.hp { position: absolute; left: -624.9375rem; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
a.btn-back { text-decoration: none; }
.success-message .btn-book { margin-top: 1.25rem; }
.success-message .btn-back { display: inline-block; margin-top: .75rem; }
@media (max-width: 520px) {
  .field-row, .vehicle-row .field-row { grid-template-columns: 1fr; }
}

/* ── Statusseite: selbst absagen / verschieben ─────────────── */
.status-change { margin-top: 1.5rem; }
.status-change .form-group label { display: block; margin-bottom: .5rem; }
.status-change-back { margin-top: .5rem; text-align: center; }
.status-change-hint { margin-top: .75rem; text-align: center; font-size: .8125rem; color: var(--text-muted); }
.status-change-hint a, .status-change .booking-copy a { color: inherit; text-decoration: underline; }
.status-change .btn-book + .status-change-back, .status-change .time-grid { margin-bottom: .25rem; }
.btn-book.btn-danger { background: var(--danger); }
.btn-book.btn-danger:hover { background: var(--danger); opacity: .9; }
.status-notice { text-align: center; font-weight: 600; color: var(--primary); border-color: var(--success); }
