/**
 * Tour Booking Flow — 3-step hotel-style wizard shell
 * Brand: canopy green, Manrope / Cormorant, 8px grid
 * Layout: sticky stepper + footer; only .tbf-body scrolls (no page jump)
 */

.tbf {
  --tbf-ink: #07140e;
  --tbf-green: #31964a;
  --tbf-green-deep: #1f6f35;
  --tbf-fog: #eef3ef;
  --tbf-line: rgba(7, 20, 14, 0.12);
  --tbf-r: 12px;
  --tbf-header-offset: 88px;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--tbf-ink);
  background: #fff;
  border: 1px solid var(--tbf-line);
  border-radius: 16px;
  padding: 0;
  margin: 0 0 24px;
  scroll-margin-top: var(--tbf-header-offset);
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: none;
  overflow: visible;
}

/* Parent section must not clip the wizard */
.tour-section.tbf-section,
.tbf-section {
  overflow: visible !important;
  transform: none !important;
}

/* Step pills only at top */
.tbf-chrome {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--tbf-line);
  border-radius: 16px 16px 0 0;
}

/* Stepper */
.tbf-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 16px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-bottom: none;
}

@media (min-width: 768px) {
  .tbf-stepper {
    padding: 16px 24px 8px;
  }
}

.tbf-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #5a6f64;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tbf-step:hover {
  background: var(--tbf-fog);
}

.tbf-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(49, 150, 74, 0.28);
}

.tbf-step.is-active {
  background: rgba(49, 150, 74, 0.12);
  border-color: rgba(49, 150, 74, 0.35);
  color: var(--tbf-green-deep);
}

.tbf-step.is-done .tbf-step-num {
  background: var(--tbf-green);
  color: #fff;
}

.tbf-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tbf-fog);
  font-size: 12px;
  font-weight: 700;
}

.tbf-step.is-active .tbf-step-num {
  background: var(--tbf-green);
  color: #fff;
}

.tbf-step-label {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.tbf-step-rule {
  flex: 1 1 12px;
  height: 1px;
  min-width: 8px;
  background: var(--tbf-line);
}

.tbf-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tbf-lead {
  font-size: 14px;
  line-height: 1.45;
  color: #3d5248;
  margin: 8px 0 0;
}

.tbf-edit-note {
  font-size: 14px;
  color: var(--tbf-green-deep);
  margin: 0 0 12px;
}

/* Body grows with step content (no nested scrollbar) */
.tbf-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow: visible;
  padding: 16px;
}

@media (min-width: 768px) {
  .tbf-body {
    padding: 20px 24px;
  }
}

/* Step visibility via data-step on root */
.tbf[data-step="1"] .tbf-booking-mount,
.tbf[data-step="1"] .tbf-step2-only {
  display: none !important;
}

.tbf[data-step="2"] .tbf-booking-mount,
.tbf[data-step="2"] .tbf-step1-only {
  display: none !important;
}

.tbf[data-step="3"] .tbf-pricing-mount,
.tbf[data-step="3"] .tbf-step1-only {
  display: none !important;
}

/* Step 1: hide booking widgets inside package panels; keep rates / IE */
.tbf[data-step="1"] .tbf-step2-only,
.tbf[data-step="1"] .fixed-price-summary-wrapper,
.tbf[data-step="1"] .occupancy-tiers-booking-section,
.tbf[data-step="1"] .fixed-select-package-btn,
.tbf[data-step="1"] .select-occupancy-package-btn,
.tbf[data-step="1"] .btn-select-package,
.tbf[data-step="1"] .gj-book-btn,
.tbf[data-step="1"] .group-joining-book-btn,
.tbf[data-step="1"] .select-package-btn,
.tbf[data-step="1"] .group-joining-interactive-panel,
.tbf[data-step="1"] .gj-panel,
.tbf[data-step="1"] [data-no-auto-select] > .occupancy-tiers-booking-section {
  display: none !important;
}

/* Step 2: footer owns “Select this package” — hide duplicate in-panel CTAs (keep clickable) */
.tbf[data-step="2"] .po-option-panel .fixed-select-package-btn,
.tbf[data-step="2"] .po-option-panel .select-occupancy-package-btn,
.tbf[data-step="2"] .po-option-panel .btn-select-package,
.tbf[data-step="2"] .po-option-panel .gj-book-btn,
.tbf[data-step="2"] .po-option-panel .group-joining-book-btn,
.tbf[data-step="2"] .po-option-panel .select-package-btn {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tbf .xr-pricing-lead {
  margin-bottom: 12px !important;
}

.tbf .enhanced-pricing-section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Action bar at end of container — after prices & details */
.tbf-footer,
.tbf-footer.tbf-footer--ported {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: none !important;
  transform: none !important;
  z-index: 2;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  margin: 0;
  padding: 16px;
  border: none;
  border-top: 1px solid var(--tbf-line);
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: none;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.tbf-footer.is-away {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (min-width: 768px) {
  .tbf-footer {
    padding: 16px 24px 20px;
  }
}

.tbf-footer-spacer {
  display: none;
}

.tbf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.tbf-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(49, 150, 74, 0.28);
}

.tbf-btn:active {
  transform: scale(0.98);
}

.tbf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tbf-btn-ghost {
  background: transparent;
  color: #3d5248;
  border-color: var(--tbf-line);
}

.tbf-btn-ghost:hover {
  background: var(--tbf-fog);
  color: var(--tbf-ink);
}

.tbf-btn-primary {
  flex: 1 1 auto;
  background: var(--tbf-green);
  color: #fff;
  border-color: var(--tbf-green);
}

.tbf-btn-primary:hover {
  background: var(--tbf-green-deep);
  border-color: var(--tbf-green-deep);
}

#tbf-back-btn {
  flex: 0 0 auto;
  min-width: 88px;
}

#tbf-back-btn[hidden],
#tbf-next-btn[hidden],
#tbf-checkout-btn[hidden] {
  display: none !important;
}

#tbf-next-btn,
#tbf-checkout-btn {
  flex: 1 1 auto;
  display: inline-flex !important;
}

#tbf-next-btn:not([hidden]),
#tbf-checkout-btn:not([hidden]) {
  display: inline-flex !important;
}

.tbf-inline-next,
#tbf-inline-next {
  display: none !important;
}

.tbf[data-step="2"] .inclusions-exclusions-section,
.tbf[data-step="3"] .inclusions-exclusions-section,
.tbf[data-step="2"] .tbf-step1-hint,
.tbf[data-step="3"] .tbf-step1-hint {
  display: none !important;
}

.tbf #proceed-checkout-btn,
.tbf[data-step="3"] #proceed-checkout-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

.tbf[data-mode="basic"][data-step="3"] .tbf-pricing-mount {
  display: none !important;
}

.tbf[data-mode="basic"][data-step="3"] .tbf-booking-mount {
  display: block !important;
}

.tbf[data-mode="basic"] .tbf-booking-mount .tour-basic-booking-luxury {
  display: none !important;
}

.tbf[data-mode="basic"][data-step="3"] .tbf-booking-mount .tour-basic-booking-luxury {
  display: block !important;
}

/* Multi-package step 2: dim non-selected; allow open panel if user switches */
.tbf[data-step="2"] .po-option-card.tbf-package-dimmed .po-option-trigger {
  opacity: 0.55;
  filter: grayscale(0.1);
}
.tbf[data-step="2"] .po-option-card.tbf-package-dimmed:not(.is-open) .po-option-panel {
  display: none !important;
}
.tbf[data-step="2"] .po-option-card.tbf-package-active .po-option-trigger {
  border-color: var(--tbf-green) !important;
  box-shadow: 0 0 0 2px rgba(49, 150, 74, 0.18);
}

.tbf,
.tbf-body,
.tbf-pricing-mount,
.tbf .enhanced-pricing-section,
.tbf .po-option-panel,
.tbf .po-option-grid {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.tbf .enhanced-pricing-section,
.tbf .po-option-panel,
.tbf .po-option-grid {
  overflow-x: hidden !important;
}

.tbf table,
.tbf .table,
.tbf .table-responsive,
.tbf .vehicle-table-desktop,
.tbf .accommodation-table-desktop,
.tbf .otp-tier-grid,
.tbf .otp-wrap {
  width: 100% !important;
  max-width: 100% !important;
}

.tbf .acc-price-table {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0;
}
.tbf .acc-price-table thead {
  background: #f9fafb;
}
.tbf .acc-price-table th,
.tbf .acc-price-table td {
  padding: 12px 15px;
  vertical-align: top;
}
.tbf .acc-price-table .acc-col-price {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .tbf .table-responsive,
  .tbf .vehicle-table-desktop,
  .tbf .accommodation-table-desktop,
  .tbf .acc-price-table-wrap {
    overflow-x: visible !important;
  }

  .tbf .acc-price-table,
  .tbf .accommodation-table-desktop table {
    display: block;
    width: 100% !important;
    table-layout: auto !important;
    border: none !important;
    overflow: visible !important;
  }
  .tbf .acc-price-table thead {
    display: none;
  }
  .tbf .acc-price-table tbody {
    display: block;
  }
  .tbf .acc-price-table tr.room-pricing-row {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--tbf-line, #e5e7eb);
    border-radius: 10px;
    padding: 12px;
    background: #fff;
  }
  .tbf .acc-price-table td.acc-room-label {
    display: block;
    padding: 0 0 10px !important;
    margin-bottom: 8px;
    border: none !important;
    border-bottom: 1px solid #f1f5f4 !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: break-word;
  }
  .tbf .acc-price-table td.acc-col-price {
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0 !important;
    border: none !important;
    text-align: right !important;
    white-space: normal !important;
    width: 100% !important;
  }
  .tbf .acc-price-table td.acc-col-price::before {
    content: attr(data-label);
    font-weight: 650;
    font-size: 13px;
    text-align: left;
    color: #3d5248;
    flex: 0 0 auto;
  }

  .tbf .vehicle-table-desktop {
    display: none !important;
  }
  .tbf .vehicle-cards-mobile {
    display: block !important;
  }

  .tbf .otp-tier-grid {
    grid-template-columns: 1fr !important;
  }
  .tbf .otp-tier-card {
    border-right: none !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left !important;
  }
  .tbf .po-option-grid {
    grid-template-columns: 1fr !important;
  }
  .tbf-step-label {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tbf-step,
  .tbf-btn,
  .tbf-body {
    transition: none;
    scroll-behavior: auto;
  }
}

/* Step 3 — deposit due today */
.tbf-deposit-panel {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid rgba(49, 150, 74, 0.35);
  background: linear-gradient(180deg, #f3faf5 0%, #fff 55%);
}

.tbf-deposit-panel[hidden] {
  display: none !important;
}

.tbf-deposit-panel__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5c6f63;
  margin-bottom: 2px;
}

.tbf-deposit-panel__title {
  display: block;
  font-size: 15px;
  font-weight: 750;
  color: #0c1a12;
}

.tbf-deposit-panel__amount {
  margin: 10px 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: #1f6f35;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.tbf-deposit-panel__meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: #5c6f63;
}

.tbf-deposit-panel__rows {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px dashed rgba(12, 26, 18, 0.12);
  border-bottom: 1px dashed rgba(12, 26, 18, 0.12);
  margin-bottom: 10px;
}

.tbf-deposit-panel__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #3d5248;
}

.tbf-deposit-panel__row strong {
  font-variant-numeric: tabular-nums;
  color: #0c1a12;
}

.tbf-deposit-panel__row--balance {
  color: #5c6f63;
}

.tbf-deposit-panel__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #5c6f63;
}

/* Step 3 compact review — drop repeated success/deposit chrome */
.tbf[data-step="3"] .prefill-success-banner,
.tbf[data-step="3"] .date-selection-prompt,
.tbf[data-step="3"] .no-selection-prompt,
.tbf[data-step="3"] .booking-summary-header .summary-icon,
.tbf[data-step="3"] .booking-summary-header .summary-info p,
.tbf[data-step="3"] .btn-change-selection,
.tbf[data-step="3"] .btn-change-date {
  display: none !important;
}

.tbf[data-step="3"] .booking-summary-header {
  margin-bottom: 12px;
  padding: 12px 14px;
}

/* Deposit lives in #tbf-deposit-panel — don't repeat under the summary */
.tbf[data-step="3"] .grand-total-box .deposit-row,
.tbf[data-step="3"] .grand-total-box .balance-row,
.tbf[data-step="3"] .grand-total-box .deposit-reassurance {
  display: none !important;
}

.tbf[data-step="3"]:has(#tbf-deposit-panel:not([hidden])) .grand-total-box {
  display: none !important;
}
