/* The flight planner (/flights; templates/flights.html, static/flights.js).  Its own file for the
   reason worldmap.css is one: only this page loads it. */

.fl-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 1rem;
}
.fl-field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 14rem; min-width: 0; }
.fl-field label { color: var(--text-dim); font-size: 0.85rem; }
.fl-field input, .fl-field select { width: 100%; }
.fl-choose .warning-note { margin: 0.75rem 0 0; }

.fl-route { margin-top: 1rem; }
.fl-route h2 .dim { font-size: 0.8em; font-weight: 500; }

.fl-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0.25rem 0 0.9rem;
}
.fl-summary div { display: flex; flex-direction: column; gap: 0.1rem; }
.fl-summary dt { color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.fl-summary dd { margin: 0; font-size: 1.05rem; font-weight: 600; }
.fl-summary dd .badge, .fl-summary dd .fl-note { font-weight: 400; }

.fl-note { color: var(--text-faint); font-size: 0.85rem; }
.fl-estimate { color: var(--warn); }

/* The stops, with the legs between them as a line down the left. */
.fl-stops { list-style: none; margin: 0 0 1rem; padding: 0 0 0 0.4rem; }
.fl-stops li { position: relative; padding-left: 1.4rem; }
.fl-stop { padding: 0.15rem 0; }
.fl-stop::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-raised);
  box-shadow: 0 0 0 1px var(--accent-dim);
}
.fl-leg { padding: 0.35rem 0; color: var(--text-dim); font-size: 0.9rem; }
.fl-leg::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: -0.2rem;
  bottom: -0.2rem;
  border-left: 2px dashed var(--accent-dim);
}
.fl-stop-name { font-weight: 600; }
.fl-stop-npc, .fl-stop-zone { color: var(--text-dim); font-size: 0.88rem; }
.fl-stop-npc::before, .fl-stop-zone::before { content: "\00b7"; margin: 0 0.4rem; color: var(--text-faint); }

.fl-sea { fill: #10141c; }
.fl-label {
  color: #f4f1e6;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 0 3px #000, 0 0 6px #000;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fl-measured { margin-top: 1rem; }
.fl-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0 0 0.75rem; }
.fl-filter select { width: auto; max-width: 16rem; }
.fl-table th a { color: inherit; text-decoration: none; white-space: nowrap; }
.fl-table th a:hover, .fl-table th a:focus-visible { text-decoration: underline; }
.fl-table .num { text-align: right; }
.fl-method { margin: 1rem 0 0; }
.fl-pin { cursor: pointer; }
.fl-card strong { display: block; margin-bottom: 0.2rem; }

/* The map: the page's main view (templates/flights.html, static/flights.js). */
.fl-world { margin-top: 1rem; }
.fl-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.6rem; }
.fl-tabs a {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
}
.fl-tabs a:hover, .fl-tabs a:focus-visible { color: var(--text); border-color: var(--accent-dim); }
.fl-tabs a[aria-current="page"] { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.fl-hint { margin: 0 0 0.6rem; color: var(--text-dim); font-size: 0.92rem; }
/* Without script: the art at the page's width.  With it: a map of a fixed height. */
.fl-world-map {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #0b0c11;
  overflow: hidden;
}
.fl-world-art { display: block; width: 100%; height: auto; }
.fl-world-map.is-live { height: min(70vh, 40rem); min-height: 20rem; }
.fl-world-map.leaflet-container { font: inherit; }
.fl-world-map .leaflet-control-zoom a { background: var(--bg-raised); color: var(--text); border-color: var(--border-strong); }
.fl-pin.is-dim { cursor: default; filter: grayscale(1); }
.fl-pin.is-from, .fl-pin.is-to { filter: drop-shadow(0 0 3px #6fd18c) drop-shadow(0 0 6px #6fd18c); }
.fl-pin.is-dest { filter: drop-shadow(0 0 3px #f2d27a); }
.fl-hop {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #6fd18c;
  color: #0b0c11;
  font-size: 0.72rem;
  font-weight: 700;
  border: 2px solid #0b0c11;
}
.fl-points { margin-top: 0.75rem; }
.fl-points summary { cursor: pointer; color: var(--text-dim); }
.fl-point-list { columns: 16rem; column-gap: 1.5rem; list-style: none; margin: 0.5rem 0 0; padding: 0; }
.fl-point-list li { break-inside: avoid; padding: 0.12rem 0; }
.fl-point-list li.is-from a, .fl-point-list li.is-to a { font-weight: 700; }
.fl-show-route { margin-top: 0.25rem; }
@media (max-width: 600px) {
  .fl-world-map.is-live { height: 62vh; min-height: 18rem; }
  .fl-tabs a { padding: 0.35rem 0.6rem; }
}
