/* ============================================================
   SILKROAD — Itinerary Viewer  (5 Formats · 6 Themes)
   ============================================================ */

/* ---- Theme variables ---- */
.iv-wrap { --t-pri:#1e1b4b; --t-acc:#4338ca; --t-lit:#ede9fe; }
.iv-wrap[data-theme="gold"]    { --t-pri:#1a1a1a; --t-acc:#d4af37; --t-lit:#fffce8; }
.iv-wrap[data-theme="nature"]  { --t-pri:#1b4332; --t-acc:#2d6a4f; --t-lit:#d8f3dc; }
.iv-wrap[data-theme="ocean"]   { --t-pri:#0c4a6e; --t-acc:#0369a1; --t-lit:#e0f2fe; }
.iv-wrap[data-theme="crimson"] { --t-pri:#7f1d1d; --t-acc:#dc2626; --t-lit:#fee2e2; }
.iv-wrap[data-theme="minimal"] { --t-pri:#1f2937; --t-acc:#4b5563; --t-lit:#f3f4f6; }

/* ---- Format visibility ---- */
.iv-fmt          { display:none; }
.iv-fmt.iv-active{ display:block; }

/* ---- Action bar ---- */
.iv-bar {
  background: linear-gradient(135deg, var(--t-pri), var(--t-acc));
  border-radius: 10px 10px 0 0;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.iv-bar-title { color:#fff; font-weight:700; font-size:.9rem; display:flex; align-items:center; gap:8px; }
.iv-bar-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

.iv-btn-group { display:flex; background:rgba(255,255,255,.15); border-radius:8px; overflow:hidden; }
.iv-fmt-btn {
  background:none; border:none; color:rgba(255,255,255,.65);
  padding:6px 11px; cursor:pointer; font-size:.88rem; transition:all .15s;
  border-right:1px solid rgba(255,255,255,.1);
}
.iv-fmt-btn:last-child { border-right:none; }
.iv-fmt-btn:hover  { background:rgba(255,255,255,.15); color:#fff; }
.iv-fmt-btn.active { background:rgba(255,255,255,.28); color:#fff; }

.iv-theme-group { display:flex; gap:5px; }
.iv-theme-btn { width:22px; height:22px; border-radius:50%; border:2px solid rgba(255,255,255,.3); cursor:pointer; transition:all .15s; flex-shrink:0; }
.iv-theme-btn.active, .iv-theme-btn:hover { border-color:#fff; transform:scale(1.18); }

.iv-print-btn {
  background:rgba(255,255,255,.18); border:1.5px solid rgba(255,255,255,.4);
  color:#fff; border-radius:6px; padding:5px 12px; font-size:.8rem; font-weight:700;
  cursor:pointer; transition:all .15s; display:flex; align-items:center; gap:5px;
}
.iv-print-btn:hover { background:rgba(255,255,255,.3); }

/* ---- Section heading ---- */
.iv-sec-head {
  color:#fff; font-size:.8rem; font-weight:800; letter-spacing:.12em;
  text-transform:uppercase; background:linear-gradient(135deg, var(--t-pri), var(--t-acc));
  padding:7px 16px; display:flex; align-items:center; gap:8px;
}

/* ---- Shared elements ---- */
/* Travel notes — readonly textarea, font metrics match admin's form-control-sm exactly */
textarea.iv-notes {
  display: block;
  width: 100%;
  resize: none;
  border: none;
  border-left: 3px solid var(--t-acc);
  outline: none;
  background: transparent;
  overflow: hidden;          /* height auto-grows via JS; no scrollbar */

  /* ── Match admin textarea font exactly ── */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", "Noto Sans", "Liberation Sans",
               Arial, sans-serif;   /* Bootstrap 5 system-font stack, same as admin */
  font-size: .875rem;               /* Bootstrap form-control-sm value */
  line-height: 1.5;                 /* Bootstrap form-control default line-height */

  color: #4b5563;
  padding: 2px 4px 2px 10px;
  margin-top: 6px;
  white-space: pre-wrap;     /* preserve spaces, indentation & blank lines */
  word-break: break-word;
  overflow-wrap: break-word;
  cursor: default;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  min-height: 1.5em;
}
.iv-hotel-tag {
  display:inline-flex; align-items:center; gap:5px;
  background:#fff; border:1.5px solid #e0e7ff; border-radius:6px;
  padding:3px 10px; font-size:.82rem; font-weight:600; color:var(--t-pri);
}
/* Old badge style — still used by other formats (Cards, Timeline, etc.) */
.iv-meal { display:inline-flex; align-items:center; gap:4px; border-radius:4px; padding:2px 8px; font-size:.78rem; font-weight:700; }
.iv-meal i { font-size:.75rem; }
.iv-meal-b { background:#fffbeb; border:1px solid #fde68a; color:#78350f; }
.iv-meal-l { background:#f0fdf4; border:1px solid #86efac; color:#14532d; }
.iv-meal-d { background:#f5f3ff; border:1px solid #c4b5fd; color:#2e1065; }
.iv-meal-row { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }

/* New meal card style — Format 0 footer strip */
.iv-meal-block { align-items: flex-start !important; flex-direction: column; gap: 4px !important; }
.iv-meal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.iv-meal-card {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 8px;
  border-radius: 8px;
  min-width: 120px;
}
.iv-meal-card .bi {
  font-size: 1rem;
  flex-shrink: 0;
}
.iv-meal-card-inner {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.iv-meal-card-lbl {
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.iv-meal-card-where {
  font-size: .67rem;
  font-weight: 500;
  opacity: .78;
  white-space: nowrap;
}
/* Reuse colour classes from .iv-meal-b/l/d */
.iv-meal-card.iv-meal-b { background:#fffbeb; border:1px solid #fde68a; color:#78350f; }
.iv-meal-card.iv-meal-l { background:#f0fdf4; border:1px solid #86efac; color:#14532d; }
.iv-meal-card.iv-meal-d { background:#f5f3ff; border:1px solid #c4b5fd; color:#2e1065; }

/* ---- Format 0: Accommodation + Meals footer strip ---- */
.iv-row-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1.5px dashed #e0e7ff;
}
.iv-row-footer-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.iv-row-footer-lbl {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--t-acc);
  margin-right: 3px;
  white-space: nowrap;
}
.iv-row-footer-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   FORMAT 1 — CLASSIC TABLE
   ============================================================ */
.iv-table {
  width:100%; border-collapse:collapse; font-size:.88rem;
  border:1.5px solid #e5e7eb; border-top:none;
}
.iv-table thead th {
  background:var(--t-pri); color:#fff; padding:8px 12px;
  font-size:.75rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  border:1px solid rgba(255,255,255,.12); text-align:center;
}
.iv-table td { border:1px solid #e5e7eb; padding:10px 12px; vertical-align:top; }
.iv-table tbody tr:hover .iv-td-main,
.iv-table tbody tr:hover .iv-td-hotel { background:#f8f9ff; }
.iv-td-day {
  background:linear-gradient(180deg, var(--t-lit), rgba(255,255,255,.6));
  text-align:center; width:110px;
}
.iv-day-lbl  { font-size:.6rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:var(--t-acc); }
.iv-day-num  { font-size:28pt; font-weight:900; line-height:1; color:var(--t-pri); }
.iv-day-city {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--t-acc);
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  padding: 2px 7px 2px 5px;
  margin-top: 5px;
}
.iv-day-city .bi { font-size:.62rem; }
/* ── Transport mode connector + badge ── */
.iv-day-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 2px 0;
}
/* dashed connector lines above & below badge */
.iv-day-mode::before,
.iv-day-mode::after {
  content: '';
  width: 0;
  height: 7px;
  border-left: 1.5px dashed #cbd5e1;
  display: block;
}

.iv-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.05rem;
  color: #fff;
  cursor: default;
  position: relative;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s;
  animation: iv-badge-float 2.8s ease-in-out infinite;
}
.iv-mode-badge:hover {
  transform: scale(1.35) !important;
  animation-play-state: paused;
  z-index: 2;
}
/* tooltip label on hover */
.iv-mode-badge::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(.85);
  background: rgba(15,23,42,.88);
  color: #fff;
  font-size: .62rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s, transform .18s;
}
.iv-mode-badge:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.iv-mode-text {
  font-size: .6rem;
  font-weight: 600;
  color: #9ca3af;
  margin-top: 2px;
  text-align: center;
}

/* Float animation */
@keyframes iv-badge-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* ── Per-mode colours ── */
/* ✈ Airplane — sky blue */
.iv-mb-air {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 4px 12px rgba(2,132,199,.45);
  animation-duration: 2s;
}
.iv-mb-air:hover { box-shadow: 0 6px 22px rgba(2,132,199,.7); }

/* 🚗 Car — amber/orange */
.iv-mb-car {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 4px 12px rgba(234,88,12,.45);
  animation-duration: 3s;
}
.iv-mb-car:hover { box-shadow: 0 6px 22px rgba(234,88,12,.7); }

/* 🚌 Bus — emerald green */
.iv-mb-bus {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(5,150,105,.45);
  animation-duration: 2.6s;
}
.iv-mb-bus:hover { box-shadow: 0 6px 22px rgba(5,150,105,.7); }

/* 🚆 Train — violet */
.iv-mb-train {
  background: linear-gradient(135deg, #c084fc 0%, #9333ea 100%);
  box-shadow: 0 4px 12px rgba(147,51,234,.45);
  animation-duration: 1.6s;  /* faster — rhythmic like a train */
}
.iv-mb-train:hover { box-shadow: 0 6px 22px rgba(147,51,234,.7); }

/* 🚢 Ship — teal/cyan */
.iv-mb-ship {
  background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
  box-shadow: 0 4px 12px rgba(8,145,178,.45);
  animation-duration: 3.5s;  /* slow roll like a ship */
}
.iv-mb-ship:hover { box-shadow: 0 6px 22px rgba(8,145,178,.7); }

/* 🚶 Walk — sunny yellow */
.iv-mb-walk {
  background: linear-gradient(135deg, #fde047 0%, #ca8a04 100%);
  box-shadow: 0 4px 12px rgba(202,138,4,.45);
  animation-duration: 1.2s;  /* brisk walking pace */
}
.iv-mb-walk:hover { box-shadow: 0 6px 22px rgba(202,138,4,.7); }

/* 🚲 Bike — rose/red */
.iv-mb-bike {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(220,38,38,.45);
  animation-duration: 2.2s;
}
.iv-mb-bike:hover { box-shadow: 0 6px 22px rgba(220,38,38,.7); }

/* Other/fallback — slate */
.iv-mb-other {
  background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
  box-shadow: 0 4px 12px rgba(71,85,105,.35);
}
.iv-day-ttl  { font-size:.95rem; font-weight:700; color:var(--t-pri); margin-bottom:5px; }
.iv-td-hotel { min-width:160px; }

/* ============================================================
   FORMAT 2 — DAY CARDS
   ============================================================ */
.iv-cards-wrap {
  display:flex; flex-direction:column; gap:12px;
  padding:16px; background:#fafbff;
  border:1.5px solid #e5e7eb; border-top:none;
}
.iv-dc-card { border:1.5px solid #e5e7eb; border-radius:10px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.iv-dc-head {
  background:linear-gradient(135deg, var(--t-pri), var(--t-acc));
  color:#fff; padding:10px 16px;
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
}
.iv-dc-badge {
  background:rgba(255,255,255,.22); border-radius:20px;
  padding:3px 12px; font-size:.73rem; font-weight:800;
  letter-spacing:.06em; text-transform:uppercase; flex-shrink:0;
}
.iv-dc-title { font-size:.95rem; font-weight:700; flex:1; }
.iv-dc-body  { background:#fff; padding:12px 16px; }
.iv-dc-foot  {
  background:var(--t-lit); border-top:1.5px solid #e5e7eb;
  padding:8px 16px; display:flex; flex-wrap:wrap; gap:5px 10px; align-items:center;
}

/* ============================================================
   FORMAT 3 — VERTICAL TIMELINE
   ============================================================ */
.iv-tl-outer {
  background:#fafbff; border:1.5px solid #e5e7eb; border-top:none;
  padding:20px 16px 16px;
}
.iv-tl-wrap { position:relative; padding-left:66px; }
.iv-tl-wrap::before {
  content:''; position:absolute; left:25px; top:22px; bottom:22px;
  width:3px; background:linear-gradient(180deg, var(--t-acc), var(--t-pri)); border-radius:3px;
}
.iv-tl-item  { position:relative; margin-bottom:20px; }
.iv-tl-dot   { position:absolute; left:-52px; top:0; display:flex; flex-direction:column; align-items:center; }
.iv-tl-circle {
  width:38px; height:38px; border-radius:50%; background:var(--t-acc); color:#fff;
  font-size:13pt; font-weight:900; display:flex; align-items:center; justify-content:center;
  border:3px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.2);
}
.iv-tl-content { background:#fff; border:1.5px solid #e5e7eb; border-radius:10px; overflow:hidden; box-shadow:0 1px 6px rgba(0,0,0,.06); }
.iv-tl-head {
  background:var(--t-lit); padding:8px 14px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  border-bottom:1px solid #e5e7eb;
}
.iv-tl-dayname { font-size:.72rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--t-pri); }
.iv-tl-title   { font-size:.92rem; font-weight:700; color:#111827; flex:1; }
.iv-tl-body    { padding:10px 14px; }
.iv-tl-foot    {
  background:var(--t-lit); padding:7px 14px; border-top:1.5px solid #e5e7eb;
  display:flex; flex-wrap:wrap; gap:5px 10px; align-items:center;
}

/* ============================================================
   FORMAT 4 — COMPACT TABLE
   ============================================================ */
.iv-cp-table {
  width:100%; border-collapse:collapse; font-size:.86rem;
  border:1.5px solid #e5e7eb; border-top:none;
}
.iv-cp-table thead th {
  background:var(--t-pri); color:#fff; padding:7px 10px;
  font-size:.73rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  border:1px solid rgba(255,255,255,.1);
}
.iv-cp-table tbody td { border:1px solid #e5e7eb; padding:7px 10px; vertical-align:top; }
.iv-cp-table tbody tr:nth-child(even) td { background:#fafafa; }
.iv-cp-day { text-align:center; width:42px; background:var(--t-lit) !important; border-right:2px solid var(--t-acc) !important; }
.iv-cp-daynum { font-size:20pt; font-weight:900; line-height:1; color:var(--t-pri); }
.iv-cp-title { font-weight:700; color:#111827; }
.iv-cp-snip  { font-size:.77rem; color:#6b7280; margin-top:2px; line-height:1.4; }
.iv-cp-hotel { font-size:.82rem; font-weight:600; color:var(--t-pri); }
.iv-cp-meals { text-align:center; width:58px; }
.iv-cp-meals i { font-size:.9rem; margin:1px; }

/* ============================================================
   FORMAT 5 — MAGAZINE / JOURNAL
   ============================================================ */
.iv-mg-wrap {
  background:#fff; border:1.5px solid #e5e7eb; border-top:none;
  padding:22px 22px 6px;
}
.iv-mg-day {
  display:flex; gap:22px; margin-bottom:28px;
  padding-bottom:24px; border-bottom:1px solid #e5e7eb;
}
.iv-mg-day:last-child { border-bottom:none; }
.iv-mg-side { width:84px; flex-shrink:0; text-align:center; padding-top:2px; }
.iv-mg-bignum {
  font-size:48pt; font-weight:900; line-height:1;
  color:var(--t-lit); letter-spacing:-.02em;
}
.iv-mg-word {
  font-size:.62rem; font-weight:800; letter-spacing:.15em;
  text-transform:uppercase; color:var(--t-acc); margin-top:-6px;
}
.iv-mg-content { flex:1; min-width:0; }
.iv-mg-title-bar {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding-bottom:8px; border-bottom:2px solid var(--t-lit); margin-bottom:10px;
}
.iv-mg-title { font-size:1.05rem; font-weight:800; color:var(--t-pri); }
.iv-mg-notes { border-left-color:var(--t-acc); font-style:italic; }
.iv-mg-foot {
  background:var(--t-lit); border-radius:8px;
  padding:7px 12px; display:flex; flex-wrap:wrap; gap:5px 10px;
  align-items:center; margin-top:10px;
}

/* ---- Print ---- */
@media print {
  .iv-bar { display:none !important; }
  .iv-fmt { display:none !important; }
  .iv-fmt.iv-active { display:block !important; }
}

/* ---- Responsive ---- */
@media (max-width:600px) {
  .iv-bar { flex-direction:column; align-items:flex-start; }
  .iv-mg-day { flex-direction:column; gap:8px; }
  .iv-mg-side { width:100%; display:flex; align-items:center; gap:10px; }
  .iv-mg-bignum { font-size:30pt; }
  .iv-tl-wrap { padding-left:54px; }
  .iv-tl-dot  { left:-42px; }
  .iv-tl-circle { width:32px; height:32px; font-size:11pt; }
}

/* ============================================================
   DAY MAP PANEL
   ============================================================ */
.iv-map-btn {
  background:none; border:1px solid var(--t-acc); color:var(--t-acc);
  border-radius:5px; padding:2px 9px; font-size:.72rem; cursor:pointer;
  display:inline-flex; align-items:center; gap:3px; transition:all .15s;
  white-space:nowrap; line-height:1.6;
}
.iv-map-btn:hover { background:var(--t-acc); color:#fff; }

.iv-map-panel { border:1.5px solid #e5e7eb; border-top:none; background:#fff; }
.iv-map-hdr {
  background:#f8f9ff; border-bottom:1px solid #e5e7eb;
  padding:8px 14px; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.iv-map-hdr-title { font-weight:700; font-size:.85rem; color:#1f2937; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.iv-map-route { display:flex; gap:6px; flex-shrink:0; }
.iv-map-route span {
  background:#f3f4f6; border-radius:20px; padding:2px 10px;
  font-size:.73rem; color:#374151; display:inline-flex; align-items:center; gap:4px;
}
.iv-map-close {
  background:none; border:none; color:#9ca3af; cursor:pointer;
  font-size:1.1rem; padding:1px 7px; border-radius:4px; line-height:1; flex-shrink:0;
}
.iv-map-close:hover { background:#fee2e2; color:#dc2626; }
#ivLeaflet { height:300px; }
.iv-map-loading {
  height:300px; display:flex; align-items:center; justify-content:center;
  color:#6b7280; font-size:.88rem; gap:8px;
}
.iv-pin-label {
  background:var(--t-acc,#4338ca); color:#fff;
  border-radius:50% 50% 50% 0; width:32px; height:32px;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:13px; border:2px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,.3); transform:rotate(-45deg);
}
.iv-pin-label span { transform:rotate(45deg); }
.iv-pin-prev {
  background:#6b7280; color:#fff; border-radius:50%;
  width:26px; height:26px;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:11px; border:2px solid #fff;
  box-shadow:0 2px 4px rgba(0,0,0,.2);
}

/* ============================================================
   ANIMATED ROUTE MAP
   ============================================================ */

/* Route button in action bar */
.iv-route-btn {
  background:rgba(255,255,255,.18); border:1.5px solid rgba(255,255,255,.4);
  color:#fff; border-radius:6px; padding:5px 12px; font-size:.8rem; font-weight:700;
  cursor:pointer; transition:all .15s; display:flex; align-items:center; gap:5px;
}
.iv-route-btn:hover { background:rgba(255,255,255,.3); }
.iv-route-btn.active { background:rgba(220,38,38,.45); border-color:rgba(220,38,38,.7); }

/* Panel wrapper */
.iv-rmap-wrap { border:1.5px solid #e5e7eb; border-top:none; }

/* Control bar */
.iv-rmap-ctrl {
  background:linear-gradient(135deg,#1e1b4b,#3730a3);
  padding:10px 14px; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.iv-rmap-ctrl-title {
  color:#fff; font-weight:700; font-size:.85rem; flex:1; min-width:0;
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
}
.iv-rmap-day-badge {
  background:rgba(255,255,255,.2); color:#fff; border-radius:20px;
  padding:2px 10px; font-size:.72rem; font-weight:700; transition:background .4s;
}
.iv-rmap-btn-play {
  background:rgba(255,255,255,.2); border:1.5px solid rgba(255,255,255,.4);
  color:#fff; border-radius:6px; padding:4px 13px; font-size:.8rem; font-weight:700;
  cursor:pointer; display:flex; align-items:center; gap:5px; transition:all .15s; white-space:nowrap;
}
.iv-rmap-btn-play:hover { background:rgba(255,255,255,.35); }
.iv-rmap-btn-sm {
  background:rgba(255,255,255,.15); border:1.5px solid rgba(255,255,255,.28);
  color:rgba(255,255,255,.85); border-radius:5px; padding:3px 9px; font-size:.75rem;
  cursor:pointer; transition:all .15s; white-space:nowrap;
}
.iv-rmap-btn-sm:hover { background:rgba(255,255,255,.28); color:#fff; }
.iv-rmap-close-btn {
  background:rgba(255,255,255,.1); border:none; color:rgba(255,255,255,.65);
  border-radius:4px; padding:2px 7px; font-size:1.15rem; cursor:pointer; line-height:1;
}
.iv-rmap-close-btn:hover { background:rgba(220,38,38,.5); color:#fff; }

/* Progress bar */
.iv-rmap-progress-bar { height:3px; background:#e0e7ff; overflow:hidden; }
.iv-rmap-progress-bar div {
  height:100%; background:linear-gradient(90deg,#4338ca,#818cf8);
  transition:width .12s linear; border-radius:0 3px 3px 0;
}

/* Map container */
#ivRouteMap { height:440px; background:#f0f4ff; }

/* Waypoint pins (teardrop) */
.iv-rpin {
  width:36px; height:44px;
  background:#d1d5db; border-radius:50% 50% 50% 0; transform:rotate(-45deg);
  display:flex; align-items:center; justify-content:center;
  border:2.5px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.22);
  transition:background .35s, box-shadow .35s; cursor:pointer;
}
.iv-rpin span {
  transform:rotate(45deg); font-weight:800; font-size:12px; color:#fff; line-height:1;
}
.iv-rpin--active {
  background:#4338ca !important;
  box-shadow:0 4px 18px rgba(67,56,202,.55) !important;
}
@keyframes rpin-arrive {
  0%   { transform:rotate(-45deg) scale(1); }
  30%  { transform:rotate(-45deg) scale(1.5); }
  60%  { transform:rotate(-45deg) scale(.9); }
  80%  { transform:rotate(-45deg) scale(1.08); }
  100% { transform:rotate(-45deg) scale(1); }
}
.iv-rpin--arrive { animation:rpin-arrive .95s cubic-bezier(.36,.07,.19,.97) both; }

/* Moving plane */
.iv-rplane {
  width:38px; height:38px;
  background:linear-gradient(135deg,#dc2626,#f87171);
  border-radius:50%; border:3px solid #fff;
  box-shadow:0 0 0 3px rgba(220,38,38,.3), 0 3px 14px rgba(220,38,38,.55);
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:1.05rem;
  transition:transform .06s linear;
}
@keyframes rplane-pulse {
  0%,100% { box-shadow:0 0 0 3px rgba(220,38,38,.3),0 3px 14px rgba(220,38,38,.55); }
  50%     { box-shadow:0 0 0 8px rgba(220,38,38,.12),0 4px 22px rgba(220,38,38,.75); }
}
.iv-rplane { animation:rplane-pulse 1.7s ease-in-out infinite; }

/* Day popup card */
.iv-rmap-popup { text-align:center; padding:2px 0; }
.iv-rmap-popup-day {
  font-size:.67rem; font-weight:800; letter-spacing:.1em;
  text-transform:uppercase; color:#6b7280; margin-bottom:3px;
}
.iv-rmap-popup-title { font-weight:700; font-size:.82rem; color:#1f2937; }

/* Loading dots */
@media (max-width:600px) {
  #ivRouteMap { height:320px; }
  .iv-rmap-ctrl { gap:7px; }
}
