/* =========================================================
   ITINERARY RAIL — Travel Advisors hero
   Figma: Web Template Library, node 5989:13346 ("Itinerary graphic")
   Pairs with itinerary.js. Markup: .itin card > ol.itin-body[data-itinerary] > li.itin-stop
   ========================================================= */

.itin-wrap {
  /* tokens are scoped here so nothing leaks into the rest of the site */
  --itin-page: #0B0B0C;
  --itin-text-strong: #EFEDE9;
  --itin-text: #C6C3BD;
  --itin-text-muted: #8E8B85;
  --itin-hairline: rgba(255, 255, 255, 0.09);
  --itin-hairline-strong: rgba(255, 255, 255, 0.14);
  --itin-gold: #C2A15C;
  --itin-mint: #00C7BE;          /* IOS/Palette/Mint */
  --itin-success: #38B76C;       /* Core/Success 500 */
  --itin-neon-50: #FBFEE9;       /* Accents/Neon 50 */
  --itin-neon-status: #F1FCBB;
  /* animation color: swap here for a design-system yellow */
  --itin-lit: #F6CB4F;
  --itin-lit-rgb: 246, 203, 79;

  width: 517px;
  max-width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--itin-text);
  -webkit-font-smoothing: antialiased;
}
.itin-wrap *, .itin-wrap *::before, .itin-wrap *::after { box-sizing: border-box; }

.itin {
  border: 1px solid var(--itin-hairline-strong);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.95);
  background: rgba(11, 11, 12, 0.35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ---------- Header ---------- */
.itin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--itin-hairline);
}
.itin-title {
  font-size: 12px; line-height: 19.8px; font-weight: 600;
  letter-spacing: 1.92px; text-transform: uppercase; color: var(--itin-text);
}
.itin-where {
  font-size: 12px; line-height: 19.8px; font-weight: 400;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--itin-mint); white-space: nowrap;
}

/* ---------- Stops ---------- */
.itin-body {
  --itin-time-col: 64px;
  --itin-rail-col: 20px;
  --itin-col-gap: 14px;
  --itin-pad-x: 24px;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 24px var(--itin-pad-x) 16px;
}
.itin-stop {
  display: grid;
  grid-template-columns: var(--itin-time-col) var(--itin-rail-col) minmax(0, 1fr);
  column-gap: var(--itin-col-gap);
  align-items: start;
  padding: 12px 0;
  margin: 0;
}
.itin-time {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; line-height: 21.45px; letter-spacing: 0.78px; font-weight: 600;
  color: var(--itin-text); font-variant-numeric: tabular-nums;
}
.itin-time s { font-weight: 500; color: var(--itin-text-muted); }
.itin-time .upd { color: var(--itin-success); }
.itin-label { display: flex; flex-direction: column; gap: 3.25px; min-width: 0; }
.itin-place { font-size: 15px; line-height: 21.75px; letter-spacing: 0.16px; color: var(--itin-text); }
.itin-note {
  font-size: 12px; line-height: 17.4px; letter-spacing: 1.44px;
  text-transform: uppercase; color: var(--itin-text-muted);
}
/* data-savoya marks a leg Savoya holds */
.itin-stop[data-savoya] .itin-place { color: var(--itin-text-strong); }
.itin-stop[data-savoya] .itin-note { color: var(--itin-gold); }

/* ---------- Rail ---------- */
/* The rail cell only holds the dot. The line is one shared track for the whole list,
   injected by itinerary.js, so any number of stops works. */
.itin-rail { position: relative; height: 21.45px; }
.itin-dot {
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--itin-page);
  border: 1px solid var(--itin-hairline-strong);
  z-index: 2;
  transition:
    background-color 520ms cubic-bezier(.22, .61, .36, 1),
    border-color 520ms cubic-bezier(.22, .61, .36, 1),
    box-shadow 900ms cubic-bezier(.22, .61, .36, 1),
    transform 620ms cubic-bezier(.34, 1.4, .64, 1);
}
.itin-stop.is-lit .itin-dot {
  background: var(--itin-lit);
  border-color: var(--itin-lit);
  transform: scale(1.3);
  box-shadow:
    0 0 0 4px rgba(var(--itin-lit-rgb), 0.12),
    0 0 14px 2px rgba(var(--itin-lit-rgb), 0.38);
}

/* single sonar ring, added by itinerary.js on arrival and removed when it ends */
.itin-ring {
  position: absolute; left: 50%; top: 50%;
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  border: 1px solid rgba(var(--itin-lit-rgb), 0.9);
  pointer-events: none;
  z-index: 1;
  animation: itin-sonar 1700ms cubic-bezier(.16, .7, .3, 1) forwards;
}
@keyframes itin-sonar {
  0%   { transform: scale(1);   opacity: 0.75; }
  100% { transform: scale(5.2); opacity: 0; border-width: 0.5px; }
}
.itin-body.is-paused .itin-ring { animation-play-state: paused; }

.itin-track,
.itin-progress {
  position: absolute;
  left: calc(var(--itin-pad-x) + var(--itin-time-col) + var(--itin-col-gap) + var(--itin-rail-col) / 2);
  width: 1px;
  margin-left: -0.5px;
  top: 0;
  height: 0;
  pointer-events: none;
  list-style: none;
}
.itin-track { background: var(--itin-hairline); z-index: 0; }
.itin-progress {
  z-index: 1;
  background: linear-gradient(to bottom, rgba(var(--itin-lit-rgb), 0.85), var(--itin-lit));
  box-shadow: 0 0 6px rgba(var(--itin-lit-rgb), 0.35);
}
.itin-progress::after { /* soft glow at the tip while the line is moving */
  content: "";
  position: absolute; left: 50%; bottom: -3px;
  width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--itin-lit-rgb), 0.9), rgba(var(--itin-lit-rgb), 0) 70%);
  opacity: var(--itin-tip, 0);
  transition: opacity 300ms ease;
}

/* ---------- Footer + caption ---------- */
.itin-foot {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 24px 18px;
  background: rgba(194, 161, 92, 0.04);
  border-top: 1px solid var(--itin-hairline);
  font-size: 13px; line-height: 19.5px; letter-spacing: 0.16px; color: var(--itin-text);
}
.itin-foot .pulse {
  flex: none; width: 7px; height: 7px; margin-top: 6px;
  border-radius: 50%; background: var(--itin-neon-50);
}
.itin-foot b, .itin-foot strong { font-weight: 600; color: var(--itin-neon-status); }
.itin-caption {
  margin: 0; text-align: right;
  font-size: 13px; line-height: 21.45px; letter-spacing: 0.16px; color: var(--itin-text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .itin-wrap { width: 100%; max-width: 560px; }
}
@media (max-width: 479px) {
  .itin-body { --itin-time-col: 48px; --itin-col-gap: 10px; --itin-pad-x: 16px; }
  .itin-head, .itin-foot { padding-left: 16px; padding-right: 16px; }
  .itin-place { font-size: 14px; }
}

/* ---------- Reduced motion: finished state, no rings ---------- */
@media (prefers-reduced-motion: reduce) {
  .itin-dot, .itin-progress::after { transition: none; }
  .itin-ring { display: none; }
}
