/* ==========================================================================
   Tadoba Safari Checkout Flow — themed glow matching live booking UX
   ========================================================================== */

.checkout-hero {
  background: linear-gradient(180deg, rgba(10,14,12,0.78) 0%, rgba(10,14,12,0.92) 100%),
    url('../images/hero-bg.jpg') center 30%/cover no-repeat;
  padding: 48px 0 36px;
  text-align: center;
  color: #fff;
}

.checkout-flow-section {
  position: relative;
}

/* Traveller checkout: form 8 | summary 4 */
.checkout-traveller-form .checkout-layout-8-4,
.checkout-layout-8-4 {
  grid-template-columns: 8fr 4fr;
  gap: 28px;
  max-width: 1200px;
  align-items: start;
}

.checkout-layout-8-4 .checkout-form-card {
  min-width: 0;
}

.checkout-layout-8-4 .checkout-summary-sticky {
  position: sticky;
  top: 92px;
  align-self: start;
}

.checkout-layout-8-4 .checkout-summary-card {
  padding: 22px 20px;
}

.checkout-layout-8-4 .checkout-form-card {
  padding: 28px 26px;
}

.checkout-layout-8-4 .breakdown-row strong {
  text-align: right;
  word-break: break-word;
  max-width: 58%;
}

.checkout-layout-8-4 .checkout-helpline-card {
  margin-top: 4px;
}

/* Desktop: show pay inside form; hide mobile pay bar */
.checkout-pay-mobile {
  display: none;
}

.checkout-pay-desktop {
  display: block;
  margin-top: 4px;
}

.booking-glow-card {
  position: relative;
  border: 1px solid rgba(216, 137, 31, 0.28);
  box-shadow: 0 10px 28px rgba(26, 126, 55, 0.08), 0 0 0 1px rgba(26, 126, 55, 0.04);
  overflow: hidden;
}

.booking-glow-card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(216,137,31,0.22) 0%, transparent 70%);
  pointer-events: none;
  animation: glowDrift 6s ease-in-out infinite alternate;
}

@keyframes glowDrift {
  from { transform: translate(0, 0); opacity: 0.7; }
  to { transform: translate(40px, 24px); opacity: 1; }
}

.booking-pay-glow {
  animation: payPulse 2.2s ease-in-out infinite;
  box-shadow: 0 8px 24px rgba(26, 126, 55, 0.35), 0 0 0 0 rgba(216, 137, 31, 0.45);
}

@keyframes payPulse {
  0% { box-shadow: 0 8px 24px rgba(26, 126, 55, 0.35), 0 0 0 0 rgba(216, 137, 31, 0.4); }
  70% { box-shadow: 0 8px 24px rgba(26, 126, 55, 0.35), 0 0 0 12px rgba(216, 137, 31, 0); }
  100% { box-shadow: 0 8px 24px rgba(26, 126, 55, 0.35), 0 0 0 0 rgba(216, 137, 31, 0); }
}

.booking-glow-pulse {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,126,55,0.35), rgba(216,137,31,0.15));
  animation: softPulse 1.4s ease-in-out infinite;
}

@keyframes softPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.75; }
  50% { transform: scale(1.05); opacity: 1; }
}

.traveller-block {
  margin-bottom: 22px;
}

.traveller-block-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.traveller-block-title i {
  color: var(--primary-green);
}

.traveller-row {
  background: #fbf9f4;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.traveller-index {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.traveller-index span {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-green);
  color: #fff;
  font-size: 0.75rem;
}

.traveller-fields {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.55fr 0.9fr 1fr 1fr;
  gap: 10px;
}

.traveller-fields input,
.traveller-fields select {
  width: 100%;
  border: 1px solid #d7d0c3;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-main);
  font-size: 0.88rem;
  background: #fff;
  color: var(--text-dark);
}

.traveller-fields input:focus,
.traveller-fields select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(26, 126, 55, 0.12);
}

.term-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-dark);
  margin: 8px 0 16px;
}

.term-check a {
  color: var(--primary-green);
  font-weight: 600;
}

.declaration-box {
  background: linear-gradient(135deg, rgba(26,126,55,0.06), rgba(216,137,31,0.08));
  border: 1px solid rgba(26, 126, 55, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.declaration-box strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
}

.declaration-box p,
.declaration-box li {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.declaration-box ul {
  margin: 8px 0 0 18px;
}

.gst-note,
.jeep-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #e8e1d4;
  font-size: 0.9rem;
}

.breakdown-row span {
  color: var(--text-muted);
}

.breakdown-row.total-row {
  border-bottom: none;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid #e8e1d4;
}

.breakdown-row.total-row strong {
  color: var(--primary-green);
  font-size: 1.15rem;
}

.checkout-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 19, 0.55);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  gap: 14px;
}

.checkout-loader {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bc-wrap {
  max-width: 820px;
  margin: 0 auto 40px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
}

.bc-card {
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
}

.bc-card-title {
  background: linear-gradient(90deg, #1a7e37, #2f4a3a);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 14px;
  margin: 0;
  font-family: var(--font-heading);
}

.bc-table {
  width: 100%;
  border-collapse: collapse;
}

.bc-table th,
.bc-table td {
  padding: 10px 14px;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0ebe2;
  text-align: left;
  vertical-align: top;
}

.bc-table th {
  width: 38%;
  color: var(--text-muted);
  background: #fbf9f4;
  font-weight: 600;
}

.bc-note {
  text-align: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.bc-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.success-note {
  background: #f0faf3;
  border: 1px solid #c6e6d1;
  color: #14662c;
}

.fail-note {
  background: #fff5f5;
  border: 1px solid #f5c2c2;
  color: #9b1c1c;
}

.status-paid {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(26,126,55,0.12);
  color: var(--primary-green);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.2;
  flex-shrink: 0;
}

.bc-message-html {
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-dark);
}

.bc-contact {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.bc-contact a {
  color: var(--primary-green);
  font-weight: 700;
}

/* ---- Compact confirmation: 3 cards in one row ---- */
.bc-hero-compact {
  padding: 36px 0 28px !important;
}

.bc-page {
  padding-top: 28px;
  padding-bottom: 48px;
}

.bc-success-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #f0faf3 0%, #fff8ec 100%);
  border: 1px solid #cfe9d7;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: 0 8px 22px rgba(26, 126, 55, 0.08);
}

.bc-success-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1a7e37, #14662c);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(26, 126, 55, 0.35);
}

.bc-success-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.bc-success-copy strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #14662c;
}

.bc-success-copy span {
  font-size: 0.84rem;
  color: #4b5563;
}

.bc-success-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(216, 137, 31, 0.12);
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.bc-cards-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.bc-info-card {
  background: #fff;
  border: 1px solid rgba(26, 126, 55, 0.12);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 10px 28px rgba(15, 17, 19, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.bc-info-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
}

.bc-info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(26, 126, 55, 0.12);
}

.bc-info-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, rgba(26,126,55,0.06), transparent);
}

.bc-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 126, 55, 0.12);
  color: var(--primary-green);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.bc-card-payment .bc-info-icon {
  background: rgba(216, 137, 31, 0.15);
  color: #b45309;
}

.bc-card-customer .bc-info-icon {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.bc-card-safari .bc-info-icon {
  background: rgba(26, 126, 55, 0.14);
  color: #14662c;
}

.bc-info-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.bc-info-head p {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.bc-info-list {
  list-style: none;
  margin: 0;
  padding: 4px 16px 14px;
  flex: 1;
}

.bc-info-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #ece6da;
}

.bc-info-list li:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.bc-info-list li span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
  max-width: 42%;
}

.bc-info-list li strong {
  font-size: 0.84rem;
  color: var(--text-dark);
  font-weight: 700;
  text-align: right;
  word-break: break-word;
  line-height: 1.35;
  min-width: 0;
}

.bc-info-list li strong:has(.status-paid),
.bc-info-list li .bc-status-wrap {
  word-break: normal;
  overflow-wrap: normal;
}

.bc-info-list li .status-paid {
  word-break: keep-all;
  overflow-wrap: normal;
  white-space: nowrap;
}

.bc-info-list li strong a {
  color: var(--primary-green);
  text-decoration: none;
}

.bc-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem !important;
  letter-spacing: -0.01em;
}

.bc-amount {
  color: var(--primary-green) !important;
  font-size: 0.95rem !important;
}

.bc-email {
  font-size: 0.78rem !important;
}

.bc-card-foot {
  margin-top: auto;
  padding: 0 16px 14px;
}

.bc-card-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #128c7e;
  text-decoration: none;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
}

.bc-card-foot a:hover {
  background: rgba(37, 211, 102, 0.2);
}

.bc-bottom-bar {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: 12px;
}

.bc-again-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-green);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 16px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.bc-again-btn:hover {
  background: var(--primary-green-hover);
  transform: translateY(-1px);
}

@media (max-width: 992px) {
  .bc-cards-row {
    grid-template-columns: 1fr;
  }

  .bc-success-chip {
    display: none;
  }
}

@media (max-width: 640px) {
  .bc-success-banner {
    align-items: flex-start;
  }

  .bc-bottom-bar {
    flex-direction: column;
    text-align: center;
  }

  .bc-info-list li {
    flex-direction: column;
    gap: 3px;
  }

  .bc-info-list li span,
  .bc-info-list li strong {
    max-width: 100%;
    text-align: left;
  }
}

@media (max-width: 1100px) {
  .checkout-layout-8-4 {
    grid-template-columns: 7fr 5fr;
    gap: 22px;
  }

  .traveller-fields {
    grid-template-columns: 1.2fr 0.7fr 0.5fr 0.85fr 1fr 1fr;
  }
}

/* Tablet / Mobile: form first, summary AFTER form */
@media (max-width: 992px) {
  .checkout-hero {
    padding: 28px 0 22px;
  }

  .checkout-hero .page-main-title {
    font-size: 1.35rem !important;
    line-height: 1.3;
    padding: 0 8px;
  }

  .checkout-hero p {
    font-size: 0.86rem;
    line-height: 1.45;
    padding: 0 10px;
  }

  .checkout-flow-section {
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .checkout-flow-section .payment-steps-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    margin-bottom: 18px;
    padding: 10px 8px;
    border-radius: 14px;
    max-width: 100%;
  }

  .checkout-flow-section .payment-step-badge {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: 4px;
    font-size: 0.62rem;
    padding: 0;
    white-space: nowrap;
  }

  .checkout-flow-section .payment-step-badge .step-num {
    width: 22px;
    height: 22px;
    min-width: 22px;
    font-size: 0.68rem;
    flex-shrink: 0;
  }

  .checkout-flow-section .payment-step-badge > span:not(.step-num) {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .checkout-flow-section .step-divider-arrow {
    display: none;
  }

  .checkout-traveller-form .checkout-layout-8-4,
  .checkout-layout-8-4,
  .checkout-traveller-form .payment-checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
  }

  /* Explicit order: form = 1, summary = 2, mobile pay = 3 */
  .checkout-layout-8-4 .checkout-form-card {
    order: 1;
    width: 100%;
    max-width: 100%;
  }

  .checkout-layout-8-4 .checkout-summary-card,
  .checkout-layout-8-4 .checkout-summary-sticky {
    order: 2;
    position: static;
    top: auto;
    width: 100%;
    max-width: 100%;
  }

  .checkout-layout-8-4 .checkout-pay-mobile {
    order: 3;
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(26, 126, 55, 0.18);
    box-shadow: 0 -8px 28px rgba(15, 17, 19, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .checkout-layout-8-4 .checkout-pay-mobile .btn-proceed-checkout {
    width: 100%;
    margin: 0;
    min-height: 52px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .checkout-layout-8-4 .checkout-pay-mobile .checkout-trust-logos {
    display: none;
  }

  .checkout-layout-8-4 .checkout-pay-desktop {
    display: none;
  }

  /* Space so last content isn't hidden behind sticky pay bar */
  .checkout-flow-section {
    padding-bottom: 110px;
  }

  .traveller-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .checkout-hero {
    padding: 22px 0 18px;
  }

  .checkout-flow-section .site-container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .checkout-layout-8-4 .checkout-form-card,
  .checkout-layout-8-4 .checkout-summary-card {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .checkout-form-header h2 {
    font-size: 1.05rem;
  }

  .checkout-form-header p {
    font-size: 0.82rem;
  }

  .traveller-row {
    padding: 12px 10px;
  }

  .traveller-fields {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .traveller-fields input,
  .traveller-fields select {
    font-size: 16px; /* prevent iOS zoom */
    min-height: 44px;
    padding: 11px 12px;
  }

  .traveller-block-title {
    font-size: 0.95rem;
  }

  .summary-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .summary-card-header img {
    width: 48px;
    height: 48px;
  }

  .breakdown-row {
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 0.84rem;
  }

  .breakdown-row span,
  .breakdown-row strong {
    max-width: 100%;
  }

  .breakdown-row strong {
    text-align: left;
  }

  .term-check {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .declaration-box {
    padding: 12px;
  }

  .declaration-box p,
  .declaration-box li {
    font-size: 0.8rem;
  }

  .btn-proceed-checkout {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    font-size: 1rem;
    padding: 14px 16px;
  }

  .checkout-layout-8-4 .checkout-pay-mobile {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .checkout-flow-section {
    padding-bottom: 100px;
  }

  .checkout-trust-logos {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
  }

  .checkout-helpline-card {
    flex-wrap: wrap;
  }
}
