/**
 * OCC Wall — 75" TV kiosk layout.
 *
 * Designed against a 1920x1080 viewport at 10 ft viewing distance
 * (i.e. every number needs to read at 30+px). Dark palette so the
 * screen doesn't blast light into the OCC room.
 *
 * body.kiosk-mode hides the sidebar + chrome so the wall shows ONLY
 * this surface. Add ?page=occ-wall or navigate via nav entry.
 */

/* Hide nav chrome when kiosk mode is on */
body.kiosk-mode .sidebar,
body.kiosk-mode .nav-sidebar,
body.kiosk-mode .tm-banner,
body.kiosk-mode .mobile-menu-btn {
  display: none !important;
}
body.kiosk-mode .app-layout,
body.kiosk-mode .main-content {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100vw !important;
}

.occ-wall {
  position: fixed;
  inset: 0;
  background: #05060a;
  color: #e2e8f0;
  display: grid;
  grid-template-rows: 112px 140px 1fr 132px;
  gap: 12px;
  padding: 12px 16px 16px;
  font-family: var(--font-body, system-ui);
}

/* ── Header ──────────────────────────────────────────────────────── */
.occ-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  padding: 0 8px;
  column-gap: 24px;
}
.occ-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 600;
}
.occ-title-brand {
  font-family: var(--font-mono);
  font-size: 36px;
  letter-spacing: 0.04em;
  color: #00d4ff;
}
.occ-title-app {
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* Clock group — three local times for an international operation.
   KEF is the hero (airline home), flanked by US East + CET for the
   two busiest onward regions. 1-second ticker in initOccWallPage. */
.occ-clock-group {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 36px;
}
.occ-clock-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.occ-clock-zone {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}
.occ-clock {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.occ-clock-cell.hero .occ-clock-zone {
  color: #94a3b8;
}
.occ-clock-cell.hero .occ-clock {
  font-size: 72px;
  color: #fef3c7;
  text-shadow: 0 0 24px rgba(254, 243, 199, 0.22);
}

.occ-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.occ-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 12px #10b981;
  animation: occPulse 2s infinite;
}
@keyframes occPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
.occ-status-text {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Exit kiosk — must be visible, but not shouty. ESC also works. */
.occ-exit {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.occ-exit:hover,
.occ-exit:focus-visible {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
  outline: none;
}
.occ-exit-kbd {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  letter-spacing: 0.06em;
}

/* ── KPI strip — 6 huge numbers ──────────────────────────────────── */
.occ-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.occ-kpi {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.occ-kpi.hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  border-color: rgba(16, 185, 129, 0.4);
}
.occ-kpi-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}
.occ-kpi-value {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1;
  margin-top: 4px;
}
.occ-kpi-value.warn { color: #f59e0b; }
.occ-kpi-value.pos  { color: #10b981; }
.occ-kpi-value.live { color: #22d3ee; }
.occ-kpi.hero .occ-kpi-value {
  font-size: 64px;
  text-shadow: 0 0 18px rgba(16, 185, 129, 0.3);
}

/* ── Main region: map + right-side info column ──────────────────── */
.occ-main {
  display: grid;
  grid-template-columns: 2.4fr 1fr;
  gap: 12px;
  min-height: 0;
}
.occ-right {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  min-width: 0;
}

.occ-map-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: #05060a;
}
.occ-map-label {
  position: absolute;
  top: 14px; left: 18px;
  z-index: 500;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #00d4ff;
  padding: 4px 10px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 4px;
}
.occ-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Map divIcon styling — bigger than regular Ops Room for TV reading */
.occ-map-hub {
  position: relative;
  pointer-events: none;
}
.occ-map-hub-ring {
  position: absolute;
  left: -14px; top: -14px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.18);
  border: 3px solid rgba(0, 212, 255, 0.9);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.6);
}
.occ-map-hub-label {
  position: absolute;
  left: 22px; top: -14px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #e6fbff;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.55);
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.occ-map-flight {
  position: relative;
  pointer-events: none;
}
.occ-map-flight-pulse {
  position: absolute;
  left: -9px; top: -9px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c, #f59e0b);
  box-shadow: 0 0 18px var(--c, #f59e0b);
  animation: occFlightPulse 1.8s infinite;
}
@keyframes occFlightPulse {
  0%   { transform: scale(0.9); opacity: 1; }
  60%  { transform: scale(1.4); opacity: 0.3; }
  100% { transform: scale(0.9); opacity: 1; }
}
.occ-map-flight-label {
  position: absolute;
  left: 22px; top: -10px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  white-space: nowrap;
}

/* ── Right-column panels: network banks + activity stream ──────── */
.occ-banks,
.occ-stream {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.occ-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.occ-panel-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #00d4ff;
  white-space: nowrap;
}
.occ-panel-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kept for backwards-compat with the old class; the inner list is
   flexible so banks can overflow gracefully on busy days. */
.occ-banks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.occ-bank {
  padding: 8px 10px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 3px solid #64748b;
}
.occ-bank-clear { border-left-color: #10b981; }
.occ-bank-warm  { border-left-color: #f59e0b; }
.occ-bank-hot   { border-left-color: #ef4444; }

.occ-bank-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 6px;
  align-items: baseline;
  font-family: var(--font-mono);
}
.occ-bank-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  align-self: center;
}
.occ-bank-clear .occ-bank-dot { background: #10b981; }
.occ-bank-warm  .occ-bank-dot { background: #f59e0b; }
.occ-bank-hot   .occ-bank-dot { background: #ef4444; }
.occ-bank-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.occ-bank-window {
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.06em;
}
.occ-bank-count {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}
.occ-bank-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2px 0 4px;
}
.occ-bank-flight {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 3px 0;
  font-family: var(--font-mono);
  font-size: 13px;
}
.occ-bank-flight-num {
  font-weight: 700;
  color: #00d4ff;
  font-size: 14px;
}
.occ-bank-flight-route {
  color: #94a3b8;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occ-bank-flight-meta {
  display: flex;
  gap: 4px;
  font-size: 12px;
  color: #cbd5e1;
}
.occ-bank-flight-meta .warn { color: #f59e0b; font-weight: 700; }
.occ-bank-sep { color: #475569; }
.occ-bank-empty {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #10b981;
  letter-spacing: 0.08em;
  padding: 2px 0 0 14px;
  text-transform: uppercase;
}
.occ-bank-more {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.06em;
  padding-top: 3px;
  padding-left: 14px;
}
.occ-stream-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.occ-stream-empty {
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px;
  text-align: center;
}
.occ-stream-row {
  display: grid;
  grid-template-columns: 44px 120px 1fr;
  gap: 12px;
  align-items: baseline;
  font-family: var(--font-mono);
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 15px;
}
.occ-stream-when {
  color: #64748b;
  font-size: 13px;
  text-align: right;
}
.occ-stream-type {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 12px;
}
.occ-stream-subject {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.occ-stream-flight {
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.occ-stream-detail {
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.occ-stream-compose .occ-stream-type { color: #00d4ff; }
.occ-stream-commit  .occ-stream-type { color: #a78bfa; }
.occ-stream-execute .occ-stream-type { color: #22d3ee; }
.occ-stream-close   .occ-stream-type { color: #10b981; }
.occ-stream-learn   .occ-stream-type { color: #f59e0b; }
.occ-stream-default .occ-stream-type { color: #94a3b8; }

/* ── Attention ticker (bottom) ──────────────────────────────────── */
.occ-ticker {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
}
.occ-ticker-label {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #f59e0b;
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
  white-space: nowrap;
}
/* Flex rather than repeat(3, 1fr): 1 card takes a comfortable width,
   2-3 cards share evenly, 4+ wrap. No empty dead columns when the
   queue has only one flight to worry about. */
.occ-ticker-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: stretch;
}
.occ-ticker-card {
  flex: 1 1 420px;
  max-width: 640px;
  min-width: 0;
}
.occ-ticker-empty {
  font-family: var(--font-mono);
  font-size: 20px;
  color: #10b981;
  letter-spacing: 0.06em;
  text-align: center;
}
.occ-ticker-card {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
}
.occ-ticker-flight {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: #fef3c7;
  line-height: 1.1;
}
.occ-ticker-route {
  font-family: var(--font-mono);
  font-size: 16px;
  color: #cbd5e1;
  margin-top: 2px;
}
.occ-ticker-meta {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #94a3b8;
}
.occ-ticker-meta .warn { color: #f59e0b; font-weight: 700; }
.occ-ticker-sep { color: #475569; }
