/**
 * gca2 Live Flights (gca2/livemap/guest.blade.php + live-map.js, 2026-10-30), in the Fleet Map's look
 * (fleet-admin.css .gfmap-*). Loaded after landing.css, whose --gl-* colours it uses (guests and members alike).
 */

.glm .gl-wrap { gap: 18px; }
.glm-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 32px; }
.glm-head .gl-title { font-size: clamp(40px, 4.4vw, 64px); margin-top: 8px; }
.glm-stats { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 28px; }
.glm-stat { display: flex; flex-direction: column; gap: 2px; }
.glm-stat b { font-family: var(--gl-mono); font-size: 28px; font-weight: 600; line-height: 1; color: var(--gl-text); }
.glm-stat-wide b { font-size: 18px; line-height: 28px; white-space: nowrap; }
.glm-stat small { font-family: var(--gl-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gl-soft); }
.glm-stats { padding: 10px 16px; border: 1px solid var(--gl-line); border-radius: 12px; background: rgba(7, 10, 43, 0.72); }
.glm-pulse { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(92, 242, 154, 0.35); border-radius: 999px; font-family: var(--gl-mono); font-size: 11px; color: var(--gl-green-soft, #8FE8B5); white-space: nowrap; }
.glm-pulse i { width: 8px; height: 8px; border-radius: 50%; background: var(--gl-green, #5CF29A); box-shadow: 0 0 0 0 rgba(92, 242, 154, 0.6); animation: glm-pulse 2s ease-out infinite; }
.glm-pulse.is-bad { border-color: rgba(255, 107, 107, 0.45); color: #FF8A8A; }
.glm-pulse.is-bad i { background: #FF6B6B; animation: none; }
@keyframes glm-pulse { 0% { box-shadow: 0 0 0 0 rgba(92, 242, 154, 0.6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(92, 242, 154, 0); } }

.glm-card { border-color: rgba(242, 194, 48, 0.4); background: #0C1042; }
.glm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.glm-mapwrap { position: relative; border-right: 1px solid var(--gl-line); min-width: 0; }
.glm-map { height: clamp(460px, calc(100vh - 300px), 820px); background: #0C1042; }
.glm-map.leaflet-container { font-family: var(--gl-sans); }
.glm-tiles { filter: invert(1) hue-rotate(195deg) saturate(0.55) brightness(0.8) contrast(0.95); }
.glm .leaflet-bar { border: 1px solid var(--gl-edge); box-shadow: none; }
.glm .leaflet-bar a { background: #0C1042; color: var(--gl-text); border-bottom-color: var(--gl-line); }
.glm .leaflet-bar a:hover { background: #1A2160; color: #FFFFFF; }
.glm .leaflet-control-attribution { background: rgba(7, 10, 43, 0.75); color: var(--gl-muted); }
.gca2-landing .glm .leaflet-control-attribution a { color: var(--gl-soft); }

/* map buttons, top right */
.glm-tools { position: absolute; top: 10px; right: 10px; z-index: 900; display: flex; gap: 6px; }
.glm-tool { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--gl-edge); border-radius: 8px; background: rgba(12, 16, 66, 0.9); color: var(--gl-soft); font-size: 12px; cursor: pointer; }
.glm-tool:hover { color: var(--gl-text); background: #1A2160; }
.glm-tool.is-on { border-color: rgba(242, 194, 48, 0.55); color: var(--gl-text); }
.glm-tool.is-on i { color: var(--gl-accent); }
.glm-tool[hidden] { display: none; }

/* planes and lines */
.glm-plane { background: none; border: 0; }
.glm-plane i { position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; font-size: 21px; color: var(--gl-accent); text-shadow: 0 0 3px #070A2B, 0 0 10px rgba(242, 194, 48, 0.45); transition: transform 0.6s; cursor: pointer; }
.glm-plane.is-ground i, .glm-plane.is-landed i { color: #A8AEDB; text-shadow: 0 0 3px #070A2B; font-size: 17px; }
.glm-plane.is-sel i { font-size: 27px; color: #FFE27A; text-shadow: 0 0 3px #070A2B, 0 0 16px rgba(242, 194, 48, 0.9); }
.glm-plane.is-dim { opacity: 0.55; }
.glm-tag { position: absolute; left: 34px; top: 7px; display: inline-flex; gap: 6px; padding: 2px 7px; border: 1px solid rgba(242, 194, 48, 0.4); border-radius: 5px; background: rgba(7, 10, 43, 0.85); color: var(--gl-soft); font: 500 11px/16px var(--gl-mono); white-space: nowrap; pointer-events: none; }
.glm-tag b { color: var(--gl-accent); font-weight: 600; }
.glm-flown { stroke: #F2C230; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.glm-flown.is-guess { stroke-dasharray: 2 6; opacity: 0.5; }
.glm-togo { stroke: #C9CEF0; stroke-width: 1.6; stroke-dasharray: 6 7; fill: none; opacity: 0.55; }
.glm-flown.is-sel { stroke-width: 3.5; opacity: 1; }
.glm-togo.is-sel { stroke: #FFFFFF; opacity: 0.85; stroke-width: 2; }
.glm-flown.is-dim, .glm-togo.is-dim { opacity: 0.2; }
.glm-recent { stroke: #4FC3F7; stroke-width: 1.6; fill: none; opacity: 0.4; }
.glm-recent.is-sel { stroke-width: 2.6; opacity: 0.95; }
.glm-port { stroke: #070A2B; stroke-width: 1.5; fill: #C9CEF0; fill-opacity: 1; }
.glm-port.is-dim { opacity: 0.35; }
.glm-port.is-here { fill: #3DDC97; }
.glm-port.is-recent { fill: #4FC3F7; }
.glm-tip { background: #0f1550; color: #E8EAFF; border: 1px solid #2a3290; border-radius: 6px; box-shadow: none; font-size: 12px; }
.glm-tip b { color: var(--gl-accent); font-family: var(--gl-mono); }
.glm-tip.leaflet-tooltip-top::before { border-top-color: #2a3290; }

/* phase pill */
.glm-phase { display: inline-block; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; font-family: var(--gl-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.glm-phase.is-cruise { color: #F2C230; }
.glm-phase.is-climb { color: #5CF29A; }
.glm-phase.is-descent { color: #4FC3F7; }
.glm-phase.is-ground, .glm-phase.is-landed { color: #A8AEDB; }

/* progress bar with the plane on it */
.glm-bar { position: relative; flex: 1; height: 4px; min-width: 40px; border-radius: 2px; background: rgba(201, 206, 240, 0.18); }
.glm-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: linear-gradient(90deg, rgba(242, 194, 48, 0.4), #F2C230); }
.glm-bar em { position: absolute; top: 50%; margin-left: -6px; transform: translateY(-50%); font-size: 11px; color: #FFE27A; text-shadow: 0 0 4px #070A2B; }

/* the chosen flight, over the bottom of the map */
.glm-detail { position: absolute; left: 12px; right: 12px; bottom: 68px; z-index: 900; display: grid; grid-template-columns: minmax(180px, 0.9fr) minmax(320px, 1.6fr) auto; align-items: center; gap: 12px 26px; padding: 14px 44px 14px 18px; border: 1px solid rgba(242, 194, 48, 0.4); border-radius: 12px; background: rgba(9, 12, 52, 0.94); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.glm-detail[hidden] { display: none; }
.glm-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--gl-muted); cursor: pointer; }
.glm-x:hover { background: rgba(255, 255, 255, 0.06); color: var(--gl-text); }
.glm-d-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.glm-d-id img { height: 34px; width: auto; max-width: 80px; object-fit: contain; }
.glm-d-id > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.glm-d-ident { font-family: var(--gl-mono); font-size: 20px; font-weight: 600; color: var(--gl-accent); }
.gca2-landing .glm-d-ident a { color: var(--gl-accent); text-decoration: none; }
.gca2-landing .glm-d-ident a:hover { text-decoration: underline; }
.glm-d-id small { flex-basis: 100%; font-size: 12px; color: var(--gl-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glm-d-route { display: flex; align-items: center; gap: 14px; min-width: 0; }
.glm-d-ap { display: flex; flex-direction: column; min-width: 0; }
.glm-d-ap b { font-family: var(--gl-mono); font-size: 18px; color: var(--gl-text); }
.gca2-landing .glm-d-ap a { color: inherit; text-decoration: none; }
.glm-d-ap small { font-size: 11px; color: var(--gl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.glm-d-ap.is-arr { text-align: right; }
.glm-d-ap.is-arr small { align-self: flex-end; }
.glm-d-prog { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 90px; text-align: center; }
.glm-d-prog .glm-bar { flex: none; }
.glm-d-prog small { font-family: var(--gl-mono); font-size: 11px; color: var(--gl-soft); white-space: nowrap; }
.glm-d-data { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 22px; margin: 0; }
.glm-d-data div { display: flex; flex-direction: column; gap: 1px; }
.glm-d-data dt { font-family: var(--gl-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gl-muted); font-weight: 500; }
.glm-d-data dd { margin: 0; font-family: var(--gl-mono); font-size: 14px; color: var(--gl-text); white-space: nowrap; }

.glm-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 18px; font-size: 12px; color: var(--gl-muted); border-top: 1px solid var(--gl-line); }
.glm-lg-plane { margin-right: 6px; color: var(--gl-accent); }
.glm-lg-line { display: inline-block; width: 22px; height: 0; margin-right: 6px; border-top: 2.5px solid #F2C230; vertical-align: 3px; }
.glm-lg-line.is-togo { border-top: 2px dashed #C9CEF0; }
.glm-lg-line.is-recent { border-top-color: #4FC3F7; }
.glm-hint { margin-left: auto; font-size: 11px; }

/* list beside the map */
.glm-side { display: flex; flex-direction: column; max-height: calc(clamp(460px, calc(100vh - 300px), 820px) + 41px); overflow-y: auto; }
.glm-side-head { position: sticky; top: 0; z-index: 1; display: flex; flex-direction: column; padding: 10px 16px 8px; background: #0f1550; border-bottom: 1px solid var(--gl-line); }
.glm-side-head b { font-family: var(--gl-cond); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gl-text); }
.glm-side-head small { font-size: 11px; color: var(--gl-muted); }
.glm-list { list-style: none; margin: 0; padding: 0; }
.glm-list li + li { border-top: 1px solid var(--gl-line-soft); }
.glm-list button { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 10px 16px; border: 0; background: none; color: var(--gl-text); text-align: left; cursor: pointer; }
.glm-list button:hover { background: rgba(255, 255, 255, 0.04); }
.glm-list li.is-sel button { background: rgba(242, 194, 48, 0.08); box-shadow: inset 3px 0 0 var(--gl-accent); }
.glm-l-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.glm-l-top small { font-size: 11px; color: var(--gl-muted); }
.glm-l-ident { font-family: var(--gl-mono); font-size: 14px; font-weight: 700; color: var(--gl-accent); }
.glm-l-route { display: flex; align-items: center; gap: 10px; font-family: var(--gl-mono); font-size: 13px; }
.glm-l-meta { font-family: var(--gl-mono); font-size: 12px; color: var(--gl-soft); }
.glm-l-meta b { color: var(--gl-text); font-weight: 600; }
.glm-list button > small { font-size: 11px; color: var(--gl-muted); }
.glm-rate { margin-left: 6px; padding: 0 5px; border-radius: 4px; background: rgba(201, 206, 240, 0.1); font-family: var(--gl-mono); color: var(--gl-soft); }
.glm-rate.is-soft { color: #8FE8B5; }
.glm-rate.is-hard { color: #FF8A8A; }
.glm-empty { padding: 14px 16px; font-size: 13px; color: var(--gl-muted); }
.glm-empty i { margin-right: 6px; color: var(--gl-accent); }

@media (prefers-reduced-motion: reduce) {
  .glm-pulse i { animation: none; }
  .glm-plane i { transition: none; }
}
@media (max-width: 1199.98px) {
  .glm-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .glm-d-data { grid-column: 1 / -1; grid-template-columns: repeat(6, auto); justify-content: space-between; }
}
@media (max-width: 991.98px) {
  .glm-grid { grid-template-columns: minmax(0, 1fr); }
  .glm-mapwrap { border-right: 0; }
  .glm-map { height: 62vh; min-height: 380px; }
  .glm-side { max-height: none; border-top: 1px solid var(--gl-line); }
  /* the detail bar goes under the map instead of over it */
  .glm-detail { position: static; margin: 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; grid-template-columns: minmax(0, 1fr); }
  .glm-d-data { grid-template-columns: repeat(3, auto); }
  .glm-hint { display: none; }
}
@media (max-width: 575.98px) {
  .gl-live.glm { padding-left: 16px; padding-right: 16px; }
  .glm-stats { gap: 10px 20px; }
  .glm-stat b { font-size: 22px; }
  .glm-tool span { display: none; }
  .glm-tag { display: none; }
  .glm-plane.is-sel .glm-tag { display: inline-flex; }
  .glm-d-ap small { max-width: 90px; }
}
