:root {
  color-scheme: light;

  /* LIV Collection brand palette */
  --liv-navy: #113F61;
  --liv-blue: #3E617F;
  --liv-orange: #D46737;
  --liv-rust: #A85332;
  --liv-green: #1F4029;
  --liv-gold: #E1AF43;
  --liv-gold-ink: #8A6314;
  --liv-tan: #DAC5AE;
  --liv-mist: #CED9D7;
  --cream: #F9F6F0;

  /* Uri's page (no body.brand) keeps these system-font defaults; the guest
     pages use the brand book's real fonts - see body.brand below. */
  --font-sans: 'Jost', -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  --ink: var(--liv-navy);
  --muted: var(--liv-blue);
  --border: var(--liv-mist);
  --accent: var(--liv-rust);
  --accent-contrast: #ffffff;
  --error: var(--liv-rust);
  --success: var(--liv-green);
  --surface: #ffffff;
  --ground: var(--cream);
  --disabled-bg: rgba(218, 197, 174, 0.28);
}

/* The brand book's fonts (same files as the spa and events pages): Futura PT
   Light for text, LOVE Regular for display. Guest pages only (body.brand),
   so Uri's page is unchanged. Only the Light cut of Futura exists here -
   bolder text is the browser's synthetic bold, as on the spa pages. */
@font-face {
  font-family: 'Shuttle Futura';
  src: url('fonts/futura-light.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Shuttle Love';
  src: url('fonts/love-regular.otf') format('opentype');
  font-display: swap;
}
body.brand {
  --font-sans: 'Shuttle Futura', -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Shuttle Love', Georgia, serif;
}
/* LOVE has a single weight - don't fake-bold it. */
body.brand .hero-title, body.brand .brand-logo__word { font-weight: 400; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
}

header {
  padding: 24px 20px 8px;
  text-align: center;
}

header h1 { margin: 0; font-size: 1.5rem; color: var(--ink); }
.subtitle { color: var(--muted); margin: 4px 0 0; font-size: 0.9rem; }

/* Guest hero header (index.html only - Uri's plain <header> keeps the base style above) */
header.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 20px 44px;
  background: var(--liv-navy);
}
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%;
}
.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.3rem);
  color: var(--cream);
  margin: 16px 0 6px;
  letter-spacing: 0.01em;
}
.hero-subtitle {
  font-family: var(--font-sans);
  color: rgba(249, 246, 240, 0.78);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin: 0;
}

/* LIV logo, recreated from the brand book (organic dot mark + wordmark) since
   no exported logo file was available. Replace .brand-logo's markup with an
   <img>/<svg> here if a real logo file (SVG/PNG, transparent) shows up. */
.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;
  letter-spacing: 0.01em;
  color: var(--liv-navy);
  padding-left: 26px;
}
.brand-logo__caption {
  display: block;
  margin-top: 3px;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--liv-navy);
}
header.hero .brand-logo__word { color: var(--cream); }
header.hero .brand-logo__caption { color: rgba(249, 246, 240, 0.7); }

.brand-logo--small { padding-top: 0; }
.brand-logo--small .brand-logo__mark { width: 13px; height: 13px; top: -1px; }
.brand-logo--small .brand-logo__word { font-size: 1.05rem; padding-left: 17px; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 48px;
  display: grid;
  gap: 18px;
}

body.wide main { max-width: 1100px; }

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(17, 63, 97, 0.05);
}

h2 {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--liv-navy);
}
h2::before {
  content: "";
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  background: var(--liv-orange);
  border-radius: 58% 42% 63% 37% / 48% 58% 42% 52%;
}
h3, h4 { margin-top: 0; font-family: var(--font-sans); font-weight: 600; color: var(--liv-navy); }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

label, .field {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Any display rule (like form's below) outranks the browser's built-in
   [hidden] { display: none }, so elements toggled via .hidden stayed visible. */
[hidden] { display: none !important; }

form { display: grid; gap: 14px; }

input, select {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
/* Guest phone: country code picker + number side by side */
.phone { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px; }
.phone input { min-width: 0; }

input:focus, select:focus {
  outline: none;
  border-color: var(--liv-blue);
  box-shadow: 0 0 0 3px rgba(62, 97, 127, 0.15);
}

button {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
}
button:hover:not(:disabled) { filter: brightness(0.92); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; }
button.secondary {
  background: var(--surface);
  color: var(--liv-navy);
  border: 1.5px solid var(--border);
}
button.secondary:hover:not(:disabled) { border-color: var(--liv-blue); }

/* Timetable */
#timetable { display: grid; gap: 10px; }
.no-service {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--disabled-bg);
  color: var(--liv-navy);
  font-weight: 600;
}

.trip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trip-card:not(.unavailable):hover { border-color: var(--liv-blue); box-shadow: 0 2px 10px rgba(17, 63, 97, 0.08); }
.trip-card.unavailable { background: var(--disabled-bg); }

.trip-card .route { font-weight: 600; color: var(--liv-navy); display: flex; align-items: center; gap: 8px; }
.route-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--liv-orange);
  border-radius: 58% 42% 63% 37% / 48% 58% 42% 52%;
}
.trip-card.unavailable .route-dot { background: var(--liv-tan); }
.trip-card .meta { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

/* Stops: every shuttle stop has its own brand colour wherever a route is
   shown, so a guest can't mix up where they're picked up and where they're
   going. Keyed by app.js/booking.js placeSlug(); an unknown stop is navy. */
.stop {
  --stop: var(--liv-navy);
  --stop-ink: #ffffff;
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--stop);
  color: var(--stop-ink);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
}
.stop[data-place="liv-co"] { --stop: var(--liv-rust); }
.stop[data-place="liv-mackenzie"] { --stop: var(--liv-green); }
.stop[data-place="city-center"] { --stop: var(--liv-gold); --stop-ink: var(--liv-navy); }

.stops { display: grid; gap: 6px; }
.stops__row { display: flex; align-items: center; gap: 8px; }
.stops__label {
  min-width: 2.9em;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.trip-card.unavailable .stop { opacity: 0.55; }

/* The card's left edge carries the departure stop's colour. */
.trip-card[data-origin] { border-left-width: 6px; }
.trip-card[data-origin="liv-co"] { border-left-color: var(--liv-rust); }
.trip-card[data-origin="liv-mackenzie"] { border-left-color: var(--liv-green); }
.trip-card[data-origin="city-center"] { border-left-color: var(--liv-gold); }

/* Timetable grouped by departure stop */
.origin-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.origin-heading:first-child { margin-top: 0; }
.origin-heading .stop { font-size: 0.95rem; letter-spacing: 0; text-transform: none; }

#dialog-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.option-route { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px; }
#return-options-list .hint { display: block; margin-top: 4px; font-size: 0.8rem; }

.status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.status--available { background: rgba(31, 64, 41, 0.1); color: var(--liv-green); }
.status--low { background: rgba(225, 175, 67, 0.2); color: var(--liv-gold-ink); }
.status--soldout { background: rgba(168, 83, 50, 0.12); color: var(--liv-rust); }
.status--blocked { background: rgba(218, 197, 174, 0.4); color: #6b5847; }
.status--waiting { background: rgba(206, 217, 215, 0.55); color: var(--liv-blue); }

.booking-rules {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.booking-rules p { margin: 0 0 6px; }

/* Booking dialog */
/* :not([hidden]) matters here - a plain #id selector setting display:flex
   would outrank the browser's built-in [hidden]{display:none} rule (ID
   beats attribute selector), so the dialog would show on every page load
   regardless of the hidden attribute. */
#booking-dialog-backdrop:not([hidden]) {
  position: fixed;
  inset: 0;
  background: rgba(17, 63, 97, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

#booking-dialog {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  padding: 28px 24px 22px;
  max-width: 440px;
  width: 100%;
  display: grid;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(17, 63, 97, 0.25);
}
#booking-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 4px;
  background: var(--liv-orange);
  border-radius: 0 0 4px 4px;
}

#dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  color: var(--muted);
  font-size: 1.3rem;
  padding: 4px 9px;
  border-radius: 8px;
}
#dialog-close:hover:not(:disabled) { filter: none; background: rgba(62, 97, 127, 0.1); color: var(--liv-navy); }

/* Same [hidden]-vs-ID-selector specificity issue as the dialog backdrop
   above - bookingForm.hidden is set to true after a successful booking. */
#booking-form:not([hidden]) { display: grid; gap: 12px; }

#dialog-message { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; }
#dialog-message.error { color: var(--error); }
#dialog-message.success { color: var(--success); }

#return-options-list,
#seating-choice-list { display: grid; gap: 8px; margin-bottom: 10px; }
#seating-choice-text { margin: 0 0 12px; }

#cancel-token-box {
  background: rgba(31, 64, 41, 0.06);
  border: 1px solid rgba(31, 64, 41, 0.22);
  border-radius: 12px;
  padding: 12px 16px;
}
#cancel-token-list { margin: 8px 0 0; padding-left: 18px; }
#cancel-token-list li { margin-bottom: 4px; }
#cancel-token-list strong { color: var(--liv-navy); }

.cancel-block { display: grid; gap: 12px; }
.cancel-block + .cancel-divider { margin-top: 4px; }
.cancel-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cancel-divider::before, .cancel-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

#cancel-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
#cancel-form .field { flex: 1 1 200px; }
#cancel-message { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; }
#cancel-message.error { color: var(--error); }
#cancel-message.success { color: var(--success); }
#lookup-message { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; }
#lookup-message.error { color: var(--error); }
#lookup-results { display: grid; gap: 10px; margin-top: 4px; }
#lookup-results .trip-card { padding: 12px 14px; }

/* Guest's own booking page (static/shuttle/booking.html) */
#booking { display: grid; gap: 14px; }
#booking-message { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; }
#booking-message.error { color: var(--error); }
#booking-message.success { color: var(--success); }
#booking ~ .hint a { color: var(--accent); font-weight: 600; }

@media (max-width: 480px) {
  #cancel-form { flex-direction: column; align-items: stretch; }
}

.site-footer {
  text-align: center;
  padding: 4px 20px 44px;
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer p { margin: 8px 0 0; }

/* Uri page */
.uri-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#block-mode-toggle.active { background: #c98a1a; }
#uri-calendar { margin-top: 12px; touch-action: manipulation; }
.hint { color: var(--muted); font-size: 0.85rem; }

/* Bigger tap targets for the tap-to-block flow on a phone - FullCalendar's
   default slot rows are comfortable with a mouse pointer but too thin to
   tap accurately with a finger. */
#uri-calendar .fc-timegrid-slot { height: 3em; }
