/* Spa booking pages. Deliberately a separate file from /static/style.css
   (SPA_SPEC.md §11) so shuttle-page changes can't break the spa, and vice
   versa. Palette and the CSS logo are copied from style.css - the logo is
   still recreated in CSS until a real SVG/PNG exists. Fonts (2026-09-29):
   the guest page has real brand files (see @font-face below), unlike the
   shuttle page, which still stands Jost/Fraunces in for them. */

@font-face {
  font-family: 'Spa Futura';
  src: url('fonts/futura-light.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Spa Love';
  src: url('fonts/love-regular.otf') format('opentype');
  font-display: swap;
}

:root {
  color-scheme: light;

  --liv-navy: #113F61;
  --liv-blue: #3E617F;
  --liv-orange: #D46737;
  --liv-rust: #A85332;
  --liv-green: #1F4029;
  --liv-tan: #DAC5AE;
  --liv-mist: #CED9D7;
  --cream: #F9F6F0;

  /* 'Spa Futura'/'Spa Love' are the real brand files (only one weight each -
     the browser synthesizes bold from them where the CSS below asks for
     500/600). Neither covers Greek/Cyrillic/Hebrew, so for those scripts
     the browser falls through per-character to Jost/Fraunces/Noto, same as
     before. */
  --font-sans: 'Spa Futura', 'Jost', 'Noto Sans', 'Noto Sans Hebrew', -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Spa Love', 'Fraunces', 'Noto Serif', 'Noto Serif Hebrew', Georgia, serif;

  --ink: var(--liv-navy);
  --muted: var(--liv-blue);
  --border: var(--liv-mist);
  --accent: var(--liv-navy);
  --error: var(--liv-rust);
  --success: var(--liv-green);
  --surface: #ffffff;
  --ground: var(--cream);
  --radius: 14px;
}

/* An element's own display rule (grid/flex below) would otherwise beat the
   browser's [hidden] rule - the shuttle page hit this bug twice. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--liv-orange); outline-offset: 2px; }

/* --- header -------------------------------------------------------------- */

header.hero {
  position: relative;
  overflow: hidden;
  padding: 36px 16px 40px;
  background: var(--liv-navy);
  text-align: center;
}
header.hero::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 240px;
  height: 240px;
  background: var(--liv-orange);
  opacity: 0.16;
  border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%;
}
header.hero--compact { padding: 24px 16px 28px; }
.hero-inner { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  color: var(--cream);
  margin: 14px 0 4px;
}
.hero-subtitle { margin: 0; color: rgba(249, 246, 240, 0.78); font-size: 0.95rem; }

.brand-logo { position: relative; display: inline-flex; align-items: flex-end; padding-top: 16px; }
.brand-logo__mark {
  position: absolute;
  top: -4px;
  left: 0;
  width: 22px;
  height: 22px;
  background: var(--liv-orange);
  border-radius: 58% 42% 63% 37% / 48% 58% 42% 52%;
}
.brand-logo__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  color: var(--cream);
  padding-left: 26px;
}
.brand-logo__caption {
  display: block;
  margin-top: 3px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(249, 246, 240, 0.7);
}

/* --- layout ---------------------------------------------------------------- */

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 56px;
  display: grid;
  gap: 16px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  scroll-margin-top: 12px;
  min-width: 0;
}

.step h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
}
.step-no {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--liv-navy);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
}

.hint, .muted, .field-hint, .optional { color: var(--muted); }
.hint { margin: 12px 0 0; font-size: 0.92rem; }
.note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(206, 217, 215, 0.45);
  font-size: 0.92rem;
}
.center { text-align: center; }
a { color: var(--liv-navy); }

/* --- choices (hotel, guests) --------------------------------------------- */

.choices { display: grid; gap: 10px; }
.choices--row { grid-template-columns: 1fr 1fr; }

.choice, .option, .day, .slot {
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.choice { min-height: 52px; padding: 12px 14px; text-align: start; font-weight: 500; }
.choices--row .choice { text-align: center; }
.choice:hover, .option:hover, .day:not(:disabled):hover, .slot:hover { border-color: var(--liv-blue); }
.chosen, .choice.chosen, .option.chosen, .day.chosen, .slot.chosen {
  border-color: var(--liv-navy);
  background: var(--liv-navy);
  color: var(--cream);
}

/* --- treatments ------------------------------------------------------------ */

.treatments { display: grid; gap: 12px; }
.treatment {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.treatment h3 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 600; }
.desc { margin: 0; color: var(--muted); font-size: 0.93rem; }
.desc.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-button {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--liv-navy);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.option { min-height: 44px; padding: 8px 14px; font-weight: 500; }

.guest-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.picker + .picker, .picked + .picker, .picker + .picked { margin-top: 18px; }
.picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(206, 217, 215, 0.35);
}
.picked + .picked { margin-top: 10px; }
.picked strong { display: block; font-weight: 600; }
.picked .guest-label { margin-bottom: 2px; }

/* --- days + slots ---------------------------------------------------------- */

.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.day {
  flex: none;
  width: 62px;
  padding: 8px 0;
  display: grid;
  justify-items: center;
  gap: 1px;
  scroll-snap-align: start;
}
.day-wd, .day-mo { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.day-num { font-size: 1.25rem; font-weight: 600; }
.day:disabled {
  background: rgba(218, 197, 174, 0.22);
  border-color: transparent;
  color: rgba(62, 97, 127, 0.45);
  text-decoration: line-through;
}

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { min-height: 46px; font-weight: 500; font-variant-numeric: tabular-nums; }

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

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 500; }
input, select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 400;
}
input:focus, select:focus { border-color: var(--liv-navy); outline: none; }
.phone { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 8px; }
.field-hint { font-size: 0.85rem; font-weight: 400; }
.optional { font-weight: 400; }

.form-error { margin: 0; color: var(--error); font-weight: 500; }

button.primary, button.secondary, button.danger {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.02rem;
}
button.primary { border: 0; background: var(--liv-navy); color: var(--cream); }
button.primary:disabled { opacity: 0.6; }
button.secondary { border: 1.5px solid var(--liv-navy); background: var(--surface); color: var(--liv-navy); }
button.danger { border: 1.5px solid var(--liv-rust); background: var(--surface); color: var(--liv-rust); margin-top: 8px; }

/* --- summary + confirmation --------------------------------------------- */

.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0 0 14px;
}
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.pay-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(212, 103, 55, 0.1);
  color: var(--liv-rust);
  font-weight: 600;
  text-align: center;
}

.confirmed { text-align: center; }
.confirmed .summary { text-align: start; }
.confirmed h2 { justify-content: center; }
.tick {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}
.tick::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 14px;
  width: 12px;
  height: 22px;
  border: solid var(--cream);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.link-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(206, 217, 215, 0.35);
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.status {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.status--confirmed { background: rgba(31, 64, 41, 0.12); color: var(--success); }
.status--cancelled { background: rgba(168, 83, 50, 0.12); color: var(--liv-rust); }

/* --- getting there from LIV & CO, reception buttons, Find my bookings ------- */

.transport-note {
  padding: 12px 14px;
  border-radius: 10px;
  border-inline-start: 4px solid var(--liv-orange);
  background: rgba(212, 103, 55, 0.08);
}
.transport-note p { margin: 4px 0 0; }

.reception {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(206, 217, 215, 0.35);
  text-align: start;
}
.reception p { margin: 0 0 10px; }
/* WhatsApp is the main way to reach reception, so it gets the full width */
.reception-buttons, .button-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.button-row { grid-template-columns: 1fr; margin-bottom: 14px; }
a.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
a.button.secondary { border: 1.5px solid var(--liv-navy); background: var(--surface); color: var(--liv-navy); }
/* WhatsApp's own green, so guests recognise the button instantly */
a.button.whatsapp { background: #1f7a4d; color: #fff; border: 1.5px solid #1f7a4d; }

.found-list { display: grid; gap: 10px; }
a.found {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
}
a.found:hover { border-color: var(--liv-navy); }

/* --- SMS (SPA_SPEC.md §10) ------------------------------------------------ */

.sms-field { display: grid; gap: 4px; }
label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; cursor: pointer; }
label.check input { width: 20px; height: 20px; min-height: 20px; margin: 0; accent-color: var(--liv-navy); flex: none; }
.attend {
  margin: 0 0 16px;
  padding: 16px;
  border: 1.5px solid var(--liv-navy);
  border-radius: 12px;
  background: rgba(17, 63, 97, 0.05);
}
.attend h2 { margin: 0 0 4px; }
.attend p { margin: 0 0 12px; }
.attend-done {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(31, 64, 41, 0.12);
  color: var(--success);
  font-weight: 600;
}
.sms-stop { margin: 14px 0 0; text-align: center; }

/* --- languages (SPA_SPEC.md §11) ---------------------------------------- */

/* Until i18n.js has put the chosen language in, don't flash English. */
.i18n-loading main, .i18n-loading .hero-title, .i18n-loading .hero-subtitle { visibility: hidden; }

.lang-switch {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: -12px 0 18px;
}
.lang-switch button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid rgba(249, 246, 240, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-switch button.chosen { background: var(--cream); color: var(--liv-navy); border-color: var(--cream); }
/* Windows has no flag emoji of its own - the Noto font supplies them. */
.lang-switch .flag { font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 1rem; line-height: 1; }

/* Right-to-left (Hebrew). Most of the layout is grid/flex and flips by
   itself; these are the few places with a physical side. The LIV logo,
   phone numbers and the booking link stay left-to-right. */
[dir="rtl"] header.hero::after { right: auto; left: -70px; }
[dir="rtl"] .phone input { text-align: left; }
