/* public/css/live-operations.css - the navy band and its cards: the homepage "Our SADC Network"
   section (#network-coverage, catalogue data), the website content pages and the staff-only Live
   Operations page (#live-operations, admin-portal/admin-live-operations.html). Only class- / id-
   scoped rules, so it never restyles the homepage. */
@import url('/css/yuniq-tokens.css'); /* every colour here is a token */
.live, .board, .status, .live-map { --ok: var(--yuniq-ok); --ok-bg: var(--yuniq-ok-bg); --warn: var(--yuniq-warn); --warn-bg: var(--yuniq-warn-bg); --bad: var(--yuniq-bad); --bad-bg: var(--yuniq-bad-bg); --line: var(--yuniq-border); --muted: var(--yuniq-text-muted); }
.state { color: var(--yuniq-text-muted); font-style: italic; padding: 1rem 0; }
.state.error { color: var(--yuniq-bad); font-style: normal; }
.updated { color: var(--yuniq-text-muted); font-size: 0.82rem; }
/* status (borders + live board) */
.status { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 50px; padding: 0.15rem 0.65rem; font-size: 0.8rem; font-weight: 700; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.normal { background: var(--ok-bg); color: var(--ok); } /* green = clear */
.status.busy { background: var(--warn-bg); color: var(--warn); }
.status.congested, .status.closed, .status.bad { background: var(--bad-bg); color: var(--bad); }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1.2rem; }
.toolbar select, .toolbar button { padding: 0.5rem 0.8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font: inherit; color: var(--primary-blue); }
.toolbar button[aria-pressed="true"] { background: var(--primary-blue); color: var(--white); }

/* live operations (homepage) */
.live { background: transparent; border-radius: var(--yuniq-radius); padding: 0.5rem 0; }
.live-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.live-stat { background: var(--yuniq-white); border-radius: var(--yuniq-radius); padding: 1rem 1.1rem; box-shadow: var(--yuniq-shadow-md); border: 1px solid var(--yuniq-border); }
/* Orange numbers on white: the accessible orange (#B45309, 5.0:1). */
.live-stat .n { font-size: 2.2rem; font-weight: 800; color: var(--yuniq-orange-text); line-height: 1.1; letter-spacing: -0.02em; }
.live-stat .l { color: var(--yuniq-navy); font-size: 0.95rem; font-weight: 700; margin-top: 0.15rem; }
.live-panel { background: var(--yuniq-white); border-radius: var(--yuniq-radius); padding: 1rem; box-shadow: var(--yuniq-shadow-md); }
.live-panel h3 { color: var(--yuniq-navy); }
.live-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.2rem; }
@media (max-width: 860px) { .live-grid { grid-template-columns: 1fr; } }
.live-map { width: 100%; height: auto; max-height: 560px; display: block; background: var(--yuniq-slate); border-radius: var(--yuniq-radius-img); border: 1px solid var(--yuniq-border); }
.board { list-style: none; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--yuniq-radius-img); }
.board li { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.board li:last-child { border-bottom: none; }
.board .sub { color: var(--muted); font-size: 0.78rem; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.3rem; vertical-align: middle; }


/* Homepage band: dark navy behind the Live Operations section so the stats pop. Full-bleed by
   paint only (box-shadow + clip-path) - the section keeps its width and place in the layout. */
#live-operations, #network-coverage { background: var(--yuniq-navy); box-shadow: 0 0 0 100vmax var(--yuniq-navy); clip-path: inset(0 -100vmax); }
#live-operations > h2, #live-operations > .section-subtitle, #network-coverage > h2, #network-coverage > .section-subtitle { color: var(--yuniq-white); }
#live-operations .state, #network-coverage .state { color: var(--yuniq-on-navy-muted); }
.live-panel a { color: var(--yuniq-navy); font-weight: 600; }
.live-panel a:hover { color: var(--yuniq-orange-text); }

/* Our SADC Network (homepage, catalogue data): crossing facts in the board, hidden until loaded. */
#network-coverage[hidden], #networkSubtitle[hidden] { display: none; }
.board .facts { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
.board .meta { color: var(--yuniq-navy); font-size: 0.78rem; font-weight: 600; text-align: right; white-space: nowrap; }
@media (max-width: 560px) {
  #network-coverage .board li { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  #network-coverage .board .meta { text-align: left; white-space: normal; }
}

/* The map's country caption - the same list as "Countries Connected" and "Where We Operate". */
.map-countries { margin: 0.6rem 0 0.2rem; font-size: 0.85rem; color: var(--yuniq-text-secondary); line-height: 1.5; }
.map-countries strong { color: var(--yuniq-navy); }

/* Homepage "Our SADC Network" Africa map (js/network-coverage.js africaMap): the network's countries
   in brand orange, the rest navy, names on the map (desktop and tablet). Phones: no labels and only
   the network's countries, zoomed to them (the script swaps the viewBox). */
.africa-map { max-height: 760px; background: var(--yuniq-slate); }
.africa-map .map-country { fill: var(--yuniq-navy); stroke: var(--yuniq-white); stroke-width: 0.8; stroke-linejoin: round; fill-rule: evenodd; }
.africa-map .map-country.on { fill: var(--yuniq-orange); }
.africa-map .map-country:hover { opacity: 0.9; }
.africa-map .map-corridor { fill: none; stroke: var(--yuniq-white); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-opacity: 0.95; }
.africa-map .map-post { fill: var(--yuniq-white); stroke: var(--yuniq-navy); stroke-width: 2; }
.africa-map .map-label { font-size: 17px; font-weight: 700; fill: var(--yuniq-navy); paint-order: stroke; stroke: var(--yuniq-white); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.africa-map .map-leader { fill: none; stroke: var(--yuniq-navy); stroke-width: 1.2; }
.africa-map .map-dot { fill: var(--yuniq-navy); stroke: var(--yuniq-white); stroke-width: 1; }
.legend .lg-on { background: var(--yuniq-orange); border-radius: 3px; }
.legend .lg-off { background: var(--yuniq-navy); border-radius: 3px; }
.legend .lg-corridor { background: var(--yuniq-white); border: 1px solid var(--yuniq-navy); height: 4px; width: 16px; border-radius: 2px; }
.legend .lg-post { background: var(--yuniq-white); border: 2px solid var(--yuniq-navy); border-radius: 2px; transform: rotate(45deg); }
@media (max-width: 640px) {
  .africa-map .map-labels, .africa-map .map-country:not(.on), .legend .lg-off-item { display: none; }
}

/* The homepage's network: the four counts only (owner 2026-11-13 - the map is on /corridors/); on phones
   they sit 2 x 2 instead of stacked. */
@media (max-width: 640px) { #networkCoverage .live-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
