/* JAX Route Map — map + public page styles.
   Change the colors here to match the site. */
:root {
  --rm-navy: #0b2545;
  --rm-route: #1565c0;
  --rm-seasonal: #2e9d55;
  --rm-upcoming: #f2b705;      /* coming-soon routes */
  --rm-upcoming-ink: #5a4300;  /* text on the yellow badge */
  --rm-hub: #e8772e;
  --rm-preview: #d81b60;
  --rm-ocean: #e9f1f8;
  --rm-land: #fbfcfd;
  --rm-land-usa: #ffffff;
  --rm-border: #c3d1df;
  --rm-text: #1d2733;
  --rm-muted: #5b6b7c;
  --rm-line: #dbe4ee;
  --rm-radius: 10px;
  --rm-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- map ---------- */
.rm { position: relative; font-family: var(--rm-font); color: var(--rm-text); border-radius: var(--rm-radius); overflow: hidden; background: var(--rm-ocean); line-height: 1.35; }
.rm-svg { display: block; width: 100%; height: auto; cursor: grab; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; }
.rm-svg:active { cursor: grabbing; }
.rm-ocean { fill: var(--rm-ocean); }
.rm-graticule { fill: none; stroke: #d6e3ef; stroke-width: .5; vector-effect: non-scaling-stroke; }
.rm-country { fill: var(--rm-land); stroke: var(--rm-border); }
.rm-country.rm-usa { fill: var(--rm-land-usa); }
.rm-state { fill: none; stroke: var(--rm-border); stroke-opacity: .85; }

.rm-arc { fill: none; stroke: var(--rm-route); stroke-opacity: .42; stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linecap: round; pointer-events: none; transition: stroke-opacity .15s, stroke-width .15s; }
.rm-arc.is-seasonal { stroke: var(--rm-seasonal); stroke-dasharray: 4 3; }
.rm-arc.is-upcoming { stroke: var(--rm-upcoming); stroke-opacity: .95; stroke-width: 2; stroke-dasharray: 7 5; animation: rm-march 1.4s linear infinite; }
@keyframes rm-march { to { stroke-dashoffset: -24; } }
.rm-arc.is-hover, .rm-arc.is-active { stroke-opacity: 1; stroke-width: 2.6; }
.rm-arc.is-preview { stroke: var(--rm-preview); stroke-opacity: .95; stroke-width: 2.4; stroke-dasharray: 6 4; }
.rm-has-selection .rm-arc:not(.is-active):not(.is-hover):not(.is-preview) { stroke-opacity: .1; }

.rm-dot { fill: var(--rm-route); stroke: #fff; cursor: pointer; transition: fill .15s; outline: none; }
.rm-dot.is-seasonal { fill: var(--rm-seasonal); }
.rm-dot.is-upcoming { fill: var(--rm-upcoming); stroke: var(--rm-upcoming-ink); }
.rm-dot.is-hover, .rm-dot:focus-visible { fill: var(--rm-navy); }
.rm-dot.is-active { fill: var(--rm-hub); }
.rm-dot.is-preview { fill: var(--rm-preview); cursor: default; }
.rm-has-selection .rm-dot:not(.is-active):not(.is-hover):not(.is-preview) { opacity: .45; }

.rm-hubdot { fill: var(--rm-hub); stroke: #fff; }
.rm-hubring { fill: var(--rm-hub); fill-opacity: .16; stroke: var(--rm-hub); stroke-opacity: .5; pointer-events: none; }
.rm-hublabel { font-weight: 800; fill: var(--rm-navy); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }

.rm-label { display: none; font-weight: 700; fill: var(--rm-navy); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.rm-zoomed .rm-label, .rm-label.is-hover, .rm-label.is-active, .rm-label.is-preview { display: block; }

.rm-controls { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; }
.rm-controls button { width: 32px; height: 32px; border: 1px solid var(--rm-line); background: #fff; color: var(--rm-navy); border-radius: 7px; font: 600 18px/1 var(--rm-font); cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(11, 37, 69, .08); }
.rm-controls button:hover { background: #f2f6fa; }
.rm-controls button:focus-visible { outline: 2px solid var(--rm-route); outline-offset: 1px; }

.rm-tip { position: absolute; pointer-events: none; background: var(--rm-navy); color: #fff; padding: 7px 10px; border-radius: 7px; font-size: 13px; max-width: 240px; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; z-index: 3; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.rm-tip.is-on { opacity: 1; transform: none; }
.rm-tip strong { display: block; font-size: 14px; }
.rm-tip span:not(.rm-badge) { display: block; opacity: .85; margin-top: 2px; }

.rm-badge { display: inline-block; background: var(--rm-seasonal); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 99px; vertical-align: 1px; }
.rm-badge-soon { background: var(--rm-upcoming); color: var(--rm-upcoming-ink); }
.rm-badge + .rm-badge { margin-left: 4px; }

.rm-card { position: absolute; left: 12px; bottom: 12px; width: min(300px, calc(100% - 24px)); background: #fff; border-radius: var(--rm-radius); box-shadow: 0 8px 28px rgba(11, 37, 69, .2); padding: 14px 16px 12px; z-index: 4; animation: rm-in .18s ease-out; }
.rm-card[hidden] { display: none; }
@keyframes rm-in { from { opacity: 0; transform: translateY(6px); } }
.rm-card-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--rm-muted); cursor: pointer; padding: 4px; }
.rm-card-kicker { font-size: 12px; color: var(--rm-muted); padding-right: 22px; }
.rm-card-title { margin: 3px 0 0; font-size: 19px; color: var(--rm-navy); }
.rm-card-sub { margin: 2px 0 0; font-size: 13px; color: var(--rm-muted); }
.rm-card-starts { margin: 8px 0 0; padding: 6px 9px; border-radius: 7px; background: #fff6d6; border-left: 3px solid var(--rm-upcoming); font-size: 13px; font-weight: 650; color: var(--rm-upcoming-ink); }
.rm-card-label { margin-top: 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rm-muted); }
.rm-card-airlines { list-style: none; margin: 4px 0 0; padding: 0; }
.rm-card-airlines li { padding: 5px 0; border-top: 1px solid var(--rm-line); font-size: 14px; }
.rm-card-airlines li:first-child { border-top: 0; }
.rm-card-airlines a { color: var(--rm-route); font-weight: 600; text-decoration: none; }
.rm-card-airlines a:hover { text-decoration: underline; }
.rm-card-airlines a::after { content: " \2197"; font-size: 11px; }

.rm-loading { position: absolute; left: 12px; top: 12px; font-size: 12px; color: var(--rm-muted); }
.rm-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11, 37, 69, .45); color: #fff; font-size: 17px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; }
.rm-hint.is-on { opacity: 1; }

@media (max-width: 600px) {
  /* On phones the card sits under the map instead of covering it. */
  .rm-card { position: relative; left: auto; bottom: auto; width: auto; border-radius: 0; box-shadow: none; border-top: 1px solid var(--rm-line); padding: 12px 14px 10px; }
  .rm-controls button { width: 30px; height: 30px; }
}

/* ---------- public page ---------- */
.rmp { font-family: var(--rm-font); color: var(--rm-text); margin: 0; background: #fff; }
.rmp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; max-width: 1280px; margin: 0 auto; padding: 14px; }
.rmp-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; }
.rmp-head h1 { margin: 0; font-size: 24px; color: var(--rm-navy); }
.rmp-legend { display: flex; gap: 16px; font-size: 13px; color: var(--rm-muted); flex-wrap: wrap; }
.rmp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rmp-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--rm-line); }
.rmp-legend .lg-hub { background: var(--rm-hub); }
.rmp-legend .lg-year { background: var(--rm-route); }
.rmp-legend .lg-seasonal { background: var(--rm-seasonal); }
.rmp-legend .lg-upcoming { width: 22px; height: 0; border: 0; border-radius: 0; box-shadow: none; border-top: 3px dashed var(--rm-upcoming); }

.rmp-side { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--rm-line); border-radius: var(--rm-radius); overflow: hidden; }
.rmp-tools { padding: 12px; border-bottom: 1px solid var(--rm-line); display: grid; gap: 8px; background: #f7fafc; }
.rmp-count { font-size: 14px; font-weight: 700; color: var(--rm-navy); }
.rmp-tools input, .rmp-tools select { width: 100%; box-sizing: border-box; font: 14px var(--rm-font); padding: 8px 10px; border: 1px solid var(--rm-border); border-radius: 7px; background: #fff; color: var(--rm-text); }
.rmp-tools input:focus, .rmp-tools select:focus { outline: 2px solid var(--rm-route); outline-offset: -1px; border-color: transparent; }
.rmp-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; max-height: 520px; }
.rmp-list li + li { border-top: 1px solid var(--rm-line); }
.rmp-list button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 9px 12px; cursor: pointer; }
.rmp-list button:hover { background: #f2f6fa; }
.rmp-list button:focus-visible { outline: 2px solid var(--rm-route); outline-offset: -2px; }
.rmp-list .is-active button { background: #fff3ea; box-shadow: inset 3px 0 0 var(--rm-hub); }
.rmp-city { display: block; font-weight: 650; font-size: 14.5px; }
.rmp-air { display: block; font-size: 12.5px; color: var(--rm-muted); margin-top: 1px; }
.rmp-list .rm-badge { margin-left: 4px; }
.rmp-empty { padding: 16px 12px; color: var(--rm-muted); font-size: 14px; }

body.is-embed .rmp-head h1 { font-size: 20px; }
body.is-compact .rmp-wrap { grid-template-columns: 1fr; }
body.is-compact .rmp-side { display: none; }

@media (max-width: 860px) {
  .rmp-wrap { grid-template-columns: 1fr; padding: 10px; gap: 12px; }
  .rmp-list { max-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  .rm-arc.is-upcoming { animation: none; }
}
