/* live-intel.css — Live Intelligence view. Scoped under .lx-* to avoid
   colliding with the console's existing HUD styles. */

.lx-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 190px);
  align-items: start;
}

@media (max-width: 1400px) {
  .lx-shell { grid-template-columns: 300px minmax(0, 1fr); }
  .lx-shell .lx-col-map { grid-column: 1 / -1; order: 2; }
  .lx-shell .lx-col-panel { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 900px) {
  .lx-shell { grid-template-columns: 1fr; }
}

.lx-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.lx-card {
  background: linear-gradient(160deg, rgba(12, 26, 38, 0.92), rgba(7, 16, 26, 0.96));
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.lx-card-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(160, 200, 220, 0.75);
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ---------- header strip ---------- */
.lx-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.06), rgba(0, 0, 0, 0.25));
  margin-bottom: 14px;
  font-size: 12px;
}
.lx-statusbar .lx-sb-label {
  color: rgba(150, 190, 210, 0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 10px;
  margin-right: 6px;
}
.lx-statusbar .lx-sb-value { color: #d7f6ff; font-variant-numeric: tabular-nums; }
.lx-statusbar .lx-sb-sep { width: 1px; height: 16px; background: rgba(0, 240, 255, 0.18); }
.lx-warn { color: #fbbf24 !important; }

/* ---------- source list ---------- */
.lx-src {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 7px;
  color: #dbeafe;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  font: inherit;
}
.lx-src:hover { border-color: rgba(0, 240, 255, 0.45); background: rgba(0, 240, 255, 0.07); transform: translateX(2px); }
.lx-src:focus-visible { outline: 2px solid #00f0ff; outline-offset: 2px; }
.lx-src-active { border-color: rgba(0, 240, 255, 0.7); background: rgba(0, 240, 255, 0.12); }

.lx-src-top { display: flex; align-items: center; gap: 8px; }
.lx-src-name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-tier {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 1px 5px; border-radius: 4px;
}
.lx-tier-1 { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.lx-tier-2 { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.lx-tier-3 { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }

.lx-src-badge { font-size: 10px; color: rgba(160, 190, 210, 0.6); white-space: nowrap; }
.lx-badge-ok { color: #34d399; }
.lx-badge-err { color: #f87171; }
.lx-src-meta { font-size: 10.5px; color: rgba(148, 180, 200, 0.65); margin-top: 3px; }

/* ---------- claims ---------- */
.lx-claim { border-left: 2px solid rgba(0, 240, 255, 0.35); padding-left: 10px; margin-bottom: 10px; }
.lx-claim-value { font-size: 20px; font-weight: 700; color: #eafcff; font-variant-numeric: tabular-nums; }
.lx-claim-unit { font-size: 12px; font-weight: 400; color: rgba(160, 200, 220, 0.8); }
.lx-claim-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 10.5px; margin-top: 3px; }

.lx-conf { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; padding: 1px 5px; border-radius: 3px; border: 1px solid; }
.lx-conf-high { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.1); }
.lx-conf-medium { color: #93c5fd; border-color: rgba(59, 130, 246, 0.5); background: rgba(59, 130, 246, 0.1); }
.lx-conf-low { color: #fcd34d; border-color: rgba(245, 158, 11, 0.5); background: rgba(245, 158, 11, 0.1); }
.lx-conf-unverified { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.1); }

.lx-claim-source { color: rgba(180, 215, 235, 0.85); text-decoration: none; border-bottom: 1px dotted rgba(180, 215, 235, 0.4); }
.lx-claim-source:hover { color: #00f0ff; }
.lx-claim-time { color: rgba(148, 180, 200, 0.7); font-variant-numeric: tabular-nums; }
.lx-stale { color: #fbbf24; font-weight: 600; }
.lx-claim-note { color: rgba(148, 180, 200, 0.55); }

.lx-prov { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
@media (max-width: 700px) { .lx-prov { grid-template-columns: 1fr; } }

/* ---------- panel ---------- */
.lx-panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.lx-panel-title { font-size: 15px; margin: 0; color: #eafcff; }
.lx-panel-state { font-size: 9px; letter-spacing: 0.1em; padding: 1px 6px; border-radius: 3px; }
.lx-ok { color: #34d399; background: rgba(16, 185, 129, 0.12); }
.lx-bad { color: #f87171; background: rgba(239, 68, 68, 0.12); }

.lx-items { display: flex; flex-direction: column; gap: 6px; max-height: 58vh; overflow-y: auto; padding-right: 4px; }
.lx-item { border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 8px 10px; background: rgba(255, 255, 255, 0.015); }
.lx-item-title { font-size: 12.5px; color: #cfe9f7; }
.lx-item-title a { color: #9adcff; text-decoration: none; }
.lx-item-title a:hover { text-decoration: underline; }
.lx-item-sum { font-size: 11px; color: rgba(160, 195, 215, 0.7); margin-top: 3px; line-height: 1.45; }
.lx-item-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10px; color: rgba(140, 175, 195, 0.6); margin-top: 4px; font-variant-numeric: tabular-nums; }
.lx-item-val { color: #7dd3fc; font-weight: 600; }

/* ---------- map ---------- */
.lx-map-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(0, 240, 255, 0.2); }
#lxMap { height: 62vh; min-height: 420px; width: 100%; background: #04101c; }
.lx-map-tools { position: absolute; left: 12px; top: 12px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; }
.lx-map-btn {
  font: inherit; font-size: 11px; cursor: pointer;
  background: rgba(4, 16, 28, 0.82); color: #bfe9ff;
  border: 1px solid rgba(0, 240, 255, 0.3); border-radius: 7px;
  padding: 5px 9px; backdrop-filter: blur(6px);
}
.lx-map-btn:hover { background: rgba(0, 240, 255, 0.18); color: #fff; }
.lx-map-btn:focus-visible { outline: 2px solid #00f0ff; outline-offset: 2px; }

.lx-map-notice {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5;
  display: none; padding: 8px 10px; border-radius: 8px; font-size: 11px;
  background: rgba(120, 53, 15, 0.92); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.5);
}
.lx-map-notice.lx-visible { display: block; }

.lx-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 10.5px; color: rgba(150, 185, 205, 0.75); padding: 8px 4px 0; }
.lx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* ---------- states ---------- */
.lx-loading, .lx-empty, .lx-error, .lx-error-sub { font-size: 12px; line-height: 1.55; padding: 10px 0; }
.lx-loading { color: rgba(150, 190, 210, 0.7); }
.lx-empty { color: rgba(170, 200, 215, 0.8); }
.lx-error { color: #fca5a5; }
.lx-error-sub { color: rgba(200, 160, 160, 0.75); font-size: 11px; }

/* MapLibre control restyle to match the HUD */
.lx-map-wrap .maplibregl-ctrl-group { background: rgba(4, 16, 28, 0.85); border: 1px solid rgba(0, 240, 255, 0.25); }
.lx-map-wrap .maplibregl-ctrl-group button + button { border-top: 1px solid rgba(0, 240, 255, 0.15); }
.lx-map-wrap .maplibregl-ctrl-group button span { filter: invert(0.85) hue-rotate(160deg); }
.lx-map-wrap .maplibregl-ctrl-scale { background: rgba(4, 16, 28, 0.7); color: #bfe9ff; border-color: rgba(0, 240, 255, 0.3); }
.lx-map-wrap .maplibregl-popup-content {
  background: rgba(6, 20, 32, 0.95); color: #d7f6ff;
  border: 1px solid rgba(0, 240, 255, 0.3); border-radius: 8px; font-size: 12px;
}
.lx-map-wrap .maplibregl-popup-tip { border-top-color: rgba(6, 20, 32, 0.95); }

/* ---------- per-view honesty strip ---------- */
.lx-asof {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  font-size: 10.5px; color: rgba(150, 185, 205, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.05);
  border-radius: 8px; padding: 5px 10px; margin-bottom: 10px;
}
.lx-asof strong { color: #cfe9f7; font-weight: 600; text-transform: capitalize; }
.lx-asof-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(245, 158, 11, 0.8); }
.lx-asof-stale {
  color: #fbbf24; font-weight: 700; letter-spacing: 0.04em;
  border: 1px solid rgba(245, 158, 11, 0.45); border-radius: 4px; padding: 0 5px;
}
