/* ==========================================================================
   booking-page-starter — styles.css
   Mobile-first, warm neutral palette, no external fonts or frameworks.
   Laid out to work at 390px width with no horizontal page overflow.
   ========================================================================== */

:root {
  --bg: #f7f2ec;
  --bg-deep: #f0e7db;
  --surface: #ffffff;
  --surface-warm: #fdfaf5;
  --ink: #2d2420;
  --ink-soft: #6b5e52;
  --ink-mute: #7d6d58;
  --accent: #9c5b48;
  --accent-strong: #7c4535;
  --accent-soft: #f3e3dc;
  --line: #e6dbc9;
  --line-strong: #d8c9b3;
  --ok: #2f6b4a;
  --ok-soft: #e3efe6;
  --warn: #7c4e21;
  --warn-soft: #f6ecdb;
  --danger: #9c352d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(45, 36, 32, 0.05), 0 10px 30px rgba(45, 36, 32, 0.07);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

/* ---- base ---- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

.container { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

/* ---- hero ---- */

.hero {
  background: linear-gradient(180deg, var(--bg-deep), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 30px 0 22px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero-intro { margin: 0; max-width: 46ch; color: var(--ink-soft); font-size: 15.5px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn-call, .btn-primary { background: var(--accent); color: #ffffff; }
.btn-call:hover, .btn-primary:hover { background: var(--accent-strong); }

.btn-primary:disabled { opacity: 0.65; cursor: progress; }

.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.btn-block { width: 100%; }

/* ---- cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 18px 0;
}

.card-title { margin: 2px 0 16px; font-family: var(--font-display); font-size: 24px; line-height: 1.2; }

/* ---- step indicator ---- */

.steps { display: flex; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; }

.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-mute);
  font-size: 13px;
}

.step-num {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-warm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.step-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.step.is-current { color: var(--ink); font-weight: 600; }
.step.is-current .step-num { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }

.step.is-done { color: var(--ink-soft); }
.step.is-done .step-num { background: var(--accent); border-color: var(--accent); color: #ffffff; }

/* ---- step panels ---- */

.step-panel + .step-panel { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }

.panel-heading { margin: 0 0 12px; font-family: var(--font-display); font-size: 19px; line-height: 1.25; }

/* ---- service picker ---- */

.service-list { display: grid; gap: 10px; min-inline-size: 0; border: 0; margin: 0; padding: 0; }

.service {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--surface-warm);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.service:hover { border-color: var(--line-strong); }

.service input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.service:has(input:focus-visible) { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

.service.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.service-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.service-name { font-weight: 600; }
.service-meta { font-size: 13px; color: var(--ink-soft); }
.service-price { font-weight: 700; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- date chips ---- */

.date-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.date-chip {
  flex: none;
  width: 66px;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  background: var(--surface-warm);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.date-chip:hover:not(:disabled) { border-color: var(--line-strong); }

.chip-dow { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.chip-day { font-size: 20px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.chip-month { font-size: 12px; color: var(--ink-soft); }
.chip-month.chip-closed { font-size: 11px; color: var(--ink-mute); }

.date-chip:disabled { opacity: 0.45; cursor: not-allowed; background: transparent; }

.date-chip.is-selected { background: var(--accent); border-color: var(--accent); }
.date-chip.is-selected .chip-dow { color: rgba(255, 255, 255, 0.85); }
.date-chip.is-selected .chip-day { color: #ffffff; }
.date-chip.is-selected .chip-month { color: rgba(255, 255, 255, 0.85); }

/* ---- time slots ---- */

.slot-meta { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); }

.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.slot {
  min-height: 46px;
  padding: 8px 4px;
  background: var(--surface-warm);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.slot:hover:not(:disabled) { border-color: var(--line-strong); }

.slot.is-selected { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.slot.is-booked { background: var(--bg-deep); color: var(--ink-mute); cursor: not-allowed; }
.slot.is-past { background: transparent; border-style: dashed; color: var(--ink-mute); cursor: not-allowed; }

.slot-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); }

/* ---- booking form ---- */

.form-summary {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--surface-warm);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-soft);
}

.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.field label { font-size: 14px; font-weight: 600; }

.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(156, 91, 72, 0.18);
}

.field input[aria-invalid="true"] { border-color: var(--danger); }

.field-hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
.field-error { margin: 0; font-size: 13.5px; color: var(--danger); font-weight: 500; }

/* ---- confirmation ---- */

.confirm { text-align: center; padding: 26px 20px; }

.confirm-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-icon svg { width: 28px; height: 28px; }

.confirm h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 26px; }
.confirm-sub { margin: 0 0 18px; color: var(--ink-soft); font-size: 15px; }

.confirm-rows { margin: 0; text-align: left; border-top: 1px solid var(--line); }

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}

.confirm-row dt { flex: none; font-size: 14px; color: var(--ink-soft); }
.confirm-row dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.confirm-ref {
  margin: 18px 0;
  padding: 14px;
  background: var(--accent-soft);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.confirm-ref-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.confirm-ref-code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

.confirm-status {
  margin: 0 0 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: left;
}

.confirm-status.is-pending { background: var(--surface-warm); border: 1px solid var(--line); color: var(--ink-soft); }
.confirm-status.is-ok { background: var(--ok-soft); color: var(--ok); }
.confirm-status.is-warn { background: var(--warn-soft); color: var(--warn); }

.confirm-hint { margin: 0 0 16px; font-size: 13px; color: var(--ink-soft); }

/* ---- opening hours & cancellation ---- */

.info { margin: 4px 0 0; }

.info-card h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 20px; }
.info-card p { margin: 0 0 8px; color: var(--ink-soft); font-size: 15px; }
.info-card p:last-child { margin-bottom: 0; }

.text-link { color: var(--accent-strong); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 2px; }

.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours th, .hours td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { text-align: left; font-weight: 600; }
.hours td { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hours td.closed { font-style: italic; }

/* ---- footer ---- */

.footer {
  margin-top: 26px;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.footer p { margin: 3px 0; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); }
.footer-fine { font-size: 12.5px; }

/* ---- wider screens ---- */

@media (min-width: 720px) {
  .container { max-width: 660px; }
  .hero { padding: 52px 0 30px; }
  .hero-title { font-size: 42px; }
  .hero-intro { font-size: 16.5px; }
  .info { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .info .card { margin: 0; }
  .slot-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
