/* ==========================================================================
   The booking flow
   Progress · room choice · details · payment · confirmation · lookup
   ========================================================================== */

.page-booking { background: var(--bg-sunken); }
.page-booking .band { background: transparent; }

/* ==========================================================================
   PROGRESS
   ========================================================================== */
.booking-progress {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
  padding-top: calc(var(--space-24) + var(--space-2));
  padding-bottom: var(--space-4);
}

.booking-progress__steps {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  counter-reset: step;
}

.booking-progress__step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
  color: var(--text-faint);
  font-size: var(--text-sm);
  position: relative;
}

/* The connecting line between steps. */
.booking-progress__step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  margin-left: var(--space-2);
  transition: background-color var(--dur-slow) var(--ease-state);
}
.booking-progress__step.is-done::after { background: var(--gold); }

.booking-progress__marker {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-elevated);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  transition: all var(--dur-base) var(--ease-state);
}

.booking-progress__step.is-done .booking-progress__marker {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-on-gold);
}
.booking-progress__step.is-current .booking-progress__marker {
  border-color: var(--gold);
  color: var(--gold-ink);
  box-shadow: 0 0 0 4px var(--gold-wash);
}
.booking-progress__step.is-current,
.booking-progress__step.is-done { color: var(--text-primary); }
.booking-progress__step.is-current { font-weight: var(--weight-semibold); }

.booking-progress__label { white-space: nowrap; }

.booking-progress .assurances--compact {
  justify-content: center;
  border-top: 1px solid var(--line);
  margin-top: var(--space-4);
}

@media (max-width: 720px) {
  .booking-progress__label { display: none; }
  .booking-progress__step.is-current .booking-progress__label {
    display: block;
    font-size: var(--text-xs);
  }
}

/* ==========================================================================
   LAYOUT — main column plus a sticky summary
   ========================================================================== */
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-10);
  align-items: start;
}
@media (max-width: 960px) {
  .booking-layout { grid-template-columns: minmax(0, 1fr); }
  /* On a phone the summary belongs above the form, not buried below it. */
  .booking-summary { order: -1; }
}

.booking-head { margin-bottom: var(--space-8); }
.booking-head__dates {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.booking-head__dates .icon { color: var(--gold-dark); }
.booking-head__dates span { color: var(--line-strong); }
.booking-head__change {
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.booking-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
@media (max-width: 520px) {
  .booking-actions { flex-direction: column-reverse; align-items: stretch; }
  .booking-actions .btn { width: 100%; }
}

/* ==========================================================================
   STEP 1 — room options
   ========================================================================== */
.booking-select__rooms { display: grid; gap: var(--space-4); }

.room-option {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-4);
  background: var(--bg-elevated);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--dur-fast) var(--ease-state),
    box-shadow var(--dur-fast) var(--ease-state),
    transform var(--dur-fast) var(--ease-state);
}
.room-option:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
.room-option.is-selected,
.room-option:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-wash);
}
.room-option:focus-within { box-shadow: var(--focus-ring); }

.room-option__input { position: absolute; opacity: 0; width: 0; height: 0; }

.room-option__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-sunken);
}
.room-option__media img { width: 100%; height: 100%; object-fit: cover; }

.room-option__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }

.room-option__head { display: flex; align-items: center; gap: var(--space-3); }
.room-option__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-display);
}

.room-option__check {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: transparent;
  transition: all var(--dur-fast) var(--ease-state);
}
.room-option:has(input:checked) .room-option__check {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-on-gold);
}

.room-option__meta { font-size: var(--text-sm); color: var(--text-muted); }
.room-option__foot { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.room-option .amenity-strip { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.amenity-strip__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.amenity-strip__item .icon { color: var(--gold-dark); }

.room-option__price {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: var(--space-4);
  border-left: 1px solid var(--line);
  min-width: 150px;
}
.room-option__nightly { font-size: var(--text-xs); color: var(--text-muted); }
.room-option__price strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--gold-ink);
}
.room-option__total-note { font-size: var(--text-2xs); color: var(--text-faint); }

@media (max-width: 760px) {
  .room-option { grid-template-columns: 90px minmax(0, 1fr); }
  .room-option__price {
    grid-column: 1 / -1;
    text-align: left;
    border-left: 0;
    padding-left: 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--line);
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-3);
    flex-wrap: wrap;
  }
}

/* Extras */
.booking-extras {
  margin-top: var(--space-8);
  padding: var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.booking-extras legend { padding: 0; }
.booking-extras__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.booking-extras__item:last-child { border-bottom: 0; }
.booking-extras__text { flex: 1; display: flex; flex-direction: column; }
.booking-extras__text small { font-size: var(--text-xs); color: var(--text-muted); }
.booking-extras .money { font-weight: var(--weight-semibold); color: var(--gold-ink); }

/* ==========================================================================
   STEP 2 — details form
   ========================================================================== */
.booking-form {
  padding: var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.booking-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.booking-form__row .field + .field { margin-top: 0; }
.booking-form__row + .field,
.booking-form__row + .booking-form__row { margin-top: var(--space-5); }

@media (max-width: 560px) {
  .booking-form__row { grid-template-columns: 1fr; gap: 0; }
  .booking-form__row .field + .field { margin-top: var(--space-5); }
}

/* ==========================================================================
   SUMMARY PANEL
   ========================================================================== */
.booking-summary__card {
  padding: var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.booking-summary__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.booking-summary__room {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}
.booking-summary__room strong { font-size: var(--text-md); }
.booking-summary__room span { font-size: var(--text-xs); color: var(--text-muted); }

.booking-summary__dates { padding: var(--space-4) 0; display: grid; gap: var(--space-3); }
.booking-summary__dates > div { display: flex; justify-content: space-between; gap: var(--space-4); }
.booking-summary__dates dt { font-size: var(--text-xs); color: var(--text-muted); }
.booking-summary__dates dd { font-size: var(--text-sm); font-weight: var(--weight-medium); text-align: right; }

.booking-summary__breakdown {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--space-3);
}
.booking-summary__breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-sm);
}
.booking-summary__breakdown dt { color: var(--text-muted); }
.booking-summary__total {
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-weight: var(--weight-semibold);
}
.booking-summary__total dt { color: var(--text-primary) !important; }
.booking-summary__total dd { color: var(--gold-ink); font-size: var(--text-lg); }

.booking-summary .assurances--compact {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  justify-content: center;
}

/* ==========================================================================
   STEP 3 — payment
   ========================================================================== */
.payment-option {
  display: block;
  background: var(--bg-elevated);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-state), box-shadow var(--dur-fast) var(--ease-state);
}
.payment-option:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-wash);
}
.payment-option:focus-within { box-shadow: var(--focus-ring); }
.payment-option__input { position: absolute; opacity: 0; width: 0; height: 0; }

.payment-option__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
}
.payment-option__head > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.payment-option__head strong { font-size: var(--text-md); }
.payment-option__head small { font-size: var(--text-sm); color: var(--text-muted); }

.payment-option__marker {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  position: relative;
  transition: border-color var(--dur-fast) var(--ease-state);
}
.payment-option__marker::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-entrance);
}
.payment-option:has(input:checked) .payment-option__marker { border-color: var(--gold); }
.payment-option:has(input:checked) .payment-option__marker::after { transform: scale(1); }

/* The body only appears for the chosen method. */
.payment-option__body {
  display: none;
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
}
.payment-option:has(input:checked) .payment-option__body { display: block; }

/* Fallback for browsers without :has() — payment.js adds this class. */
.payment-option.is-selected .payment-option__body { display: block; }
.payment-option.is-selected { border-color: var(--gold); }

.payment-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--gold-wash);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}
.payment-amount strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--gold-ink);
}

.bank-account {
  display: block;
  padding: var(--space-4);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}
.bank-account__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
}
.bank-account__label { color: var(--text-muted); }
.bank-account__value { font-weight: var(--weight-medium); text-align: right; }
.bank-account__number {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  color: var(--gold-ink);
}
.is-copied { color: var(--success-ink) !important; }

.payment-fields { display: block; margin-top: var(--space-5); }

.dropzone--slim .dropzone__label { padding: var(--space-5) var(--space-4); }
.dropzone--slim .dropzone__label .icon { margin-bottom: 0; }

.payment-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bg-deep);
  color: var(--text-on-dark);
  border-radius: var(--radius-md);
  margin-top: var(--space-6);
}
.payment-total strong {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--gold-soft);
}

.payment-note {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-align: center;
}

/* ==========================================================================
   STEP 4 — confirmation
   ========================================================================== */
.confirmation { text-align: left; }

/* The gold seal draws itself in. */
.seal {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  color: var(--gold);
}
.seal__svg { width: 100%; height: 100%; }

.seal__ring {
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  animation: draw-seal 1100ms var(--ease-entrance) 200ms forwards;
}
.seal__ring--inner {
  stroke-dasharray: 277;
  stroke-dashoffset: 277;
  animation-delay: 350ms;
  animation-duration: 900ms;
}
.seal__tick {
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
  animation: draw-seal 500ms var(--ease-entrance) 900ms forwards;
}
@keyframes draw-seal { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .seal__ring, .seal__tick { animation: none; stroke-dashoffset: 0; }
}

.confirmation__reference {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: var(--space-8) 0;
  padding: var(--space-5);
  background: var(--bg-sand);
  border: 1px dashed var(--gold-dark);
  border-radius: var(--radius-md);
  text-align: center;
}
.confirmation__reference > span { font-size: var(--text-xs); color: var(--text-muted); }
.confirmation__reference strong {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  color: var(--gold-ink);
}

.confirmation__card {
  padding: var(--space-6);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.confirmation__details { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.confirmation__details > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.confirmation__details dt { color: var(--text-muted); }
.confirmation__details dd { font-weight: var(--weight-medium); text-align: right; }
.confirmation__total { border-bottom: 0 !important; padding-top: var(--space-2); }
.confirmation__total dt { color: var(--text-primary) !important; font-weight: var(--weight-semibold); }
.confirmation__total dd { color: var(--gold-ink); font-size: var(--text-lg); font-weight: var(--weight-semibold); }

.confirmation__next { margin-top: var(--space-10); }

.next-steps { display: grid; gap: var(--space-6); margin-top: var(--space-6); }
.next-steps li { display: flex; gap: var(--space-4); }
.next-steps__marker {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-wash);
  color: var(--gold-ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.next-steps strong { display: block; margin-bottom: var(--space-1); }
.next-steps p { font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-relaxed); }

.confirmation__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-10);
}
.confirmation__help {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-align: center;
}

/* ==========================================================================
   LOOKUP
   ========================================================================== */
.lookup-form,
.lookup-result {
  padding: var(--space-8);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.lookup-result__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.payment-list { display: grid; gap: var(--space-2); }
.payment-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3);
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}
.payment-list small { display: block; font-size: var(--text-xs); color: var(--text-faint); }

/* Grid children of .booking-layout — see the note in public.css about why
   min-width:0 matters on a grid item. */
.booking-layout__main { min-width: 0; }
.booking-select       { display: grid; gap: var(--space-4); }
.payment-form         { display: grid; gap: var(--space-5); }
