/* ── Tour page: Departure section ─────────────────────────────────────────── */

.v3-departures {
  margin-top: 48px;
}

.v3-daily-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #f0f7ff;
  border: 1px solid #bee3f8;
  border-radius: 10px;
  padding: 20px 24px;
  flex-wrap: wrap;
}

.v3-daily-banner strong {
  display: block;
  font-size: 1.05rem;
  color: #1a4b89;
  margin-bottom: 4px;
}

.v3-daily-banner p {
  margin: 0;
  color: #4a5568;
  font-size: 0.95rem;
}

.v3-daily-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.v3-no-departures {
  background: #f9fafb;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: #6b7280;
}

.v3-no-departures p { margin: 0 0 8px; }

.v3-departure-table-wrap {
  overflow-x: auto;
}

.v3-departure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.v3-departure-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #e5e7eb;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.v3-departure-table td {
  padding: 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.v3-departure-table tr:last-child td { border-bottom: none; }

.v3-dep-dates {
  display: block;
  font-weight: 600;
  color: #1a202c;
}

.v3-dep-note {
  display: block;
  font-size: 0.8rem;
  color: #f59e0b;
  margin-top: 2px;
}

.v3-btn-sm {
  font-size: 0.8rem !important;
  padding: 7px 14px !important;
}

/* ── Booking page ──────────────────────────────────────────────────────────── */

.book-page {
  min-height: 100vh;
  background: #f3f4f6;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 80px;
}

/* Two-column wrapper when sidebar is visible */
.book-wrap {
  width: 100%;
  max-width: 640px;
}

.book-wrap--two-col {
  max-width: 1060px;
  display: grid;
  grid-template-columns: 1fr 360px;
  align-items: start;
  gap: 24px;
}

.book-card {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

.book-card-header {
  background: #1a4b89;
  color: #fff;
  padding: 28px 32px 24px;
}

.book-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  display: block;
  margin-bottom: 6px;
}

.book-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 20px;
}

/* Steps — reuse pay-steps pattern */
.book-steps { display: flex; align-items: center; gap: 0; }
.book-step { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; opacity: 0.6; }
.book-step.active { opacity: 1; font-weight: 600; }
.book-step.done { opacity: 1; }
.book-step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0;
}
.book-step.active .book-step-dot { background: #fff; color: #1a4b89; border-color: #fff; }
.book-step.done .book-step-dot { background: #fba504; border-color: #fba504; }
.book-step-line { flex: 1; height: 2px; background: rgba(255,255,255,0.2); margin: 0 6px; min-width: 20px; }
.book-step-line.done { background: #fba504; }

.book-card-body { padding: 28px 32px; }

.book-trip-summary {
  background: #f0f7ff;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.book-trip-name { font-weight: 700; color: #1a4b89; font-size: 1rem; }
.book-trip-date { color: #4a5568; margin-top: 2px; }

.book-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.book-row-single { margin-bottom: 14px; }
.book-field label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.book-field .req { color: #ef4444; margin-left: 2px; }
.book-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #d1d5db; border-radius: 7px;
  font-size: 0.95rem; transition: border-color 0.15s; background: #fff; box-sizing: border-box;
}
.book-input:focus { outline: none; border-color: #1a4b89; }
.book-input[type="number"] { -moz-appearance: textfield; }

.book-select {
  width: 100%; padding: 10px 12px; border: 1.5px solid #d1d5db; border-radius: 7px;
  font-size: 0.95rem; background: #fff; box-sizing: border-box;
}

.book-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #d1d5db; border-radius: 7px;
  font-size: 0.95rem; resize: vertical; min-height: 80px; box-sizing: border-box;
}

.book-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 10px 14px; border-radius: 6px; font-size: 0.875rem; margin-bottom: 16px;
}

.book-btn-primary {
  width: 100%; background: #1a4b89; color: #fff; border: none;
  padding: 14px; border-radius: 8px; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.book-btn-primary:hover { background: #153d70; }
.book-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.book-back-link {
  background: none; border: none; color: #6b7280; font-size: 0.875rem;
  cursor: pointer; padding: 0; margin-top: 12px; text-decoration: underline;
}

/* Review step */
.book-review-table { width: 100%; font-size: 0.9rem; }
.book-review-table td { padding: 8px 0; }
.book-review-table td:last-child { text-align: right; font-weight: 600; }
.book-review-divider { border: none; border-top: 1px solid #e5e7eb; margin: 10px 0; }
.book-review-total { font-size: 1.1rem; font-weight: 700; color: #1a4b89; }

.book-terms-note {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px;
  padding: 12px 14px; font-size: 0.825rem; color: #78350f; margin-bottom: 18px;
}

/* Gateway step — reuse pay-gw-* pattern */
.book-gw-wrap { position: relative; }
.book-gw-iframe-wrap { position: relative; min-height: 320px; }
.book-gw-loading {
  position: absolute; inset: 0; background: #fff; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  z-index: 1; transition: opacity 0.3s;
}
.book-gw-loading.hidden { opacity: 0; pointer-events: none; }
.book-gw-spinner {
  width: 32px; height: 32px; border: 3px solid #e5e7eb;
  border-top-color: #1a4b89; border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.book-gw-iframe-wrap iframe { width: 100%; min-height: 320px; border: none; display: block; }

/* ── Sidebar ───────────────────────────────────────────────────────────────── */

/* ── Sidebar image ──────────────────────────────────────────────────────────── */

.book-sidebar-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.book-sidebar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */

.book-sidebar {
  position: sticky;
  top: 24px;
}

.book-sidebar-inner {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

.book-sidebar-header {
  background: #1a4b89;
  color: #fff;
  padding: 20px 20px 16px;
}

.book-sidebar-tour {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.book-sidebar-date {
  font-size: 0.85rem;
  opacity: 0.85;
}

.book-sidebar-pax {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 2px;
}

/* Price breakdown */
.book-price-breakdown {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.875rem;
}

.book-price-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: #374151;
}

.book-price-row span:last-child {
  font-weight: 600;
  color: #111827;
}

.book-price-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-weight: 700;
  font-size: 1rem;
}

.book-price-total span:first-child {
  color: #111827;
  font-weight: 700;
}

.book-price-total span:last-child {
  color: #1a4b89;
  font-size: 1.1rem;
}

/* Deposit hint */
.book-sidebar-deposit-hint {
  padding: 14px 20px;
  font-size: 0.8rem;
  color: #6b7280;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.book-sidebar-deposit-icon { flex-shrink: 0; }

/* Payment toggle */
.book-pay-toggle {
  padding: 16px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-pay-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  padding: 12px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.book-pay-option.selected {
  border-color: #1a4b89;
  background: #f0f7ff;
}

.book-pay-option input[type="radio"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #1a4b89;
}

.book-pay-option-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #111827;
}

.book-pay-option-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a4b89;
  margin: 2px 0;
}

.book-pay-option-note {
  font-size: 0.75rem;
  color: #6b7280;
}

.book-sidebar-pay-today {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 0;
  font-size: 0.9rem;
  color: #374151;
}

.book-sidebar-pay-today strong {
  font-size: 1.15rem;
  color: #1a4b89;
}

.book-sidebar-cta {
  margin: 14px 20px 20px;
  width: calc(100% - 40px) !important;
}

/* ── Section labels ─────────────────────────────────────────────────────────── */

.book-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 10px;
  margin-top: 20px;
}

.book-section-label:first-child {
  margin-top: 0;
}

.book-optional {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ── Add-ons section ────────────────────────────────────────────────────────── */

.book-addons-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.book-addon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.book-addon-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.book-addon-info {
  flex: 1;
  min-width: 0;
}

.book-addon-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.book-addon-price {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 1px;
}

.book-addon-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.book-addon-subtotal {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a4b89;
  min-width: 52px;
  text-align: right;
}

.book-qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
}

.book-qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: #fff;
  color: #374151;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  flex-shrink: 0;
}

.book-qty-btn:hover:not(:disabled) { background: #f3f4f6; }
.book-qty-btn:disabled { color: #d1d5db; cursor: not-allowed; }

.book-qty-val {
  width: 28px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

/* Details form spacing */
.book-details-form .book-field { margin-bottom: 0; }

@media (max-width: 900px) {
  .book-wrap--two-col {
    grid-template-columns: 1fr;
  }
  .book-sidebar {
    position: static;
    order: -1; /* show sidebar above card on mobile */
  }
}

@media (max-width: 600px) {
  .book-card-header, .book-card-body { padding-left: 20px; padding-right: 20px; }
  .book-row { grid-template-columns: 1fr; }
}
