/* Modern UI Layer (Bootstrap 5 friendly) */

/* Theme variables and fallbacks */
:root {
  --ui-primary: var(--theme-bg, #5E60CE);
  --ui-bg: #0f172a; /* slate-900 */
  --ui-surface: rgba(255,255,255,0.65);
  --ui-border: rgba(0,0,0,0.08);
  --ui-text: #0b1324;
  --ui-muted: #6b7280;
  --ui-radius: 14px;
}

/* Page background */
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94,96,206,.25), transparent 60%),
    radial-gradient(800px 500px at 90% -20%, rgba(15,23,42,.25), transparent 60%),
    linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
}

/* Glassy fixed navbar */
header.navbar {
  background-color: rgba(255,255,255,0.7);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.swap_navbar {
  background-color: rgba(255,255,255,0.92);
}

/* Logo adjustments */
header .logo {
  transition: transform .15s ease;
}
header .logo:hover {
  transform: translateY(-1px);
}

/* Modern card container */
.modern-card {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: 0 20px 40px rgba(15,23,42,.08);
  overflow: hidden;
}

/* Modern section header */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ui-border);
  background: rgba(255,255,255,0.55);
}
.section-head h5, .section-head h6 {
  margin: 0;
  color: var(--ui-text);
}

/* Buttons (primary gradient) */
.btn-primary {
  background-image: linear-gradient(120deg, var(--ui-primary), color-mix(in oklab, var(--ui-primary), white 20%));
  border: none;
}
.btn-primary:hover {
  filter: brightness(1.03);
}
.btn-outline-primary {
  border-color: var(--ui-primary);
  color: var(--ui-primary);
}
.btn-outline-primary:hover {
  background-color: color-mix(in oklab, var(--ui-primary), white 85%);
  border-color: var(--ui-primary);
}

/* Form tweaks */
.form-floating > label {
  color: var(--ui-muted);
}
.form-control, .form-select {
  border-radius: 10px;
  border-color: #e5e7eb;
}
.form-control:focus, .form-select:focus {
  border-color: color-mix(in oklab, var(--ui-primary), white 40%);
  box-shadow: 0 0 0 .25rem color-mix(in oklab, var(--ui-primary), white 80%);
}

/* Step indicator */
.booking-steps {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.booking-steps .step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ui-muted);
  font-weight: 600;
}
.booking-steps .step .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ui-muted);
}
.booking-steps .active {
  color: var(--ui-text);
}
.booking-steps .active .dot {
  background: var(--ui-primary);
}

/* Sticky bottom checkout summary */
#sticky-actions {
  position: fixed;
  left: 0; right: 0; bottom: 12px;
  margin: 0 auto;
  width: min(100%, 980px);
  z-index: 1060;
  padding: 10px 12px;
}
#sticky-actions .bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  box-shadow: 0 18px 32px rgba(15,23,42,.12);
  backdrop-filter: blur(8px);
  padding: 12px;
}
#sticky-actions .summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  color: var(--ui-text);
}
#sticky-actions .summary .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  font-size: 13px;
  border: 1px solid #e5e7eb;
}
#sticky-actions .actions {
  display: flex;
  gap: 8px;
}

/* Cards used in route-based sections */
#route-offers-ads .card {
  border-radius: 12px;
  border-color: #e5e7eb;
}

/* Select2 result panel animations (used by existing JS) */
.select2-results {
  transition: opacity .15s ease, transform .15s ease;
}
.select2--fadein { opacity: 1; transform: translateY(0); }
.select2--fadeout { opacity: .0; transform: translateY(-4px); }

/* Responsive spacing on the search box */
.search_box {
  padding: 16px;
}
@media (min-width: 768px) {
  .search_box {
    padding: 24px;
  }
}

/* Small detail: swap arrow button hover */
#swap .swap-places {
  cursor: pointer;
  transition: transform .15s ease;
}
#swap .swap-places:hover {
  transform: scale(1.06);
}

/* Page hero (gradient banner) */
.page-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--ui-border);
  background: linear-gradient(120deg, color-mix(in oklab, var(--ui-primary), white 70%), #ffffff);
  box-shadow: 0 24px 48px rgba(15,23,42,.08);
}
.page-hero .inner {
  padding: 26px 20px;
}
.page-hero h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0b1324;
}
.page-hero p {
  margin: 6px 0 0 0;
  color: var(--ui-muted);
}

/* Polished boxes used across pages */
.form-box, .booking-detail-form, .payment-received-wrap, .payment-methods, .card, .alert {
  border-radius: 14px !important;
  border: 1px solid var(--ui-border);
  box-shadow: 0 14px 28px rgba(15,23,42,.06);
}

/* Titles normalization */
.form-title-wrap .title, .card-title {
  letter-spacing: -0.01em;
}

/* Results list polish (common classes in results) */
.card-item, .card-item .card-body {
  border-radius: 12px;
}
.card-item {
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(15,23,42,.08);
}
.card-item .badge, .badge {
  border-radius: 999px;
}

/* Booking area spacing */
.booking-area .container > .row > [class*="col-"] .form-box {
  margin-bottom: 14px;
}

/* Dashboard banner */
.account-hero {
  background: linear-gradient(145deg, rgba(99,102,241,.2), rgba(14,165,233,.18));
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 48px rgba(15,23,42,.08);
}
.account-hero h3 {
  margin: 0;
  font-weight: 700;
}
.account-hero p {
  margin: 6px 0 0 0;
  color: var(--ui-muted);
}

/* Generic spacing helpers for uniqueness without markup changes */
.section-gap {
  margin-top: 18px;
  margin-bottom: 18px;
}

/* Make lists breathe a bit */
.list-items li, .list-items-2 li {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Buttons in booking/sum */
.btn-lg {
  border-radius: 12px;
}