/* ============================================
   BOOKING PAGE - Dedicated Styles
   ============================================ */

.book-page {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 100vh;
}

/* ---- Atmosphere Panel (Left) ---- */
.book-atmosphere {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.book-atmosphere__bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  background-size: cover;
  background-position: center;
}

/* When a workshop is selected, .book-atmosphere--cycling is removed and the
   chosen bg gets this class — opacity 1, locked. */
.book-atmosphere__bg--active {
  opacity: 1;
}

/* Default cycling state: 7 layers cross-fade through the workshop photos.
   Each layer takes 7s, total cycle is 49s. The animation only runs when
   the parent has --cycling. */
.book-atmosphere--cycling .book-atmosphere__bg {
  animation: book-atmosphere-cycle 49s infinite ease-in-out;
}
.book-atmosphere--cycling .book-atmosphere__bg:nth-child(1) { animation-delay:  0s; }
.book-atmosphere--cycling .book-atmosphere__bg:nth-child(2) { animation-delay:  7s; }
.book-atmosphere--cycling .book-atmosphere__bg:nth-child(3) { animation-delay: 14s; }
.book-atmosphere--cycling .book-atmosphere__bg:nth-child(4) { animation-delay: 21s; }
.book-atmosphere--cycling .book-atmosphere__bg:nth-child(5) { animation-delay: 28s; }
.book-atmosphere--cycling .book-atmosphere__bg:nth-child(6) { animation-delay: 35s; }
.book-atmosphere--cycling .book-atmosphere__bg:nth-child(7) { animation-delay: 42s; }

@keyframes book-atmosphere-cycle {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  14%  { opacity: 1; }   /* hold ~5s of the 7s slot */
  18%  { opacity: 0; }
  100% { opacity: 0; }
}

.book-atmosphere__overlay {
  position: absolute;
  inset: 0;
  /* Stronger overlay since we're now layering over bright workshop photos.
     Top is lighter so the photo shows through; bottom is darker where text lives. */
  background: linear-gradient(180deg,
    hsla(30,20%,8%,0.35) 0%,
    hsla(30,20%,8%,0.55) 45%,
    hsla(30,20%,8%,0.78) 100%);
  z-index: 1;
}

.book-atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px;
  pointer-events: none;
}

.book-atmosphere__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 32px 40px 48px;
  color: hsla(35, 50%, 97%, 0.9);
}

.book-atmosphere__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: hsla(35, 50%, 97%, 0.6);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.book-atmosphere__back:hover {
  color: hsla(35, 50%, 97%, 1);
}

.book-atmosphere__info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.book-atmosphere__stars {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-size: 12px;
}

.book-atmosphere__stars span {
  margin-left: 8px;
  color: hsla(35, 50%, 97%, 0.5);
  font-weight: 500;
}

.book-atmosphere__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
  transition: opacity 0.4s ease;
}

.book-atmosphere__desc {
  font-size: 15px;
  line-height: 1.7;
  color: hsla(35, 50%, 97%, 0.6);
  max-width: 380px;
  transition: opacity 0.4s ease;
}

.book-atmosphere__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.book-atmosphere__feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: hsla(35, 50%, 97%, 0.5);
  letter-spacing: 0.3px;
}

.book-atmosphere__chat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  border: 1px solid hsla(35, 50%, 97%, 0.2);
  border-radius: 8px;
  color: hsla(35, 50%, 97%, 0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  width: fit-content;
}

.book-atmosphere__chat:hover {
  border-color: hsla(35, 50%, 97%, 0.5);
  color: hsla(35, 50%, 97%, 1);
  background: hsla(35, 50%, 97%, 0.05);
}

/* ---- Form Panel (Right) ---- */
.book-form-panel {
  background: var(--white);
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.book-form-panel__inner {
  width: 100%;
  max-width: 520px;
}

/* ---- Venue Toggle ---- */
.venue-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.venue-toggle__option input { display: none; }

.venue-toggle__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  color: var(--ink-muted);
}

.venue-toggle__card:hover {
  border-color: var(--sage);
  background: var(--sage-light);
}

.venue-toggle__option--active .venue-toggle__card {
  border-color: var(--sage);
  background: var(--sage-light);
  color: var(--ink);
}

.venue-toggle__label {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
}

.venue-toggle__hint {
  font-size: 11px;
  color: var(--ink-muted);
}

/* ---- Form Select ---- */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ---- Form Hint ---- */
.form-hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 6px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .book-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .book-atmosphere {
    min-height: 300px;
  }

  .book-atmosphere__content {
    padding: 24px;
  }

  .book-atmosphere__title {
    font-size: 32px;
  }

  .book-atmosphere__features {
    display: none;
  }

  .book-form-panel {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .book-atmosphere {
    min-height: 220px;
  }

  .book-atmosphere__desc {
    display: none;
  }
}

/* ---- Live Per-Pax Pricing (Step 2) ---- */
/* Sits directly under the participant counter. The per-pax figure updates live
   as the workshop and group size change (bigger group, lower per-pax). On-brand:
   sage-to-cream card, Cormorant figure, gold trending-down icon on the nudge. */
.price-live {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--sage-light), var(--cream));
}
.price-live[hidden] { display: none; }

.price-live__main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.price-live__rate {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.price-live__amount {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.5px;
  display: inline-block;
  transform-origin: left center;
}

.price-live__unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
}

.price-live__bracket {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.price-live__est {
  margin-top: 7px;
  font-size: 13px;
  color: var(--ink-light);
}

.price-live__nudge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sage);
}
.price-live__nudge[hidden] { display: none; }
.price-live__nudge svg { flex-shrink: 0; color: var(--gold); }

.price-live__note {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* The figure gives a brief pop when it changes between brackets, so the volume
   discount is felt, not just read. Respects reduced-motion. */
@keyframes price-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.09); color: var(--sage); }
  100% { transform: scale(1); }
}
.price-live__amount.is-pop {
  animation: price-pop 0.42s var(--ease, ease);
}
@media (prefers-reduced-motion: reduce) {
  .price-live__amount.is-pop { animation: none; }
}

/* ---- Corporate (over-30 pax) enquiry mode ---- */
/* Over 30 guests = private corporate rate. The flow converts to a vetted quote
   enquiry: this banner explains it, and the work-email ask lets the team confirm
   the organisation before any rate is shared. */
.corp-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-md);
  background: var(--gold-light);
}
.corp-notice[hidden] { display: none; }
.corp-notice svg { flex-shrink: 0; color: var(--sage); margin-top: 1px; }
.corp-notice strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.corp-notice p { font-size: 12.5px; line-height: 1.5; color: var(--ink-light); }

/* The work-email vetting hint sits a touch stronger than a plain form hint. */
.form-hint--accent { color: var(--ink-light); }
.form-hint--accent strong { color: var(--sage); font-weight: 700; }
.form-hint[hidden] { display: none; }

/* Corporate-only fields (e.g. company name) are toggled by booking.js. */
.corp-only[hidden] { display: none; }

/* Corporate alternative CTA: WhatsApp with the same prefilled enquiry. */
.corp-cta { margin-top: 14px; }
.corp-cta[hidden] { display: none; }
.corp-cta__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--ink-muted);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.corp-cta__or::before,
.corp-cta__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn--whatsapp {
  width: 100%;
  justify-content: center;
  gap: 8px;
  background: hsl(142, 70%, 41%);
  color: var(--white);
  border: 1px solid hsl(142, 70%, 41%);
}
.btn--whatsapp:hover {
  background: hsl(142, 70%, 36%);
  border-color: hsl(142, 70%, 36%);
}

/* ---- Post-submit confirmation ---- */
/* Replaces the form after a sent enquiry. Reassures, recaps, offers WhatsApp. */
.booking__confirm {
  text-align: center;
  padding: 12px 0 4px;
  animation: confirm-in 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}
.booking__confirm[hidden] { display: none; }

.booking__confirm-badge {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  color: var(--sage);
  background: var(--sage-light);
  border: 1px solid var(--border);
  border-radius: 999px;
  animation: confirm-badge 0.5s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) 0.12s both;
}

.booking__confirm-title {
  font-family: var(--font-display);
  font-size: 33px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0 0 10px;
}

.booking__confirm-lede {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-light);
  max-width: 46ch;
  margin: 0 auto 24px;
}

.booking__confirm-recap {
  text-align: left;
  margin: 0 auto 22px;
  max-width: 380px;
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--sage-light), var(--cream));
}
.booking__confirm-recap-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
}
.booking__confirm-recap-row + .booking__confirm-recap-row {
  border-top: 1px solid var(--border);
}
.booking__confirm-recap dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.booking__confirm-recap dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.booking__confirm-wa {
  max-width: 380px;
  margin: 0 auto;
}

.booking__confirm-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.booking__confirm-actions .btn { min-width: 220px; justify-content: center; }
.booking__confirm-home {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease, ease);
}
.booking__confirm-home:hover { color: var(--sage); }

@keyframes confirm-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes confirm-badge {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .booking__confirm,
  .booking__confirm-badge { animation: none; }
}
