/* ═══════════════════════════════════════════════════════════════════════════
   Live Operations — Compass Virtual Airlines
   user/themes/compass-virtual/css/live-operations.css

   ⚑ REPLACES THE IFRAME VERSION. This page used to embed phpVMS's own live map
   and hide its chrome with a CSS clip that pulled the frame up 96px inside a
   shorter container. It worked, and it was the last denylisted tag on the site.
   Now the map is ours: MapLibre, the same as the route map and both fleet maps,
   reading ACARS positions directly from /livemap.php.
   ═══════════════════════════════════════════════════════════════════════════ */

.lm-banner{background:linear-gradient(135deg,#1a3a4a 0%,#4a7a8a 100%);padding:24px 28px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;border-radius:8px;margin-bottom:18px;color:white;position:relative;overflow:hidden}
.lm-banner::before{content:"";position:absolute;top:-30px;right:-30px;width:200px;height:200px;background:radial-gradient(circle,rgba(200,150,46,0.18) 0%,transparent 70%)}
.lm-banner h1{font-size:24px;font-weight:500;margin:0 0 4px;color:white;position:relative}
.lm-banner p{font-size:13px;color:rgba(255,255,255,0.7);margin:0;position:relative;max-width:680px;line-height:1.5}

.lm-wrap{position:relative;border-radius:8px;overflow:hidden;border:1px solid #dde0e4;background:#0a1520;box-shadow:0 2px 8px rgba(0,0,0,0.04)}
#lm-map{height:640px;width:100%}
@media (max-width:768px){#lm-map{height:460px}}

/* ⚑ The division key doubles as a filter. Each entry is a button, and its dot
   carries the same colour the aircraft and its track are drawn in — so the key
   is not a legend sitting beside the map, it is the control for it. */
.lm-key{display:flex;gap:6px;flex-wrap:wrap;padding:10px 14px;background:#f7fafc;border-bottom:1px solid #e8f0f3}
.lm-key button{display:flex;align-items:center;gap:6px;padding:4px 11px;border:1px solid #dde0e4;border-radius:14px;background:white;font-size:12px;color:#8a9099;cursor:pointer;font-family:inherit;transition:all .15s}
.lm-key button:hover{border-color:#6d97a8}
.lm-key button.on{color:#333;border-color:#6d97a8;background:#e8f0f3}
.lm-key .dot{width:9px;height:9px;border-radius:50%;flex:none}
.lm-key .n{font-size:11px;color:#b0b6bc}

.lm-footer{padding:14px 18px;background:#f7fafc;border-top:1px solid #e8f0f3;font-size:12px;color:#8a9099;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px}
.lm-footer a{color:#4a7a8a;text-decoration:none;font-weight:500}
.lm-footer a:hover{color:#c8962e}
.lm-footer .left{display:flex;align-items:center;gap:8px}
.lm-pulse{display:inline-block;width:8px;height:8px;background:#2a7a4a;border-radius:50%;animation:lm-pulse-anim 2s infinite}
@keyframes lm-pulse-anim{0%,100%{opacity:1}50%{opacity:0.4}}

.lm-empty{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:400;color:#8b9aa5;font-size:13px;text-align:center;pointer-events:none;line-height:1.6}
.lm-nowebgl{padding:40px 28px;text-align:center;color:#8a9099;font-size:13px;line-height:1.7}
.lm-nowebgl strong{color:#4a7a8a}

.lm-notes{margin-top:18px;padding:14px 18px;background:#fff8ee;border:0.5px solid rgba(200,150,46,0.4);border-radius:6px;font-size:12px;color:#7a5010;line-height:1.6}
.lm-notes strong{color:#c8962e}

/* dark popups on a dark map */
.maplibregl-popup-content{background:#141416;color:#e8e6e1;border-radius:4px;border:1px solid #2a2a2e;margin:0;padding:10px 13px;font-size:12px;box-shadow:0 2px 14px rgba(0,0,0,.5)}
.maplibregl-popup-tip{border-top-color:#141416!important;border-bottom-color:#141416!important}
.maplibregl-popup-close-button{color:#8b8880;font-size:16px;padding:0 5px}
.maplibregl-popup-close-button:hover{background:none;color:#c8962e}
.maplibregl-ctrl-attrib{background:rgba(10,21,32,.75)!important;font-size:10px}
.maplibregl-ctrl-attrib a{color:#9ab8c4!important}
.maplibregl-ctrl-group{background:#141416!important;border:1px solid #2a2a2e!important}
.maplibregl-ctrl-group button .maplibregl-ctrl-icon{filter:invert(62%) sepia(14%) saturate(600%) hue-rotate(155deg)}
#lm-tip{position:absolute;z-index:700;pointer-events:none;display:none;background:#141416;border:1px solid #2a2a2e;color:#e8e6e1;font-size:11px;padding:3px 8px;border-radius:3px;white-space:nowrap;transform:translate(-50%,-165%)}

/* ── Popup text, in three levels ─────────────────────────────────────────────
   ⚑ The first version used one muted grey for everything below the flight
   number, which on near-black is legible in isolation and muddy in practice —
   the route, the airports and the speed all sank into the background. Now:
   the division colour for the flight number, near-white for anything you would
   read off the map, and the grey kept for labels only. */
.lmp-h{font-size:14px;font-weight:600;letter-spacing:.5px}
.lmp-reg{font-family:ui-monospace,monospace;color:#d9c99a;font-size:12px;margin-bottom:2px}
.lmp-dim{color:#9a958c;font-size:11px}
.lmp-div{color:#7f8c95;font-size:10px;letter-spacing:.6px;text-transform:uppercase;margin-top:3px}
.lmp-route{color:#f0ede7;font-size:13px;margin-top:7px;letter-spacing:.4px}
.lmp-crew{color:#d9c99a;font-size:11px;margin-top:4px}
.lmp-detail{color:#e8e6e1;font-size:12px;margin-top:5px;font-family:ui-monospace,monospace}
.lmp-live{color:#84b06f;font-size:10px;margin-top:5px}

/* ── Flights table ───────────────────────────────────────────────────────────
   ⚑ NOT A DECORATION UNDER THE MAP. On a phone, and for anyone who would
   rather read than hunt for a small aeroplane on a dark ocean, this is the
   primary view. It obeys the same division filters as the map, and a row
   click flies the map to that aircraft. */
.lm-table-wrap{margin-top:18px;border:1px solid #dde0e4;border-radius:8px;overflow:hidden;background:white}
.lm-table{width:100%;border-collapse:collapse;font-size:13px}
.lm-table th{background:#e8f0f3;color:#4a7a8a;font-size:11px;font-weight:500;text-transform:uppercase;letter-spacing:.5px;padding:9px 12px;text-align:left;border-bottom:1px solid #c8d8e0;white-space:nowrap}
.lm-table th.num,.lm-table td.num{text-align:right;font-family:ui-monospace,monospace;white-space:nowrap}
.lm-table td{padding:9px 12px;border-bottom:.5px solid #f0f2f3;vertical-align:middle}
.lm-table tr:last-child td{border-bottom:none}
.lm-table tbody tr{cursor:pointer;transition:background .12s}
.lm-table tbody tr:hover{background:#f7fafc}
.lm-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px;vertical-align:middle;flex:none}
.lm-fl{font-weight:600;color:#333;font-family:ui-monospace,monospace}
.lm-reg{display:block;font-family:ui-monospace,monospace;color:#4a7a8a;font-weight:600;font-size:12px}
.lm-type{display:block;color:#8a9099;font-size:11px}
.lm-rt{display:block;font-family:ui-monospace,monospace;color:#333;font-size:12px}
.lm-rtn{display:block;color:#8a9099;font-size:11px}
.lm-table-empty{padding:22px;text-align:center;color:#8a9099;font-size:13px}
@media (max-width:640px){
  /* The airport names and the type are the first things to go on a phone —
     the codes carry the information. */
  .lm-rtn,.lm-type{display:none}
  .lm-table th,.lm-table td{padding:8px 9px;font-size:12px}
}
