/*
   Stopover concept for Riyadh Air

   Confidential — not for reuse or distribution.
   Copyright (c) 2026 Altovo. All rights reserved.

   This file, and the stopover product concept and booking logic it
   implements, are the property of Altovo. Prepared for evaluation by
   Riyadh Air. Not a live booking system.
*/
/* ============================================================
   Riyadh Air — design system extracted from riyadhair.com
   Tokens mirror the live site's CSS custom properties.
   ============================================================ */

@font-face {
  font-family: 'Loew RX';
  src: url('fonts/loew-rx-300.woff') format('woff');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Loew RX';
  src: url('fonts/loew-rx-400.woff') format('woff');
  font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Loew RX';
  src: url('fonts/loew-rx-700.woff') format('woff');
  font-weight: 600 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Quiche RX';
  src: url('fonts/quiche-rx.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* --- brand palette (hsl triplets, as on the live site) --- */
  --indigo-100: 261, 78%, 4%;
  --indigo-90:  262, 83%, 7%;
  --indigo-80:  263, 81%, 11%;
  --indigo-70:  263, 83%, 14%;
  --indigo-60:  263, 82%, 18%;
  --indigo-50:  263, 34%, 34%;
  --indigo-40:  263, 17%, 51%;
  --indigo-30:  262, 18%, 67%;
  --indigo-20:  261, 17%, 84%;
  --indigo-10:  260, 14%, 96%;

  --lavender-100: 242, 34%, 15%;
  --lavender-90:  241, 34%, 30%;
  --lavender-80:  241, 34%, 45%;
  --lavender-70:  241, 50%, 60%;
  --lavender-60:  241, 100%, 75%;
  --lavender-50:  241, 100%, 80%;
  --lavender-40:  241, 100%, 85%;
  --lavender-30:  241, 100%, 90%;
  --lavender-20:  242, 100%, 95%;
  --lavender-10:  240, 100%, 99%;

  /* --- semantic --- */
  --surface-background: hsl(260, 14%, 96%);
  --surface-card: hsl(0, 0%, 100%);
  --fills-brand: hsl(245, 40%, 48%);
  --fills-regular: hsl(240, 38%, 97%);
  --fills-regular-2: hsl(240, 36%, 95%);
  --fills-banner: hsl(32, 71%, 96%);
  --fills-sfeer: hsl(15, 92%, 59%);
  --fills-green: hsl(93, 83%, 25%);

  --text-dark: hsl(0, 0%, 0%);
  --text-light: hsl(0, 0%, 100%);
  --text-grey1: hsl(237, 9%, 48%);
  --text-grey2: hsl(237, 9%, 60%);
  --text-accent: hsl(245, 40%, 48%);
  --text-success: hsl(93, 83%, 25%);
  --text-danger: hsl(358, 73%, 50%);
  --text-warning: hsl(35, 100%, 50%);

  --border-1: hsl(240, 36%, 95%);
  --border-2: hsl(238, 40%, 86%);
  --border-3: hsl(240, 11%, 52%);
  --border-5: hsl(261, 17%, 84%);

  --button-surface-primary: hsl(263, 82%, 18%);
  --button-surface-primary-hover: hsl(263, 83%, 12%);
  --button-surface-secondary: hsl(0, 0%, 100%);
  --button-surface-secondary-hover: hsl(0, 0%, 96%);
  --button-surface-disabled: hsl(0, 0%, 80%);
  --button-border-secondary: hsl(240, 11%, 52%);
  --button-text-disabled: hsl(0, 0%, 65%);

  /* --- radii & spacing (live site scale) --- */
  --radius-s: 0.5rem;
  --radius-m: 1rem;
  --radius-l: 2.5rem;
  --radius-xl: 100px;
  --space-s: 0.5rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 2.5rem;
  --space-xxxl: 4rem;

  /* --- gradients sampled from the live pages --- */
  --header-gradient: linear-gradient(90deg, #250954 0%, #3a1f6b 32%, #5b4a83 68%, #7c6c96 100%);
  --hero-gradient: linear-gradient(135deg, #1a0736 0%, #2f1259 45%, #6b4b8f 100%);
  --stopover-gradient: linear-gradient(135deg, #2a0f5e 0%, #4b2a86 55%, #8a6bb0 100%);

  --shadow-card: 0 1px 2px rgba(16, 8, 40, .04), 0 8px 24px rgba(16, 8, 40, .06);
  --shadow-pop: 0 12px 40px rgba(16, 8, 40, .18);

  --page-max: 1248px;
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Loew RX', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--surface-background);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; }

.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-grey1); }
.small { font-size: 0.833rem; }
.tiny { font-size: 0.777rem; }
.bold { font-weight: 700; }
.accent { color: var(--text-accent); }
.row { display: flex; align-items: center; }
.gap-s { gap: 8px; } .gap-m { gap: 16px; } .gap-l { gap: 24px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ============================================================ header */
.rx-header {
  background: var(--header-gradient);
  color: #fff;
  position: sticky; top: 0; z-index: 60;
}
.rx-header-inner {
  max-width: 1360px; margin: 0 auto;
  height: 80px; padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.rx-logo { height: 34px; display: block; }
.rx-nav { display: flex; align-items: center; gap: 28px; font-size: 0.9rem; }
.rx-nav a { opacity: .95; padding: 6px 0; border-bottom: 2px solid transparent; }
.rx-nav a:hover { border-bottom-color: rgba(255,255,255,.75); }
.rx-header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.icon-btn {
  background: none; border: 0; color: #fff; cursor: pointer;
  display: grid; place-items: center; width: 32px; height: 32px; opacity: .95;
}
.icon-btn:hover { opacity: 1; }
.account-pill {
  display: flex; align-items: center; gap: 12px;
  background: hsl(263, 82%, 18%); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-xl); padding: 8px 16px; color: #fff; cursor: pointer;
}

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-l); padding: 12px 28px;
  font-size: 0.94rem; cursor: pointer; border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--button-surface-primary); color: #fff; }
.btn-primary:hover { background: var(--button-surface-primary-hover); }
.btn-secondary {
  background: var(--button-surface-secondary);
  border-color: var(--button-border-secondary); color: var(--text-dark);
}
.btn-secondary:hover { background: var(--button-surface-secondary-hover); }
.btn-ghost { background: transparent; color: var(--text-accent); padding: 12px 8px; }
.btn-ghost:hover { text-decoration: underline; }
.btn-light { background: #fff; color: hsl(263, 82%, 18%); }
.btn:disabled, .btn[disabled] {
  background: var(--button-surface-disabled); color: var(--button-text-disabled);
  border-color: transparent; cursor: not-allowed;
}
.btn-sm { padding: 8px 24px; font-size: 0.833rem; }
.btn-block { width: 100%; }

/* ============================================================ cards */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
}
.card-lg { border-radius: var(--radius-l); }
.card-pad { padding: 24px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--fills-regular-2); color: hsl(263, 82%, 18%);
  border-radius: var(--radius-xl); padding: 4px 14px; font-size: 0.78rem;
}
.chip-brand { background: hsl(263, 82%, 18%); color: #fff; }
.chip-green { background: hsl(96, 26%, 96%); color: var(--text-success); }
.chip-amber { background: var(--fills-banner); color: hsl(35, 100%, 30%); }

/* ============================================================ search widget */
.search-bar {
  background: #fff; border-radius: var(--radius-xl);
  box-shadow: var(--shadow-pop);
  display: flex; align-items: center; padding: 10px 10px 10px 32px; gap: 4px;
}
.search-field {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 18px; min-width: 0; cursor: pointer; border-radius: var(--radius-m);
}
.search-field:hover { background: var(--fills-regular); }
.search-field label { font-size: 0.7rem; color: var(--text-grey1); cursor: pointer; }
.search-field .val { font-size: 0.97rem; font-weight: 700; white-space: nowrap; }
.search-field .val.placeholder { font-weight: 400; color: var(--text-grey1); }
.search-divider { width: 1px; height: 34px; background: var(--border-1); }
.search-go {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--button-surface-primary); color: #fff;
  display: grid; place-items: center; margin-left: auto;
}
.search-go:hover { background: var(--button-surface-primary-hover); }
.swap-btn {
  border: 0; background: none; cursor: pointer; color: hsl(263, 82%, 18%);
  padding: 8px; display: grid; place-items: center;
}

/* ============================================================ progress steps */
.steps {
  background: #fff; border-bottom: 1px solid var(--border-1);
  position: sticky; top: 80px; z-index: 50;
}
.steps-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 24px; display: flex; gap: 8px; }
.step {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px 16px; font-size: 0.86rem; color: var(--text-grey1);
  border-bottom: 3px solid transparent;
}
.step .num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fills-regular-2); color: var(--text-grey1); font-size: 0.72rem;
}
.step.done { color: var(--text-dark); }
.step.done .num { background: var(--fills-green); color: #fff; }
.step.active { color: hsl(263, 82%, 18%); border-bottom-color: hsl(263, 82%, 18%); font-weight: 700; }
.step.active .num { background: hsl(263, 82%, 18%); color: #fff; }
.step-sep { align-self: center; color: var(--border-2); }

/* ============================================================ date strip */
.date-strip { display: flex; align-items: center; gap: 16px; margin: 22px 0 26px; }
.date-scroll { display: flex; gap: 12px; overflow-x: auto; flex: 1; padding: 2px; scrollbar-width: none; }
.date-scroll::-webkit-scrollbar { display: none; }
.date-pill {
  background: #fff; border: 1px solid transparent; border-radius: var(--radius-s);
  padding: 12px 28px; font-size: 0.9rem; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,8,40,.05);
}
.date-pill:hover { border-color: var(--border-2); }
.date-pill.sel { border-color: hsl(263, 82%, 18%); color: hsl(263, 82%, 18%); }
.date-pill .fare { display: block; font-size: 0.75rem; color: var(--text-grey1); }
.arrow-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-2);
  background: #fff; cursor: pointer; display: grid; place-items: center; flex: none;
}
.arrow-btn:hover { border-color: var(--border-3); }

/* ============================================================ flight card */
.flight-card { background: #fff; border-radius: var(--radius-m); box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: 20px; }
.flight-head { display: flex; align-items: center; gap: 28px; padding: 26px 28px; }
.flight-mark { width: 40px; height: 40px; border-radius: 8px; background: hsl(263,82%,18%); display: grid; place-items: center; flex: none; }
.flight-mark img { width: 26px; }
.flight-times { font-size: 1.15rem; font-weight: 700; }
.flight-sub { font-size: 0.8rem; color: var(--text-grey1); }
.flight-col { min-width: 110px; }
.flight-price { margin-left: auto; text-align: right; }
.flight-price .cur { font-size: 0.85rem; color: var(--text-grey1); }
.flight-price .amt { font-size: 1.3rem; font-weight: 700; }

.cabin-section { padding: 0 28px 28px; }
.section-label { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; }
.cabin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 26px; }
.cabin-opt {
  border: 1px solid var(--border-2); border-radius: var(--radius-s);
  padding: 18px 22px; cursor: pointer; background: #fff;
}
.cabin-opt:hover { border-color: var(--border-3); }
.cabin-opt.sel { border-color: hsl(263,82%,18%); background: hsl(240,100%,99%); box-shadow: inset 0 0 0 1px hsl(263,82%,18%); }
.cabin-opt .name { font-size: 0.97rem; margin-bottom: 4px; }
.cabin-opt .from { font-size: 0.86rem; color: var(--text-grey1); }
.cabin-opt .from b { color: var(--text-dark); }

.bundle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bundle {
  border: 1px solid var(--border-1); border-radius: var(--radius-s);
  padding: 22px; display: flex; flex-direction: column;
}
.bundle:hover { border-color: var(--border-2); box-shadow: var(--shadow-card); }
.bundle-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.bundle-name { font-size: 0.97rem; }
.bundle-price { font-size: 1.3rem; font-weight: 700; }
.bundle-price .cur { font-size: 0.85rem; font-weight: 400; }
.bundle dl { margin: 0; display: grid; gap: 14px; }
.bundle dt { font-size: 0.8rem; color: var(--text-grey1); }
.bundle dd { margin: 0; font-size: 0.87rem; display: flex; align-items: center; gap: 8px; }
.dot-sfeer { width: 16px; height: 16px; border-radius: 50%; background: var(--fills-sfeer); flex: none; }
.dot-level { width: 16px; height: 16px; border-radius: 50%; background: hsl(245,40%,48%); flex: none; }

.note-bar {
  display: flex; align-items: center; gap: 12px;
  background: hsl(240,100%,99%); border-radius: var(--radius-s);
  padding: 14px 18px; font-size: 0.86rem; margin: 22px 28px 28px;
}

/* ============================================================ forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 0.8rem; color: var(--text-grey1); }
.field input, .field select {
  font-family: inherit; font-size: 0.95rem; color: var(--text-dark);
  padding: 13px 16px; border: 1px solid var(--border-2); border-radius: var(--radius-s);
  background: #fff; outline: none;
}
.field input:focus, .field select:focus { border-color: hsl(263,82%,18%); box-shadow: 0 0 0 3px hsl(240,100%,95%); }
.field .hint { font-size: 0.75rem; color: var(--text-grey2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.88rem; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: hsl(263,82%,18%); flex: none; }

/* ============================================================ booking layout */
.book-layout { display: grid; grid-template-columns: 1fr 372px; gap: 28px; align-items: start; padding: 32px 0 72px; }
.summary { position: sticky; top: 168px; }
.summary-head { background: hsl(263,82%,18%); color: #fff; padding: 22px 24px; border-radius: var(--radius-m) var(--radius-m) 0 0; }
.summary-body { background: #fff; border-radius: 0 0 var(--radius-m) var(--radius-m); padding: 22px 24px; box-shadow: var(--shadow-card); }
.sum-line { display: flex; justify-content: space-between; gap: 16px; font-size: 0.88rem; padding: 9px 0; }
.sum-line.total { border-top: 1px solid var(--border-1); margin-top: 8px; padding-top: 16px; font-size: 1.05rem; font-weight: 700; }
.leg { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-1); }
.leg:last-child { border-bottom: 0; }

/* ============================================================ itinerary timeline */
.timeline { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid hsl(263,82%,18%); background: #fff; flex: none; }
.tl-line { width: 2px; flex: 1; background: var(--border-2); min-height: 42px; }
.tl-line.dashed { background: repeating-linear-gradient(180deg, var(--border-2) 0 5px, transparent 5px 10px); }
.tl-body { padding-bottom: 22px; }

.layover {
  display: flex; align-items: center; gap: 10px;
  background: var(--fills-regular); border-radius: var(--radius-s);
  padding: 10px 16px; font-size: 0.83rem; color: var(--text-grey1); margin: 4px 0 18px;
}

/* ============================================================ stopover module */
.stopover-hero {
  background: var(--stopover-gradient); color: #fff;
  border-radius: var(--radius-m); padding: 30px 32px;
  display: flex; align-items: center; gap: 28px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.stopover-hero::after {
  content: ''; position: absolute; right: -60px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%);
}
.stopover-hero h2 { font-size: 1.6rem; margin-bottom: 8px; }
.stopover-hero p { font-size: 0.93rem; opacity: .92; max-width: 62ch; }

.pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pkg {
  background: #fff; border: 1px solid var(--border-1); border-radius: var(--radius-m);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pkg:hover { border-color: var(--border-2); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.pkg.sel { border-color: hsl(263,82%,18%); box-shadow: inset 0 0 0 1px hsl(263,82%,18%), var(--shadow-card); }
.pkg-img { height: 168px; background: var(--hero-gradient); position: relative; overflow: hidden; }
.pkg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pkg-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,4,30,.34) 0%, transparent 46%);
}
.pkg-img .tag { position: absolute; left: 14px; top: 14px; z-index: 2; }

/* ------------------------------------------------- peace of mind seal */
.pom-seal {
  display: flex; align-items: flex-start; gap: 18px;
  background: hsl(96, 26%, 96%); border: 1px solid hsl(93, 29%, 85%);
  border-radius: var(--radius-s); padding: 18px 20px; margin-top: 20px;
}
.pom-seal .seal { color: var(--text-success); flex: none; line-height: 0; }
.pom-seal .pom-title { display: block; font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.pom-seal p { font-size: .85rem; color: var(--text-dark); }
.pom-seal .caveat { display: block; margin-top: 6px; font-size: .8rem; color: var(--text-grey1); }
.pkg-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.pkg-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.pkg-feats { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; font-size: 0.85rem; }
.pkg-feats li { display: flex; gap: 9px; align-items: flex-start; }
.pkg-foot { margin-top: auto; padding-top: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pkg-price .amt { font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.pkg-price .per { font-size: 0.74rem; color: var(--text-grey1); }

.nights { display: flex; gap: 10px; }
.night-pill {
  border: 1px solid var(--border-2); background: #fff; border-radius: var(--radius-xl);
  padding: 9px 20px; cursor: pointer; font-size: 0.87rem;
}
.night-pill.sel { border-color: hsl(263,82%,18%); background: hsl(240,100%,99%); color: hsl(263,82%,18%); font-weight: 700; }
.night-pill:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================ stopover mark */
.stopover-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: hsl(263, 82%, 18%); color: #fff;
  border-radius: var(--radius-xl); padding: 7px 16px 7px 12px;
  font-size: .8rem; letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap; line-height: 1;
}
.stopover-badge svg { flex: none; }
.stopover-badge.light { background: rgba(255,255,255,.22); }
.stopover-badge.solid-light { background: #fff; color: hsl(263, 82%, 18%); }
.stopover-badge.outline {
  background: transparent; color: hsl(263, 82%, 18%);
  border: 1px solid var(--border-2);
}
.stopover-badge.sm { font-size: .7rem; padding: 5px 12px 5px 9px; gap: 7px; }

/* inline stopover tag used inside flight cards and date pills */
.so-inline {
  display: inline-flex; align-items: center; gap: 6px;
  color: hsl(263, 82%, 18%); font-size: .75rem;
}

/* ============================================================ calendar */
.cal-pop {
  position: absolute; z-index: 120; top: calc(100% + 10px); left: 0;
  background: #fff; border-radius: var(--radius-m); box-shadow: var(--shadow-pop);
  padding: 20px; width: 396px;
}
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-head .m { flex: 1; text-align: center; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: .7rem; color: var(--text-grey1); text-align: center; padding-bottom: 6px; }
.cal-day {
  border: 1px solid transparent; background: none; border-radius: var(--radius-s);
  padding: 7px 2px 6px; cursor: pointer; font-family: inherit; font-size: .86rem;
  display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative;
}
.cal-day:hover { background: var(--fills-regular); }
.cal-day .fare { font-size: .6rem; color: var(--text-grey1); line-height: 1; }
.cal-mark { height: 13px; display: grid; place-items: center; color: hsl(263, 82%, 18%); }
.cal-day.sel { border-color: hsl(263, 82%, 18%); background: hsl(240, 100%, 99%); font-weight: 700; }
.cal-legend { display: flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-1); font-size: .72rem; color: var(--text-grey1); }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.cal-legend i { width: 6px; height: 6px; border-radius: 50%; display: block; }

/* ============================================================ modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 4, 26, .55);
  display: grid; place-items: center; z-index: 200; padding: 24px;
}
.modal {
  background: #fff; border-radius: var(--radius-m); max-width: 720px; width: 100%;
  max-height: 86vh; overflow: auto; box-shadow: var(--shadow-pop);
}
.modal-head { display: flex; align-items: center; gap: 16px; padding: 24px 28px; border-bottom: 1px solid var(--border-1); position: sticky; top: 0; background: #fff; }
.modal-body { padding: 24px 28px 28px; }

/* --------------------------------------------- connection interstitial */
.modal-hero {
  background: var(--stopover-gradient); color: #fff;
  padding: 30px 32px 28px; position: relative; overflow: hidden;
}
.modal-hero::after {
  content: ''; position: absolute; right: -70px; top: -110px; width: 340px; height: 340px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.15), transparent 68%);
}
.modal-hero > * { position: relative; z-index: 2; }
.modal-hero h2 { font-size: 1.55rem; margin: 12px 0 10px; }
.modal-hero p { font-size: .94rem; opacity: .93; max-width: 60ch; }
.modal-hero .modal-sub { font-size: .86rem; opacity: .82; margin-top: -4px; max-width: 62ch; }
.modal-close {
  position: absolute; right: 18px; top: 18px; z-index: 3;
  background: rgba(255,255,255,.16); border: 0; color: #fff; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
}
.modal-close:hover { background: rgba(255,255,255,.28); }

/* mini route strip inside the interstitial */
.route-strip { display: flex; align-items: flex-start; gap: 0; margin: 22px 0 0; }
.route-node { text-align: center; min-width: 74px; padding-top: 2px; }
.route-node.hub { min-width: 132px; }
.route-node .code { font-size: 1.1rem; font-weight: 700; }
.route-node .when { font-size: .72rem; opacity: .8; }
.route-link {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-start;
  align-items: center; gap: 5px; padding: 12px 10px 0;
}
.route-line { width: 100%; height: 2px; background: rgba(255,255,255,.4); position: relative; }
.route-line.stay { background: repeating-linear-gradient(90deg, rgba(255,255,255,.75) 0 7px, transparent 7px 14px); }
.route-link .lbl { font-size: .72rem; opacity: .9; white-space: nowrap; }
/* the stay marker hangs beneath the hub it belongs to */
.route-stay-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 9px;
  background: rgba(255,255,255,.2); border-radius: var(--radius-xl);
  padding: 4px 12px; font-size: .74rem; white-space: nowrap;
}

/* ------------------------------------------- stopover offer (cross-sell) */
.modal.wide { max-width: 880px; }
.so-offer { padding: 28px; position: relative; }
.so-offer .modal-close {
  background: #fff; color: var(--text-dark);
  border: 1px solid var(--border-2); right: 22px; top: 22px;
}
.so-offer .modal-close:hover { background: var(--fills-regular-2); }

.offer-card {
  display: grid; grid-template-columns: 316px 1fr; gap: 28px;
  background: var(--fills-regular); border-radius: var(--radius-m);
  padding: 22px; margin-bottom: 26px;
}
.offer-img {
  width: 100%; height: 230px; object-fit: cover;
  border-radius: var(--radius-s); display: block;
}
.offer-copy h2 { font-size: 1.45rem; font-weight: 700; margin-bottom: 12px; }
.offer-copy p { font-size: .93rem; color: var(--text-dark); }
.offer-perk {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; font-size: .9rem;
}

.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.offer-grid h3 { font-size: 1.15rem; margin-bottom: 16px; }

.stepper-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--fills-regular); border-radius: var(--radius-s);
  padding: 18px 20px;
}
.stepper-row .lbl { font-weight: 700; flex: 1; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button {
  width: 38px; height: 34px; border: 0; border-radius: 7px; cursor: pointer;
  background: hsl(263, 82%, 18%); color: #fff; font-size: 1.1rem; line-height: 1;
  display: grid; place-items: center;
}
.stepper button:hover:not(:disabled) { background: hsl(263, 83%, 12%); }
.stepper button:disabled { background: var(--button-surface-disabled); cursor: not-allowed; }
.stepper .count {
  width: 52px; height: 38px; border: 1px solid var(--border-3); border-radius: 7px;
  display: grid; place-items: center; background: #fff; font-size: .98rem;
}

/* promo flag that points up at the stepper */
.promo-callout {
  display: inline-flex; align-items: center; gap: 8px; position: relative;
  background: var(--fills-sfeer); color: #fff;
  border-radius: 6px; padding: 8px 14px; font-size: .82rem;
  margin: 14px 0 0 auto;
}
.promo-wrap { display: flex; }
.promo-callout::before {
  content: ''; position: absolute; top: -7px; right: 86px;
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-bottom: 8px solid var(--fills-sfeer);
}

.radio-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 0; font-size: .95rem; cursor: pointer;
}
.radio-row span { flex: 1; }
.radio-row input { width: 20px; height: 20px; accent-color: hsl(263, 82%, 18%); cursor: pointer; }
.radio-row.disabled { color: var(--text-grey2); cursor: not-allowed; }
.radio-row.disabled input { cursor: not-allowed; }

.offer-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  margin-top: 30px;
}

@media (max-width: 820px) {
  .offer-card, .offer-grid { grid-template-columns: 1fr; }
  .offer-img { height: 180px; }
}

.alt-dates { display: grid; gap: 10px; margin-top: 6px; }
.alt-date {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius-s);
  padding: 14px 18px; cursor: pointer; font-family: inherit;
}
.alt-date:hover { border-color: hsl(263, 82%, 18%); background: hsl(240, 100%, 99%); }
.alt-date .d { font-weight: 700; min-width: 92px; }
.alt-date .tag { margin-left: auto; }

/* --------------------------- direct-connection date picker (forced modal) */
.swap-dates { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.swap-dates::-webkit-scrollbar { display: none; }
.swap-date {
  flex: none; min-width: 116px; text-align: center; cursor: pointer; font-family: inherit;
  background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius-s);
  padding: 12px 14px; display: grid; gap: 3px;
}
.swap-date:hover { border-color: hsl(263, 82%, 18%); background: hsl(240, 100%, 99%); }
.swap-date .d { font-weight: 700; font-size: .9rem; }
.swap-date .off { font-size: .68rem; color: var(--text-grey1); }
.swap-date .p { font-size: .78rem; color: var(--text-accent); }
.modal-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

/* ============================================================ confirmation */
.confirm-hero {
  background: var(--stopover-gradient); color: #fff;
  border-radius: var(--radius-m); padding: 34px 36px; margin: 32px 0 26px;
  display: flex; align-items: center; gap: 32px; position: relative; overflow: hidden;
}
.confirm-hero::after {
  content: ''; position: absolute; right: -70px; top: -110px; width: 360px; height: 360px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.15), transparent 68%);
}
.confirm-hero > * { position: relative; z-index: 2; }
.confirm-tick {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.18); display: grid; place-items: center;
}
.confirm-hero h1 { font-size: 1.9rem; margin-bottom: 6px; }
.confirm-hero p { font-size: .93rem; opacity: .92; }
.ref-box {
  margin-left: auto; text-align: right;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-s); padding: 14px 22px;
}
.ref-box .lbl { font-size: .7rem; opacity: .82; letter-spacing: .08em; text-transform: uppercase; }
.ref-box .ref { font-size: 1.7rem; font-weight: 700; letter-spacing: .1em; }

.sec { background: #fff; border-radius: var(--radius-m); box-shadow: var(--shadow-card); padding: 26px 28px; margin-bottom: 22px; }
.sec > h3 { font-size: 1.05rem; margin-bottom: 4px; }
.sec-sub { font-size: .84rem; color: var(--text-grey1); margin-bottom: 20px; }

/* itinerary leg */
.leg-card { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; padding: 18px 0; }
.leg-card .pt .time { font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.leg-card .pt .code { font-size: .95rem; }
.leg-card .pt .meta { font-size: .78rem; color: var(--text-grey1); }
.leg-card .mid { text-align: center; min-width: 150px; }
.leg-card .mid .dur { font-size: .8rem; color: var(--text-grey1); }
.leg-card .mid .bar { height: 2px; background: var(--border-2); margin: 8px 0; position: relative; }
.leg-card .mid .bar::after {
  content: ''; position: absolute; right: -1px; top: -3px;
  border-left: 7px solid var(--border-3); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.leg-card .pt.to { text-align: right; }
.leg-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: .8rem; color: var(--text-grey1); padding-bottom: 14px; }
.leg-div { border-top: 1px solid var(--border-1); }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th {
  text-align: left; font-weight: 400; font-size: .74rem; color: var(--text-grey1);
  text-transform: uppercase; letter-spacing: .06em; padding: 0 14px 10px 0; white-space: nowrap;
}
.tbl td { padding: 12px 14px 12px 0; border-top: 1px solid var(--border-1); vertical-align: top; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }

/* post-booking stopover upsell */
.upsell {
  border-radius: var(--radius-m); overflow: hidden; margin-bottom: 22px;
  display: grid; grid-template-columns: 280px 1fr;
  background: #fff; box-shadow: var(--shadow-card);
  border: 1px solid hsl(263, 82%, 18%);
}
.upsell img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 210px; }
.upsell-body { padding: 26px 28px; display: flex; flex-direction: column; }
.upsell-body h3 { font-size: 1.2rem; margin: 10px 0 8px; }
.upsell-body p { font-size: .9rem; color: var(--text-grey1); }
.upsell-feats { list-style: none; margin: 16px 0 0; padding: 0; display: flex; gap: 8px 22px; flex-wrap: wrap; font-size: .84rem; }
.upsell-feats li { display: flex; gap: 8px; align-items: center; }
.upsell-cta { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }

.next-steps { display: grid; gap: 16px; }
.next-step { display: flex; gap: 14px; align-items: flex-start; font-size: .88rem; }
.next-step .n {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--fills-regular-2); color: hsl(263,82%,18%); font-size: .74rem;
}
.action-row { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .upsell { grid-template-columns: 1fr; }
  .confirm-hero { flex-wrap: wrap; }
  .ref-box { margin-left: 0; }
  .leg-card { grid-template-columns: 1fr; }
  .leg-card .pt.to { text-align: left; }
}

/* ============================================================ footer */
.rx-footer { background: var(--header-gradient); color: #fff; margin-top: 72px; padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.85rem; opacity: .85; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); margin-top: 40px; padding-top: 24px; font-size: 0.8rem; opacity: .78; display: flex; gap: 24px; flex-wrap: wrap; }

/* ============================================================ misc */
/* Ownership badge — Altovo navy, white knockout logo. Fixed bottom-right on
   every page so provenance travels with any screenshot of this concept. */
.altovo-badge {
  position: fixed; right: 18px; bottom: 18px; z-index: 300;
  display: flex; align-items: center; gap: 14px;
  background: #0a1e3d; color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 12px 18px; max-width: 420px;
  box-shadow: 0 10px 30px rgba(6, 14, 30, .38);
}
.altovo-badge .ab-logo { height: 22px; width: auto; flex: none; display: block; }
.altovo-badge .ab-rule { width: 1px; align-self: stretch; background: rgba(255,255,255,.18); }
.altovo-badge b { display: block; font-size: .78rem; line-height: 1.35; }
.altovo-badge span { display: block; font-size: .67rem; line-height: 1.4; opacity: .7; }

@media (max-width: 720px) {
  .altovo-badge { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (max-width: 1080px) {
  .book-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .cabin-grid, .bundle-grid, .pkg-grid { grid-template-columns: 1fr; }
  .rx-nav { display: none; }
}
