/* The booking page: a focused, calm page in the Shack's own colours. The site menu and page
   heading give way to a slim top bar, the booking is one form and a review, and the summary
   is a ticket stub beside it on wide screens. */
body:has(#booking-app) .site-header { display: none; }

main.bk-page {
  --bk-deep: #142d19;
  --bk-gold: #dfb764;
  --bk-card: #fffbf2;
  --bk-line: #e3d7bf;
  min-height: 100svh;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  background:
    radial-gradient(90% 60% at 100% 0%, #24502f 0%, transparent 60%),
    radial-gradient(70% 50% at 0% 100%, #1d4127 0%, transparent 65%),
    var(--bk-deep);
  color: #fff7e6;
}

/* Slim top bar: back, logo, help */
.bk-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: .9rem;
}
.bk-topbar a { color: #fff7e6; text-decoration: none; font-weight: 600; font-size: .95rem; }
.bk-back, .bk-help { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem; border: 1px solid #ffffff38; border-radius: 2rem; justify-self: start; }
.bk-help { justify-self: end; }
.bk-back:hover, .bk-help:hover { background: #ffffff14; }
.bk-brand { display: block; width: clamp(6rem, 18vw, 8rem); padding: .3rem .6rem; border-radius: .6rem; background: #fffbf2; }
.bk-brand img { display: block; width: 100%; height: auto; }

.bk-stage { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
#booking-app { --focus: var(--bk-gold); color: var(--ink); }
#booking-app noscript p { color: #fff7e6; }
.bk-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr); align-items: start; gap: clamp(1.2rem, 3vw, 2.5rem); }

/* The form card */
.bk-form, .bk-ticket {
  background: var(--bk-card);
  color: var(--ink);
  border-radius: 1rem;
  padding: clamp(1.1rem, 3vw, 2.4rem);
  box-shadow: 0 0 0 1px #ffffff2e, 0 1.4rem 3rem #0006;
}
.bk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; padding-bottom: 1rem; margin-bottom: .4rem; border-bottom: 1px solid var(--bk-line); }
.bk-head h1 { margin: 0; color: var(--forest); font-size: clamp(2.1rem, 4vw, 3rem); line-height: 1; }
.bk-form h2, .bk-ticket h2 { color: var(--forest); font-size: clamp(2rem, 3.4vw, 2.8rem); }
#booking-app h2[tabindex="-1"]:focus { outline: none; }
.bk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Two steps: numbered markers; finished steps become a check mark. */
.bk-progress { display: flex; align-items: center; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.bk-progress li { display: flex; align-items: center; gap: .45rem; color: var(--quiet); font-size: .88rem; font-weight: 600; }
.bk-progress li + li::before { content: ''; width: 1.6rem; height: 2px; margin-right: .1rem; background: var(--bk-line); }
.bk-progress li[data-done] + li::before { background: var(--forest); }
.bk-step-mark { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 2px solid #cdbd99; border-radius: 50%; background: #fff; font-size: .8rem; font-weight: 700; }
.bk-progress [aria-current] { color: var(--forest); }
.bk-progress [aria-current] .bk-step-mark { border-color: var(--forest); background: var(--forest); color: #fff; }
.bk-progress [data-done] { color: var(--forest); }
.bk-progress [data-done] .bk-step-mark { border-color: var(--forest); background: var(--forest); font-size: 0; }
.bk-progress [data-done] .bk-step-mark::after { content: ''; width: .8rem; height: .8rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Blocks of the form */
.bk-block { margin: 0; padding: 1.15rem 0; border: 0; border-bottom: 1px solid var(--bk-line); min-width: 0; }
.bk-block legend, .bk-guests > label { float: left; width: 100%; margin: 0 0 .65rem; padding: 0; color: var(--forest); font-size: 1.05rem; font-weight: 700; }
.bk-block legend + * { clear: both; }
.bk-label { margin: .9rem 0 .5rem; font-size: .92rem; font-weight: 700; }
.bk-label span, .bk-extras summary span { color: var(--quiet); font-weight: 400; }
.bk-tip { margin: .6rem 0 0; color: var(--quiet); font-size: .9rem; }
.bk-field-error { margin: .5rem 0 0; color: #a5321c; font-size: .92rem; font-weight: 600; }

/* Experience buttons: compact, icon and name */
.bk-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.bk-choice { position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .4rem .95rem .4rem .45rem; border: 1px solid #d6c8a8; border-radius: 2rem; background: #fff; cursor: pointer; font-weight: 600; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.bk-choice:hover { border-color: var(--forest); }
.bk-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bk-choice-icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: #f1e8d5; color: var(--forest); }
.bk-choice-icon svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bk-choice:has(input:checked) { border-color: var(--forest); background: #eef4ea; box-shadow: 0 0 0 1px var(--forest); }
.bk-choice:has(input:checked) .bk-choice-icon { background: var(--forest); color: #fff; }
.bk-choice:has(input:focus-visible) { outline: 3px solid var(--bk-gold); outline-offset: 2px; }

/* Dates and times */
.bk-date-chips, .bk-time-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.bk-date-chips button, .bk-time-chips button, .bk-stepper button {
  min-height: 44px; padding: .4rem .85rem; border: 1px solid #d6c8a8; border-radius: 2rem; background: #fff; color: var(--forest);
  font: 600 .9rem/1 var(--sans); cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.bk-time-chips button { font-variant-numeric: tabular-nums; }
.bk-date-chips button:hover, .bk-time-chips button:hover, .bk-stepper button:hover { border-color: var(--forest); }
.bk-date-chips button[aria-pressed=true], .bk-time-chips button[aria-pressed=true] { background: var(--forest); border-color: var(--forest); color: #fff; }
.bk-inline { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; margin-top: .7rem; color: var(--quiet); font-size: .9rem; font-weight: 600; }
.bk-inline[hidden] { display: none; }
.bk-inline input { width: auto !important; min-width: 10rem; margin: 0 !important; }

/* Fields */
.bk-form :is(input:not([type=checkbox]), textarea, select) {
  display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 2.95rem; margin-top: .3rem; padding: .65rem .75rem;
  border: 1px solid #c8b995; border-radius: .5rem; background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--sans);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.bk-form :is(input:not([type=checkbox]), textarea, select):focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px #dfb76480; }
.bk-form textarea { resize: vertical; }
.bk-details { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.bk-details legend { grid-column: 1 / -1; }
.bk-details label, .bk-extras-body > label { display: block; font-size: .92rem; font-weight: 700; }
.bk-wide { grid-column: 1 / -1; }

/* Guests */
.bk-stepper { display: inline-flex; align-items: stretch; gap: .4rem; }
.bk-stepper input { width: 4.5rem !important; margin: 0 !important; text-align: center; font-weight: 700 !important; -moz-appearance: textfield; }
.bk-stepper input::-webkit-inner-spin-button, .bk-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bk-stepper button { min-width: 2.95rem; padding: 0; border-radius: .5rem; font-size: 1.3rem; }

/* Optional extras stay folded away */
.bk-extras { border-bottom: 0; }
.bk-extras summary { display: flex; align-items: center; gap: .4rem; min-height: 44px; cursor: pointer; color: var(--forest); font-weight: 700; list-style: none; }
.bk-extras summary::-webkit-details-marker { display: none; }
.bk-extras summary::before { content: '+'; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 1px solid #d6c8a8; border-radius: 50%; font-weight: 700; }
.bk-extras[open] summary::before { content: '−'; }
.bk-extras-body { display: grid; gap: .9rem; padding-top: .6rem; }
.bk-picker { display: grid; gap: .8rem; padding: .9rem; border-radius: .7rem; background: #f4ecdb; }
.bk-picker label { display: block; font-size: .9rem; font-weight: 700; }
.bk-picker-actions { display: flex; align-items: end; gap: .8rem; }
.bk-picker-actions input { max-width: 5.5rem; }
.bk-cart-line { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .6rem 0; border-bottom: 1px solid var(--bk-line); }
.bk-cart-line strong { flex: 1 1 10rem; }
.bk-cart-line input { width: 4.3rem !important; margin: 0 !important; }
.bk-link-btn { border: none; background: none; text-decoration: underline; color: var(--green); font-size: .9rem; padding: .45rem; }

/* Actions */
.bk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: 1.3rem; }
.bk-actions .button, .bk-picker .button { align-items: center; border-radius: .5rem; }
.bk-cta { min-width: 12rem; font-size: 1.05rem; }
#booking-app .button-secondary { color: var(--green); border-color: var(--green); }
.bk-next { color: var(--quiet); }
.bk-message:not(:empty), #ticket-message:not(:empty) { margin-top: 1rem; padding: .7rem 1rem; border-left: 3px solid var(--forest); border-radius: .3rem; background: #f4eddc; }
.bk-message:empty, #ticket-message:empty, #bk-catalog-status:empty { display: none; }
#booking-app button:disabled { opacity: .62; cursor: wait; }

/* Lists in the summary, review and ticket */
.bk-list { padding: 0; margin: 1rem 0; list-style: none; }
.bk-list li, .bk-sum, .bk-info > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid #cabea6; padding: .55rem 0; }
.bk-list li span:last-child, .bk-sum strong { white-space: nowrap; }
.bk-info { margin: 1rem 0; }
.bk-info dt { font-weight: 700; }
.bk-info dd { margin: 0; overflow-wrap: anywhere; text-align: right; }

/* The summary: a ticket stub with notched edges */
.bk-summary {
  position: sticky;
  top: 1.5rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border-radius: 1rem;
  background: #0f2414;
  color: #fff7e6;
  border: 1px solid #dfb76466;
  -webkit-mask: radial-gradient(circle at 0 5.4rem, #0000 .8rem, #000 .85rem) left / 51% 100% no-repeat, radial-gradient(circle at 100% 5.4rem, #0000 .8rem, #000 .85rem) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 5.4rem, #0000 .8rem, #000 .85rem) left / 51% 100% no-repeat, radial-gradient(circle at 100% 5.4rem, #0000 .8rem, #000 .85rem) right / 51% 100% no-repeat;
}
.bk-summary h2 { margin-bottom: 1.3rem; padding-bottom: .9rem; border-bottom: 2px dashed #dfb76466; color: var(--bk-gold); font-size: clamp(1.9rem, 2.6vw, 2.4rem); }
.bk-summary p { margin: .55rem 0; }
.bk-summary #bk-summary-body > p:first-child { font: 400 1.5rem/1.15 var(--serif); }
.bk-summary .bk-list li, .bk-summary .bk-sum { border-color: #dfb76440; }
.bk-summary .bk-sum strong { color: var(--bk-gold); font-size: 1.15rem; }
.bk-summary.is-updated { animation: ticket-glow .7s ease; }
@keyframes ticket-glow { 30% { filter: brightness(1.25); transform: translateY(-2px); } }

/* Confirmation ticket */
.bk-ticket { max-width: 48rem; margin-inline: auto; }
#booking-app .bk-whatsapp { gap: .5rem; background: #128c4a; border-color: #128c4a; color: #fff; }
#booking-app .bk-whatsapp:hover { background: #0d6e3a; border-color: #0d6e3a; }
#booking-app .bk-whatsapp svg { width: 1.25rem; height: 1.25rem; fill: currentColor; flex: none; }
#booking-app .bk-whatsapp[hidden] { display: none; }

@media (max-width: 860px) {
  .bk-layout { grid-template-columns: 1fr; }
  /* On narrow screens the review step shows the full summary, so the stub is not repeated. */
  .bk-summary { display: none; }
}
@media (max-width: 560px) {
  .bk-topbar { width: calc(100% - 1.5rem); gap: .5rem; }
  .bk-back, .bk-help { padding: 0 .7rem; font-size: .88rem; }
  .bk-stage { width: calc(100% - 1rem); }
  .bk-form, .bk-ticket { padding: 1rem; border-radius: .8rem; }
  .bk-head { align-items: flex-start; flex-direction: column; }
  .bk-details { grid-template-columns: 1fr; }
  .bk-choice { flex: 1 1 calc(50% - .5rem); }
  .bk-actions .button { flex: 1; }
  .bk-info > div { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-choice, .bk-date-chips button, .bk-time-chips button, .bk-stepper button, .bk-form :is(input, textarea, select) { transition: none; }
  .bk-summary.is-updated { animation: none; }
}
@media print {
  .site-header, .site-footer, .bk-topbar, .bk-actions, .skip-link, #ticket-message, .contact-float { display: none !important; }
  main.bk-page { background: none; color: #000; min-height: 0; }
  .bk-ticket { box-shadow: none; max-width: none; }
}
