/*
 * r4v-booking.css — booking-page styling for the R4V brand.
 * ============================================================================
 *
 * Layered ON TOP of r4v.css (the shared brand kit). Picks up brand-color
 * CSS variables — --r4v-primary (teal), --r4v-accent (coral), --r4v-cream,
 * --r4v-ink, --r4v-muted — from r4v.css so a brand-color tweak only needs
 * to touch one place.
 *
 * Class prefix: `bk-` (booking) to avoid collisions with WEF's `bf-` (booking-flow)
 * styles in styles.min.css.
 * ============================================================================
 */

/* ------------ Booking page intro ------------ */

.bk-intro {
  max-width: 760px;
  margin: 56px auto 24px;
  padding: 0 24px;
  text-align: center;
}
.bk-intro .eyebrow {
  display: inline-block;
  font-family: var(--r4v-sans, "Inter", system-ui, sans-serif);
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--r4v-muted, #6E6957);
  margin-bottom: 14px;
}
.bk-intro h1 {
  font-family: var(--r4v-serif, "Fraunces", Georgia, serif);
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--r4v-ink, #1A1A18);
  margin: 0 0 16px;
}
.bk-intro h1 em {
  color: var(--r4v-primary, #3A7A4A);
  font-style: italic;
  font-weight: 400;
}
.bk-intro__sub {
  font-size: 1.05rem;
  color: var(--r4v-muted, #5C5A52);
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.55;
}

/* ------------ The booking flow shell ------------ */

.bk {
  max-width: 1100px;
  margin: 24px auto 80px;
  padding: 0 24px;
  position: relative;
}

/* Step indicator */
.bk-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 3vw, 28px);
  flex-wrap: wrap;
}
.bk-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--r4v-muted, #8C887E);
  font-size: 0.92rem;
}
.bk-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--r4v-cream, #FAF7F1);
  border: 1px solid var(--r4v-rule, #E7E1D2);
  font-weight: 600;
  font-size: 0.9rem;
  color: inherit;
}
.bk-step.is-active {
  color: var(--r4v-ink, #1A1A18);
  font-weight: 600;
}
.bk-step.is-active .bk-step__num {
  background: var(--r4v-primary, #3A7A4A);
  border-color: var(--r4v-primary, #3A7A4A);
  color: #fff;
}
.bk-step.is-done .bk-step__num {
  background: var(--r4v-accent, #E89B7C);
  border-color: var(--r4v-accent, #E89B7C);
  color: #fff;
}

/* Panels */
.bk-panel {
  background: #fff;
  border: 1px solid var(--r4v-rule, #E7E1D2);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 40px);
  box-shadow: 0 4px 24px rgba(20, 18, 12, 0.04);
}
.bk-panel[hidden] { display: none; }
.bk-panel__title {
  font-family: var(--r4v-serif, "Fraunces", Georgia, serif);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--r4v-ink, #1A1A18);
}
.bk-panel__sub {
  color: var(--r4v-muted, #5C5A52);
  margin: 0 0 28px;
  font-size: 1rem;
}

/* Step 1 — dates + guests selector. Larger, big-brand feel. */
.bk-dates {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
  padding: 8px;
  background: var(--r4v-paper, #fff);
  border: 1px solid var(--r4v-rule, #E7E1D2);
  border-radius: 14px;
  box-shadow: 0 6px 20px -10px rgba(20, 32, 30, 0.12);
}
.bk-dates__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.bk-dates__field + .bk-dates__field {
  box-shadow: -1px 0 0 var(--r4v-rule, #E7E1D2);
}
.bk-dates__field:hover { background: var(--r4v-cream, #FAF7F1); }
.bk-dates__field:focus-within { background: var(--r4v-cream, #FAF7F1); }
.bk-dates__label {
  font-family: var(--r4v-sans, "Inter", system-ui, sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--r4v-ink, #1A1A18);
  font-weight: 600;
}
.bk-dates__field input,
.bk-dates__field select {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--r4v-sans, "Inter", system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--r4v-ink-soft, #475569);
  padding: 0;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-variant-numeric: tabular-nums;
}
.bk-dates__field input[type="text"]::placeholder {
  color: var(--r4v-muted, #94A3B8);
  opacity: 0.85;
}
.bk-dates__field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--r4v-muted) 50%),
    linear-gradient(135deg, var(--r4v-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 12px) calc(50% - 2px),
    calc(100% - 7px) calc(50% - 2px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 22px;
}

@media (max-width: 560px) {
  .bk-dates { grid-template-columns: 1fr; }
  .bk-dates__field + .bk-dates__field { box-shadow: none; border-top: 1px solid var(--r4v-rule); }
}

/* Region groupings */
.bk-region {
  margin-top: 32px;
}
.bk-region__name {
  font-family: var(--r4v-serif, "Fraunces", Georgia, serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--r4v-primary, #3A7A4A);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.bk-region__count {
  font-family: var(--r4v-sans, "Inter", system-ui, sans-serif);
  font-size: 0.78rem;
  color: var(--r4v-muted, #8C887E);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Property grid */
.bk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.bk-prop {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1.5px solid var(--r4v-rule, #E7E1D2);
  border-radius: 10px;
  background: var(--r4v-paper, #fff);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.bk-prop:hover {
  border-color: var(--r4v-primary, #3A7A4A);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -18px rgba(20, 32, 30, 0.18);
}
/* Photo header — real property image at the top of each booking card.
   When no img is present, .bk-prop__photo falls back to a brand gradient
   so the layout doesn't break. */
.bk-prop__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--r4v-primary, #3A7A4A) 0%, var(--r4v-primary-3, #1F4D2A) 100%);
  overflow: hidden;
}
.bk-prop__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.bk-prop:hover .bk-prop__photo img { transform: scale(1.04); }
.bk-prop input[type=radio] {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  accent-color: var(--r4v-primary, #3A7A4A);
  cursor: pointer;
  z-index: 2;
}
.bk-prop:has(input:checked) {
  border-color: var(--r4v-primary, #3A7A4A);
  box-shadow: 0 0 0 3px rgba(30, 95, 116, 0.18), 0 18px 36px -18px rgba(20, 32, 30, 0.22);
}
.bk-prop__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.bk-prop__loc {
  font-family: var(--r4v-sans, "Inter", system-ui, sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--r4v-muted, #8C887E);
  font-weight: 500;
}
.bk-prop__name {
  font-family: var(--r4v-serif, "Fraunces", Georgia, serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--r4v-ink, #1A1A18);
  line-height: 1.2;
  padding-right: 32px; /* leave room for the radio */
}
.bk-prop__desc {
  font-size: 0.9rem;
  color: var(--r4v-ink-soft, #475569);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.bk-prop__hold {
  font-size: 0.74rem;
  color: var(--r4v-muted, #8C887E);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Per-property price slot — populated by JS after dates are picked */
.bk-prop__price {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--r4v-rule, #E7E1D2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  justify-content: center;
}
.bk-prop__price.is-loading {
  background: linear-gradient(90deg, transparent 0%, rgba(20, 32, 30, 0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: bkPriceShimmer 1.4s ease-in-out infinite;
  color: var(--r4v-muted);
}
.bk-prop__price.is-unavailable .bk-prop__price-label {
  color: var(--r4v-muted, #8C887E);
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 400;
}
.bk-prop__price-total {
  font-family: var(--r4v-serif, "Fraunces", Georgia, serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--r4v-primary, #3A7A4A);
  line-height: 1.1;
}
.bk-prop__price-meta {
  font-size: 0.78rem;
  color: var(--r4v-muted, #8C887E);
  font-weight: 400;
  letter-spacing: 0.01em;
}
@keyframes bkPriceShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Actions row */
.bk-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* Buttons (override generic .btn from r4v.css if present, otherwise stand alone) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--r4v-sans, "Inter", system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  color: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}
.btn--primary {
  background: var(--r4v-primary, #3A7A4A);
  color: #fff;
  border-color: var(--r4v-primary, #3A7A4A);
}
.btn--primary:hover:not([disabled]) {
  background: #185265;
  border-color: #185265;
}
.btn--primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
/* Brief attention pulse on the Continue button after the user picks a
   property — paired with the auto-scroll-into-view in r4v-booking-flow.js
   so the next step is unmistakable. */
.btn--primary.is-flashed {
  animation: bkFlashCTA 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}
@keyframes bkFlashCTA {
  0%   { box-shadow: 0 0 0 0 rgba(232, 197, 122, 0.7); }
  60%  { box-shadow: 0 0 0 18px rgba(232, 197, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 197, 122, 0); }
}
.btn--ghost {
  background: transparent;
  color: var(--r4v-ink, #1A1A18);
  border-color: var(--r4v-rule, #E7E1D2);
}
.btn--ghost:hover {
  border-color: var(--r4v-primary, #3A7A4A);
  color: var(--r4v-primary, #3A7A4A);
}

/* Step 2/3 — review layout (two-column) */
.bk-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
}
@media (max-width: 760px) {
  .bk-review {
    grid-template-columns: 1fr;
  }
}

.bk-review__summary {
  background: var(--r4v-cream, #FAF7F1);
  border-radius: 6px;
  padding: 20px;
}
.bk-review__summary p {
  margin: 4px 0;
  color: var(--r4v-ink, #1A1A18);
}
.bk-review__summary strong {
  color: var(--r4v-primary, #3A7A4A);
}

/* Right-rail price card */
.bk-review__card {
  background: #fff;
  border: 1px solid var(--r4v-rule, #E7E1D2);
  border-radius: 6px;
  padding: 20px;
  font-size: 0.92rem;
  position: sticky;
  top: 24px;
}
.bk-review__card h4 {
  font-family: var(--r4v-serif, "Fraunces", Georgia, serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--r4v-ink, #1A1A18);
}
.bk-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  color: var(--r4v-muted, #5C5A52);
}
.bk-price-row--total {
  border-top: 1px solid var(--r4v-rule, #E7E1D2);
  margin-top: 8px;
  padding-top: 12px;
  color: var(--r4v-ink, #1A1A18);
  font-weight: 600;
  font-size: 1.05rem;
}
.bk-price-row--total .amt {
  color: var(--r4v-primary, #3A7A4A);
}

.bk-pay-trust {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--r4v-cream, #FAF7F1);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--r4v-muted, #5C5A52);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Guest details form */
.bk-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}
.bk-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--r4v-ink, #1A1A18);
  font-weight: 500;
}
.bk-form input,
.bk-form textarea {
  padding: 11px 13px;
  border: 1px solid var(--r4v-rule, #E7E1D2);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.bk-form input:focus,
.bk-form textarea:focus {
  outline: 2px solid var(--r4v-primary, #3A7A4A);
  outline-offset: 1px;
  border-color: var(--r4v-primary, #3A7A4A);
}
.bk-form__wide {
  grid-column: 1 / -1;
}

/* Stripe Payment Element mount + error states */
.bk-stripe-card {
  margin: 8px 0 16px;
  min-height: 220px;
}
.bk-card-error {
  font-size: 0.88rem;
  color: #B0364C;
  margin: 4px 0 12px;
  min-height: 1.2em;
}
.bk-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--r4v-muted, #5C5A52);
  line-height: 1.5;
  margin-top: 8px;
  cursor: pointer;
}
.bk-checkbox input {
  margin-top: 3px;
  accent-color: var(--r4v-primary, #3A7A4A);
}

/* Confirmation step */
.bk-confirm {
  text-align: center;
  padding: 24px 0;
}
.bk-confirm__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--r4v-primary, #3A7A4A);
  color: #fff;
  font-size: 2rem;
  margin-bottom: 20px;
}
.bk-confirm h2 {
  font-family: var(--r4v-serif, "Fraunces", Georgia, serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--r4v-ink, #1A1A18);
}
.bk-confirm__sub {
  color: var(--r4v-muted, #5C5A52);
  max-width: 50ch;
  margin: 0 auto 24px;
  line-height: 1.5;
}
.bk-confirm__card {
  display: inline-block;
  background: var(--r4v-cream, #FAF7F1);
  border-radius: 6px;
  padding: 20px 28px;
  text-align: left;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* Loading overlay */
.bk-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 10;
}
.bk-overlay[hidden] { display: none; }
.bk-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--r4v-ink, #1A1A18);
}
.bk-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--r4v-rule, #E7E1D2);
  border-top-color: var(--r4v-primary, #3A7A4A);
  border-radius: 50%;
  animation: bk-spin 0.8s linear infinite;
}
@keyframes bk-spin {
  to { transform: rotate(360deg); }
}

/* Error banner */
.bk-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(176, 54, 76, 0.08);
  border: 1px solid rgba(176, 54, 76, 0.25);
  color: #8A2C3D;
  border-radius: 6px;
  font-size: 0.92rem;
}
.bk-error[hidden] { display: none; }
