:root {
  --accent: #0d9488; /* overridden by booking.js from window.BOOKING_DATA.accent_color */
  --accent-bg: rgba(13,148,136,.08);
  --bg: #f1f5f9;
  --surface: #ffffff;
  --header: #0f172a;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --r: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 4px 14px rgba(0,0,0,.05);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;   /* avoids the iOS Safari address-bar height jump */
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────── */
.header {
  background: var(--header);
  background-image: radial-gradient(var(--wm-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: 2rem 1rem 1.75rem;
  text-align: center;
}

/* Wordmark */
.wordmark { margin-bottom: 0.15rem; }
.wm-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.4rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  background: linear-gradient(160deg, var(--wm-dark) 0%, var(--wm-light) 38%, var(--wm-hi) 55%, var(--wm-dark) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.wm-sub {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #94a3b8;
  text-transform: uppercase;
  display: block;
  margin-top: 0.3rem;
}
.wm-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.65rem auto;
  max-width: 200px;
  color: var(--wm-dark);
  font-size: 0.55rem;
  opacity: 0.6;
}
.wm-rule::before, .wm-rule::after {
  content: '';
  flex: 1;
  height: 1px;
}
.wm-rule::before { background: linear-gradient(90deg, transparent, var(--wm-line)); }
.wm-rule::after  { background: linear-gradient(90deg, var(--wm-line), transparent); }

.header-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: #64748b;
}
.header-contact a { color: #64748b; text-decoration: none; transition: color .15s; }
.header-contact a:hover { color: #94a3b8; }
.hc-sep { opacity: 0.35; color: #64748b; }

/* ── Step bar ────────────────────────────────────────── */
.step-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem 0.65rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  max-width: 54px;
  transition: color .2s;
}
.step-connector {
  height: 2px;
  flex: 1;
  min-width: 8px;
  background: var(--border);
  margin: 0 0.15rem;
  margin-top: 13px;
  transition: background .2s;
}
.step-item.active .step-circle  { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-item.active .step-label   { color: var(--accent); }
.step-item.done .step-circle    { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-item.done .step-circle::before { content: '✓'; }
.step-item.done .step-circle span    { display: none; }
.step-item.done + .step-connector   { background: var(--accent); }

/* ── Page container ──────────────────────────────────── */
.page {
  max-width: 660px;
  margin: 0 auto;
  padding: 1.75rem 1rem 0.5rem;
}

/* ── Section heading ─────────────────────────────────── */
.sec-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}
.sec-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -0.6rem;
  margin-bottom: 1.1rem;
}

/* ── Card grid (services / staff) ────────────────────── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .12s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.card:hover                 { border-color: var(--accent); box-shadow: var(--shadow); }
.card:active                { transform: scale(.985); }
.card.selected              { border-color: var(--accent); background: var(--accent-bg); }
.card.selected::after {
  content: '✓';
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-name  { font-weight: 700; font-size: 1rem; padding-right: 1.5rem; }
.card-sub   { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }
.card-price { font-size: 1rem; font-weight: 800; color: var(--accent); margin-top: 0.6rem; }

/* Staff card variant */
.staff-row { display: flex; align-items: center; gap: 0.75rem; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.avatar.nopref { background: #e2e8f0; color: var(--muted); font-size: 1.3rem; }
.staff-name { font-weight: 700; font-size: 1rem; padding-right: 1rem; }
.staff-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.staff-vac-note { font-size: 0.75rem; color: #b45309; margin-top: 0.2rem; font-weight: 500; }

/* ── Service search ──────────────────────────────────── */
.search-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}
.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
  line-height: 1;
}
.search-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }

/* ── Service category accordion ──────────────────────── */
.cat-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 0.6rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  gap: 0.75rem;
}
.cat-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.cat-icon { font-size: 1.25rem; line-height: 1; }
.cat-name { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.cat-count {
  font-size: 0.7rem; font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}
.cat-chevron {
  color: var(--muted);
  font-size: 1rem;
  transition: transform .22s ease;
  flex-shrink: 0;
}
.cat-section.open .cat-chevron { transform: rotate(180deg); }
.cat-body {
  display: none;
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid var(--border);
}
.cat-section.open .cat-body { display: block; }
.cat-body .grid { padding-top: 0.75rem; }

/* ── Date + time layout ───────────────────────────────── */
.dt-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 520px) { .dt-wrap { grid-template-columns: 1fr; } }

/* ── Calendar ────────────────────────────────────────── */
.cal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.85rem;
}
.cal-month { font-weight: 700; font-size: 0.9rem; }
.cal-nav {
  width: 44px; height: 44px;
  border: 1px solid var(--border); border-radius: 10px; background: none;
  cursor: pointer; color: var(--muted); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
}
.cal-nav:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.cal-dow {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  color: var(--muted); text-align: center; padding: 0.35rem 0;
  letter-spacing: .03em;
}
.cal-day {
  aspect-ratio: 1; border-radius: 8px; border: none; background: none;
  cursor: pointer; font-size: 0.85rem; font-weight: 500; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: background .1s, color .1s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.cal-day:hover:not(.off):not(.past) { background: var(--accent-bg); }
.cal-day:active:not(.off):not(.past):not(.empty) { transform: scale(.88); }
.cal-day.today  { font-weight: 800; color: var(--accent); }
.cal-day.sel    { background: var(--accent) !important; color: #fff !important; border-radius: 8px; }
.cal-day.off, .cal-day.past { color: #cbd5e1; cursor: default; }
.cal-day.empty  { cursor: default; }

/* ── Time slots ──────────────────────────────────────── */
.slots {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem;
  box-shadow: var(--shadow);
  min-height: 140px;
}
.slots-note {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}
.slots-head {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 0.75rem;
}
.slots-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
@media (max-width: 540px) { .slots-grid { grid-template-columns: repeat(2,1fr); } }
.slot {
  border: 1.5px solid var(--border); background: #fff; border-radius: 10px;
  padding: 0.65rem 0.4rem; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; color: var(--text); text-align: center;
  transition: border-color .12s, color .12s, background-color .12s, transform .12s;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px; display: flex; align-items: center; justify-content: center;
}
.slot:hover   { border-color: var(--accent); color: var(--accent); }
.slot:active  { transform: scale(.96); }
.slot.sel     { background: var(--accent); border-color: var(--accent); color: #fff; }
.slots-msg {
  color: var(--muted); font-size: 0.84rem;
  text-align: center; padding: 1.25rem 0; line-height: 1.5;
}

/* ── Summary bar ─────────────────────────────────────── */
.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.sum-item { display: flex; flex-direction: column; gap: 0.2rem; }
.sum-key {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.sum-val { font-size: 0.95rem; font-weight: 600; color: var(--text); }

/* ── Contact form ────────────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: 0.84rem; font-weight: 600;
  margin-bottom: 0.4rem; color: var(--text);
}
.field input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 0.75rem 1rem; font-size: 1rem; font-family: inherit;
  color: var(--text); background: #fff; outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}
.field input:focus { border-color: var(--accent); }
.field input.err   { border-color: #ef4444; }
.err-msg { color: #ef4444; font-size: 0.81rem; margin-top: 1rem; }

/* ── Nav buttons ─────────────────────────────────────── */
.nav {
  display: flex; gap: 0.75rem; margin-top: 1.5rem;
  position: sticky; bottom: 0;
  background: var(--bg);
  padding: 0.75rem 0 1.25rem;
  border-top: 1px solid var(--border);
  z-index: 10;
}
.btn-back {
  background: none; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 0.8rem 1.2rem; font-size: 0.9rem; font-weight: 600;
  color: var(--muted); cursor: pointer; flex-shrink: 0;
  transition: border-color .15s, color .15s; font-family: inherit;
}
.btn-back:hover { border-color: #94a3b8; color: var(--text); }
.btn-next {
  flex: 1; background: var(--accent); border: none; border-radius: 10px;
  padding: 0.85rem 1.5rem; font-size: 0.95rem; font-weight: 700;
  color: #fff; cursor: pointer; font-family: inherit;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-next:hover:not(:disabled)   { opacity: .88; }
.btn-next:active:not(:disabled)  { transform: scale(.98); }
.btn-next:disabled               { opacity: .38; cursor: default; }

/* ── Confirmation ────────────────────────────────────── */
.confirm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.confirm-ring {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent-bg); border: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem; font-size: 2rem;
  animation: pop .35s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm h2   { font-size: 1.5rem; font-weight: 800; margin-bottom: .4rem; }
.confirm-sub  { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.75rem; line-height: 1.5; }
.confirm-table {
  background: var(--bg); border-radius: 10px;
  padding: 0.25rem 1rem; text-align: left; margin-bottom: 1.5rem;
}
.confirm-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.65rem 0; font-size: 0.9rem;
}
.confirm-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.crow-k { color: var(--muted); }
.crow-v { font-weight: 600; }
.btn-again {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 0.85rem 2rem; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; width: 100%; font-family: inherit;
  transition: opacity .15s;
}
.btn-again:hover { opacity: .88; }

/* ── Service quantity controls ───────────────────────── */
.card.selected.has-qty::after { display: none; } /* suppress checkmark when qty row is showing */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.qty-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: none;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  transition: background .12s, color .12s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.qty-btn:hover:not(:disabled) { background: var(--accent); color: #fff; }
.qty-btn:disabled, .qty-btn.qty-max { opacity: .3; cursor: default; }
.qty-val {
  font-size: 1.05rem;
  font-weight: 700;
  min-width: 1.5ch;
  text-align: center;
  color: var(--accent);
}

/* ── Service multi-select summary ────────────────────── */
.svc-summary {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  padding: 0.75rem 0 0;
}

/* ── Per-service staff sections ──────────────────────── */
.staff-service-section { margin-bottom: 1.75rem; }
.staff-service-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* ── Generic helpers ─────────────────────────────────── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { color: var(--muted); font-size: 0.88rem; text-align: center; padding: 2.5rem 1rem; line-height: 1.6; }

/* ── Per-service schedule step (different techs → separate times) ── */
.sched-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.25rem; }
.sched-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--r);
  padding: 1rem 1.15rem; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.sched-row:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.sched-row.done { border-color: var(--accent); background: var(--accent-bg); }
.sched-main { min-width: 0; }
.sched-svc  { font-weight: 700; font-size: 0.98rem; }
.sched-meta { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }
.sched-when { font-size: 0.86rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.sched-row:not(.done) .sched-when { color: var(--muted); }

.btn-outline {
  background: none; border: 1.5px solid var(--border); border-radius: 10px;
  padding: .8rem 1.2rem; font-size: .92rem; font-weight: 600; color: var(--text);
  cursor: pointer; font-family: inherit; text-align: center; text-decoration: none;
  transition: border-color .15s;
}
.btn-outline:hover { border-color: #94a3b8; }

/* ── Accessibility: keyboard focus rings on interactive controls ── */
.slot:focus-visible, .cal-day:focus-visible, .cal-nav:focus-visible,
.btn-next:focus-visible, .btn-back:focus-visible, .btn-outline:focus-visible,
.qty-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Time-slot skeleton (shown while availability loads) ── */
.sk-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
@media (max-width: 540px) { .sk-grid { grid-template-columns: repeat(2,1fr); } }
.sk-slot {
  height: 44px; border-radius: 10px;
  background: var(--border);
  animation: sk-pulse 1.1s ease-in-out infinite;
}
.sk-slot:nth-child(2) { animation-delay: .12s; }
.sk-slot:nth-child(3) { animation-delay: .24s; }
.sk-slot:nth-child(4) { animation-delay: .36s; }
.sk-slot:nth-child(5) { animation-delay: .48s; }
.sk-slot:nth-child(6) { animation-delay: .60s; }
@keyframes sk-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ── Respect users who prefer reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* "Set one time for all" button on the schedule step */
.sched-all { display: block; width: 100%; margin-bottom: 1rem; }
