/* Booking page (public/js/booking.js). Uses the colours and fonts from src/styles/global.css. */

.bk { max-width: 760px; margin: 0 auto; scroll-margin-top: 1.5rem; }
.bk-loading { text-align: center; color: var(--taupe); }

.bk-progress {
  list-style: none; display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap;
  padding: 0; margin: 0 0 1.5rem; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--taupe);
}
.bk-progress li { display: flex; align-items: center; gap: 0.45rem; }
.bk-progress li + li::before { content: ''; width: 1.5rem; height: 1px; background: var(--sand); margin-right: 0.3rem; }
.bk-progress .num {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1px solid var(--sand); font-weight: 600; letter-spacing: 0;
}
.bk-progress .current { color: var(--espresso); font-weight: 600; }
.bk-progress .current .num, .bk-progress .done .num { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }

.bk-step {
  background: #fff; border: 1px solid var(--sand); border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
}
.bk-step h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); outline: none; }
.bk-step h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--ink); margin: 1.5rem 0 0.75rem; }

.bk-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.bk-pill {
  font: inherit; font-size: 0.9rem; padding: 0.55rem 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--sand); background: var(--cream); color: var(--ink); cursor: pointer;
}
.bk-pill:hover { border-color: var(--cocoa); }
.bk-pill.active { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.bk-pills--small .bk-pill { font-size: 0.85rem; padding: 0.4rem 0.9rem; }

.bk-options { display: grid; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.bk-option {
  font: inherit; display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; text-align: left;
  padding: 0.85rem 1.1rem; border: 1px solid var(--sand); border-radius: 12px; background: var(--cream); color: var(--ink); cursor: pointer;
}
.bk-option:hover { border-color: var(--cocoa); }
.bk-option.active { border-color: var(--espresso); box-shadow: inset 0 0 0 1px var(--espresso); background: var(--linen); }
.bk-option-name { font-weight: 600; }
.bk-option-meta { color: var(--taupe); font-size: 0.88rem; }
.bk-option-price { font-family: var(--font-display); font-size: 1.2rem; color: var(--espresso); }

.bk-check { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.75rem 0; font-size: 0.95rem; }
.bk-check input { margin-top: 0.35rem; accent-color: var(--espresso); }
.bk-check.bad { color: #9b2c2c; }

.bk-summary { background: var(--linen); border-radius: 12px; padding: 0.9rem 1.1rem; margin: 1rem 0; }
.bk-deposit { display: block; font-size: 0.88rem; color: var(--taupe); margin-top: 0.25rem; }
.bk-note { font-size: 0.9rem; color: var(--taupe); }
.bk-error { color: #9b2c2c; background: #fbeeee; border-radius: 10px; padding: 0.7rem 1rem; font-size: 0.95rem; }

.bk-actions { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.bk-actions .btn:only-child { margin-left: auto; }
.bk-step .btn { cursor: pointer; font-family: var(--font-body); }
.bk-step .btn--outline { color: var(--espresso); }
.bk-step .btn--outline:hover { background: var(--linen); }
.bk-step .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 1rem 0 0.5rem; }
.bk-month { font-family: var(--font-display); font-size: 1.35rem; color: var(--espresso); margin: 0; }
.bk-nav {
  font: inherit; font-size: 1.4rem; line-height: 1; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--sand); background: var(--cream); color: var(--espresso); cursor: pointer;
}
.bk-nav[disabled] { opacity: 0.35; cursor: not-allowed; }

.bk-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; }
.bk-cal.loading { opacity: 0.5; }
.bk-dow { text-align: center; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--taupe); padding-bottom: 0.25rem; }
.bk-day {
  font: inherit; aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--sand); cursor: default;
}
.bk-day.open { background: var(--linen); color: var(--espresso); font-weight: 600; cursor: pointer; }
.bk-day.open:hover { border-color: var(--cocoa); }
.bk-day.today { text-decoration: underline; text-underline-offset: 3px; }
.bk-day.active { background: var(--espresso); color: var(--cream); }

.bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; }
.bk-times .bk-pill { text-align: center; }

.bk-field { margin: 0 0 1rem; }
.bk-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.bk-field input, .bk-field textarea {
  width: 100%; font: inherit; padding: 0.7rem 0.9rem; border: 1px solid var(--sand); border-radius: 10px; background: var(--cream); color: var(--ink);
}
.bk-field input:focus, .bk-field textarea:focus { outline: 2px solid var(--cocoa); outline-offset: 1px; }
.bk-field.bad input, .bk-field.bad textarea { border-color: #9b2c2c; background: #fbeeee; }
.bk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bk-turnstile { margin: 1rem 0; }
.bk-turnstile:empty { margin: 0; }

.bk-done { text-align: center; }
.bk-done .bk-actions { justify-content: center; }

@media (max-width: 560px) {
  .bk-option { grid-template-columns: 1fr auto; }
  .bk-option-meta { grid-column: 1; grid-row: 2; }
  .bk-option-price { grid-row: 1 / span 2; grid-column: 2; }
  .bk-progress { flex-wrap: nowrap; }
  .bk-actions { flex-wrap: nowrap; }
  .bk-actions .btn { padding: 0.85rem 1.3rem; }
  .bk-progress li:not(.current) .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bk-progress li + li::before { width: 1rem; }
}
.bk-done .bk-actions .btn:only-child { margin-left: 0; }

/* Step 1: type tiles */
.bk-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0.5rem 0 0.75rem; }
.bk-tiles--small { grid-template-columns: 1fr; margin-top: 0; }
.bk-tile {
  font: inherit; color: var(--ink); background: var(--cream); border: 1px solid var(--sand); border-radius: 16px; cursor: pointer;
  display: flex; align-items: center; gap: 1rem; text-align: left; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.bk-tile:hover { border-color: var(--cocoa); }
.bk-tile.active { background: var(--linen); border-color: var(--espresso); box-shadow: inset 0 0 0 1px var(--espresso); }
.bk-tile--big { flex-direction: column; justify-content: center; text-align: center; padding: 1.5rem 1rem 1.35rem; min-height: 11rem; gap: 0.6rem; }
.bk-tile--small { padding: 0.7rem 1rem; }
.bk-tile-icon { color: var(--cocoa); display: inline-flex; }
.bk-tile.active .bk-tile-icon { color: var(--espresso); }
.bk-tile-text { display: flex; flex-direction: column; gap: 0.15rem; }
.bk-tile-name { font-family: var(--font-display); font-size: 1.45rem; color: var(--espresso); line-height: 1.2; }
.bk-tile--small .bk-tile-name { font-size: 1.1rem; }
.bk-tile-sub { font-size: 0.85rem; color: var(--taupe); }
.bk-center { text-align: center; margin-top: 1rem; }

/* "Infill › 2 Week › Lux Classic" */
.bk-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 1rem 0 0.25rem; padding: 0.55rem 0.9rem; background: var(--espresso); color: var(--cream); border-radius: 999px; width: fit-content; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em; }
.bk-trail-sep { opacity: 0.6; }
.bk-subhead { font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; color: var(--ink); margin: 1.25rem 0 0.6rem; }

.bk-weeks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.bk-week { font: inherit; text-align: center; padding: 0.85rem; border: 1px solid var(--sand); border-radius: 12px; background: var(--cream); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 0.1rem; }
.bk-week:hover { border-color: var(--cocoa); }
.bk-week.active { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.bk-week-name { font-weight: 600; }
.bk-week-sub { font-size: 0.8rem; opacity: 0.8; }

.bk-option-name { display: flex; flex-direction: column; }
.bk-option-type { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--taupe); }
.bk-addon textarea { width: 100%; font: inherit; padding: 0.6rem 0.8rem; border: 1px solid var(--sand); border-radius: 10px; background: var(--cream); color: var(--ink); resize: vertical; }
.bk-addon.bad textarea { border-color: #9b2c2c; background: #fbeeee; }
.bk-summary-extra { font-size: 0.9rem; color: var(--taupe); }

@media (max-width: 480px) {
  .bk-tile--big { min-height: 9.5rem; padding: 1.1rem 0.6rem; }
  .bk-tile--big svg { width: 44px; height: 44px; }
  .bk-tile-name { font-size: 1.2rem; }
  .bk-tile-sub { font-size: 0.78rem; }
}

/* "Your choice" pop-up after tapping a lash style: slides up from the bottom on phones,
   a pop-up in the middle of the screen on bigger screens */
html.bk-noscroll, html.bk-noscroll body { overflow: hidden; }
.bk-sheet-back {
  position: fixed; inset: 0; z-index: 1000; background: rgba(42, 29, 23, 0.42);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.22s ease;
}
.bk-sheet-back.open { opacity: 1; }
.bk-sheet {
  position: relative; width: 100%; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--cream); border-radius: 22px 22px 0 0; padding: 0.7rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(42, 29, 23, 0.25); outline: none;
  transform: translateY(100%); transition: transform 0.28s ease;
}
.bk-sheet-back.open .bk-sheet { transform: none; }
.bk-sheet-grab { width: 42px; height: 4px; border-radius: 4px; background: var(--sand); margin: 0 auto 0.9rem; }
.bk-sheet-x {
  position: absolute; right: 0.8rem; top: 0.6rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%;
  background: transparent; color: var(--taupe); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.bk-sheet-x:hover { background: var(--linen); color: var(--espresso); }
.bk-sheet-kicker { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--taupe); }
.bk-sheet-title { margin: 0.15rem 0 0.8rem; font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; color: var(--espresso); }
.bk-sheet-facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--sand); border-radius: 14px; overflow: hidden; background: #fff; }
.bk-sheet-facts > div { padding: 0.6rem 0.4rem; text-align: center; }
.bk-sheet-facts > div + div { border-left: 1px solid var(--sand); }
.bk-sheet-facts span { display: block; font-size: 0.75rem; color: var(--taupe); }
.bk-sheet-facts strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; color: var(--ink); white-space: nowrap; }
.bk-sheet-note { margin: 0.6rem 0 0.2rem; font-size: 0.85rem; color: var(--taupe); }
.bk-sheet .bk-addon[hidden] { display: none; }
.bk-sheet .btn { display: block; width: 100%; text-align: center; cursor: pointer; font-family: var(--font-body); }
.bk-sheet-go { margin-top: 1rem; }
.bk-sheet-back-btn { margin-top: 0.6rem; color: var(--espresso); background: transparent; }
.bk-sheet-back-btn:hover { background: var(--linen); }

@media (min-width: 700px) {
  .bk-sheet-back { align-items: center; padding: 1.5rem; }
  .bk-sheet-grab { display: none; }
  .bk-sheet {
    max-width: 460px; border-radius: 22px; padding: 1.75rem 1.9rem 1.6rem;
    box-shadow: 0 30px 70px rgba(42, 29, 23, 0.35);
    transform: translateY(12px) scale(0.97); opacity: 0; transition: transform 0.24s ease, opacity 0.24s ease;
  }
  .bk-sheet-back.open .bk-sheet { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bk-sheet-back, .bk-sheet { transition: none; }
}

/* No times in the month shown: point to the next free day */
.bk-empty { text-align: center; background: var(--linen); border-radius: 14px; padding: 1rem 1.1rem; margin: 1rem 0 0.5rem; }
.bk-empty p { margin: 0 0 0.6rem; color: var(--ink); font-size: 0.95rem; }
.bk-empty p:last-child { margin-bottom: 0; }
.bk-empty .btn { cursor: pointer; font-family: var(--font-body); }

/* Promo code (details step) */
.bk-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.92rem; color: var(--espresso); text-decoration: underline; cursor: pointer; }
.bk-promo { margin: 0 0 1rem; }
.bk-promo-row { display: flex; gap: 0.5rem; }
.bk-promo-row input { flex: 1; text-transform: uppercase; }
.bk-promo-row .btn { flex: none; }
.bk-promo .bk-error { margin-top: 0.5rem; }
.bk-promo.applied { background: var(--linen); border-radius: 12px; padding: 0.8rem 1rem; }
.bk-promo.applied p { margin: 0 0 0.3rem; }

/* Change or cancel a booking (/book/manage) */
.bk-rules { list-style: none; padding: 0; margin: 1rem 0; font-size: 0.95rem; }
.bk-rules li { padding: 0.35rem 0 0.35rem 1.4rem; position: relative; }
.bk-rules li::before { content: '•'; position: absolute; left: 0.4rem; color: var(--taupe); }
.bk-choices { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.bk-choices .btn { width: 100%; }
.bk-warn { background: #fbf3e4; border-radius: 12px; padding: 0.8rem 1rem; font-size: 0.95rem; }

/* My bookings (/account) */
.ac-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ac-code { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; max-width: 12rem; }
.ac-booking { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--linen); border-radius: 12px; padding: 0.9rem 1rem; margin: 0 0 0.75rem; }
.ac-booking p { margin: 0; }
.ac-booking .btn { padding: 0.55rem 1.1rem; font-size: 0.75rem; }
.ac-past { list-style: none; padding: 0; margin: 0 0 1rem; }
.ac-past li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--sand); }
