/* ============================================
   TheBigBoard - Battlefield Page Styles
   Layered on top of shared/shell.css
   Dark intelligence UX, map-hero layout
   ============================================ */


/* ============================================
   HIDDEN BY DEFAULT — toggled visible by JS
   ============================================ */
#stale-banner,
#bf-arc-tooltip,
#bf-date-hud,
#map-error,
#bf-card-overlay,
#bf-panel-event,
#bf-c1-threat,
#bf-c1-sensor-section,
#bf-c1-history-section,
#bf-c1-related-section { display: none; }

/* ============================================
   LIVE INDICATOR (Supabase realtime status)
   ============================================ */
.bf-live-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(6, 6, 8, 0.85);
  border: 1px solid #1a1a2e;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #a1a1aa;
  pointer-events: none;
}
.bf-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52525b;
  transition: background 0.3s;
}
.bf-live-indicator.live .bf-live-dot { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.bf-live-indicator.live .bf-live-label { color: #22c55e; }
.bf-live-indicator.polling .bf-live-dot { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.bf-live-indicator.polling .bf-live-label { color: #f59e0b; }
.bf-live-indicator.offline .bf-live-dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.bf-live-indicator.offline .bf-live-label { color: #ef4444; }

/* ============================================
   CONTROL BAR
   ============================================ */

.bf-control-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background: #0d0d0d;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 8px 16px;
  gap: 8px;
  user-select: none;
  margin: 0 16px;
  border-radius: 0 0 8px 8px;
}

/* Legend dots */
.bf-cbar-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bf-cbar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  cursor: help;
}
.bf-cbar-sep {
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,0.15);
}

/* Arrow buttons */
.bf-cbar-arrow {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  color: #a1a1aa;
  font-size: 14px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  padding: 0;
  flex-shrink: 0;
}
.bf-cbar-arrow:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

/* Track styling now in slider-wrap section below */

/* Individual day bars */
.bf-cbar-bar {
  flex: 1;
  min-width: 4px;
  max-width: none;
  flex-shrink: 1;
  background: rgba(245,158,11,0.3);
  border-radius: 2px 2px 0 0;
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
}
.bf-cbar-bar:hover {
  background: rgba(245,158,11,0.6);
}
.bf-cbar-bar--selected {
  background: #f59e0b !important;
  box-shadow: 0 0 8px rgba(245,158,11,0.5);
}

/* TODAY button */
.bf-cbar-today {
  background: transparent;
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: 4px;
  color: #f59e0b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  flex-shrink: 0;
  font-family: 'Inter', system-ui, sans-serif;
  min-width: 140px;
  text-align: center;
}
.bf-cbar-today:hover {
  background: rgba(245,158,11,0.1);
  border-color: #f59e0b;
}

/* Date label */
.bf-cbar-label {
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: #71717a;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120px;
  text-align: right;
}

/* ON THIS DAY toggle */
.bf-cbar-dayonly {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  border: 1px solid #3f3f46;
  color: #71717a;
  text-transform: uppercase;
  transition: all 0.15s;
  white-space: nowrap;
}
.bf-cbar-dayonly:hover { border-color: #f59e0b; color: #f59e0b; }
.bf-cbar-dayonly--active { background: rgba(245,158,11,0.12); border-color: #f59e0b; color: #f59e0b; }

/* Layout helpers */
.bf-cbar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.bf-cbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Slider scrubber */
.bf-cbar-slider-wrap {
  flex: 1;
  position: relative;
  height: 44px;
  display: flex;
  align-items: flex-end;
}
.bf-cbar-slider-wrap .bf-cbar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
}
.bf-cbar-range {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 36px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.bf-cbar-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 3px;
  height: 44px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  cursor: ew-resize;
  margin-top: -8px;
}
.bf-cbar-range::-moz-range-thumb {
  width: 3px;
  height: 44px;
  background: #ffffff;
  border-radius: 2px;
  border: none;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  cursor: ew-resize;
}
.bf-cbar-range::-webkit-slider-runnable-track { background: transparent; }
.bf-cbar-range::-moz-range-track { background: transparent; }

/* Histogram drag hint */
.bf-cbar-hint {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #3f3f46;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
  text-transform: lowercase;
}

/* Mode pill: CUMULATIVE | DAILY */
.bf-cbar-mode-pill {
  display: flex;
  border: 1px solid #3f3f46;
  border-radius: 5px;
  overflow: hidden;
  width: fit-content;
}
.bf-cbar-mode-btn {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  background: transparent;
  border: none;
  color: #52525b;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.bf-cbar-mode-btn + .bf-cbar-mode-btn {
  border-left: 1px solid #3f3f46;
}
.bf-cbar-mode-btn--active {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}
.bf-cbar-mode-btn:hover:not(.bf-cbar-mode-btn--active) {
  color: #a1a1aa;
  background: rgba(255,255,255,0.04);
}

/* Actor legend chips */
.bf-legend-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  width: 22px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

@keyframes bf-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.65); }
}

/* Legacy scrubber classes - hidden (old DOM no longer created) */
.bf-scrubber { display: none !important; }
.bf-legend-bar { display: none !important; }

/* Scrubber sub-components (legacy compat + QA) */
.bf-scrubber-track-wrap {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
}
.bf-scrubber-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent-cyan, #22d3ee);
  border-radius: 3px;
}
.bf-scrubber-handle {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  margin-top: -7px;
  background: #fff;
  border-radius: 50%;
  cursor: ew-resize;
  box-shadow: 0 0 6px rgba(34,211,238,0.5);
}
.bf-scrubber-ticks {
  position: relative;
  width: 100%;
  height: 10px;
  display: flex;
  align-items: center;
}
.bf-scrubber-war-tick {
  position: absolute;
  left: 0;
  width: 2px; height: 10px;
  background: var(--accent-amber, #f59e0b);
}
.bf-scrubber-now-tick {
  position: absolute;
  right: 0;
  width: 2px; height: 10px;
  background: var(--accent-cyan, #22d3ee);
}

/* Legend bar toggle */
.bf-legend-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
}
.bf-legend-toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e4e4e7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.bf-legend-toggle:hover { background: rgba(255,255,255,0.10); }
.bf-legend-content {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #a1a1aa;
}
.bf-legend-content-item { white-space: nowrap; }


/* ============================================
   STALE BANNER
   ============================================ */

.stale-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-amber);
  letter-spacing: 0.03em;
  position: relative;
  z-index: 50;
}

.stale-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}


/* ============================================
   MAP LAYOUT
   ============================================ */

.bf-map-wrap {
  display: flex;
  flex-direction: row;
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 400px;
  align-items: flex-start;
  overflow: hidden;
}

#battlefield-map {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 400px;
  transition: flex 0.25s ease;
  background: #09090b;
  position: relative;
  flex-shrink: 0;
}

/* Prevent MapLibre canvas white-arc artifact from background flash */
#battlefield-map .maplibregl-canvas {
  background: #09090b !important;
}

/* Map canvas never dims */
#battlefield-map canvas {
  opacity: 1 !important;
  filter: none !important;
}

/* Map error overlay */
.bf-map-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(9,9,11,0.9);
  z-index: 10;
  gap: 8px;
}
.bf-error-icon {
  font-size: 32px;
  color: var(--accent-amber);
}
.bf-error-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bf-error-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Time range toggle */
.bf-time-toggle {
  position: absolute;
  top: 52px;
  left: 10px;
  display: flex;
  gap: 2px;
  z-index: 10;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
}
.bf-time-btn {
  background: transparent;
  border: none;
  border-radius: 3px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.bf-time-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}
.bf-time-btn.active {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}

/* Sensor layer toggle - FIRMS and seismic always on */

/* Legend icons (actor shape indicators) */
.bf-legend-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 10px;
  flex-shrink: 0;
  line-height: 1;
}
.bf-legend-icon--us  { color: #00d4ff; }
.bf-legend-icon--il  { color: #ffffff; }
.bf-legend-icon--ir  { color: #ff2222; }
.bf-legend-icon--hu  { color: #e8c000; }

/* Legend arc lines */
.bf-legend-arc {
  display: inline-block;
  width: 24px;
  height: 2px;
  flex-shrink: 0;
  border-radius: 1px;
  opacity: 0.85;
}
.bf-legend-arc-thick {
  display: inline-block;
  width: 24px;
  height: 3.5px;
  flex-shrink: 0;
  border-radius: 2px;
  opacity: 0.9;
}
.bf-legend-arc--dash {
  height: 0 !important;
  border-top: 2px dashed;
  border-color: inherit;
  background: transparent !important;
}
.bf-legend-arc--dot {
  height: 0 !important;
  border-top: 2px dotted;
  border-color: inherit;
  background: transparent !important;
}

/* Animations */
@keyframes live-pulse {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

@keyframes arc-draw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

@keyframes marker-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,34,34,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(255,34,34,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,34,34,0); }
}

@keyframes marker-pulse-blue {
  0%   { box-shadow: 0 0 0 0 rgba(0,212,255,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(0,212,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,212,255,0); }
}

/* MapLibre popup overrides */
.maplibregl-popup-content {
  background: #18181b !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 8px !important;
  padding: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
}
.maplibregl-popup-close-button {
  color: #71717a !important;
  font-size: 18px !important;
  right: 6px !important;
  top: 4px !important;
  transition: color 0.1s !important;
}
.maplibregl-popup-close-button:hover {
  color: #fafafa !important;
  background: none !important;
}
.maplibregl-popup-tip {
  border-top-color: #18181b !important;
  border-bottom-color: #18181b !important;
}
.maplibregl-canvas-container canvas { cursor: default; }

/* BF popup - enriched event popups */
.bf-popup {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #e4e4e7;
  max-width: 300px;
  line-height: 1.4;
}
.bf-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 8px;
  margin-bottom: 6px;
}
.bf-popup-actor {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bf-popup-type { font-size: 10px; color: #71717a; }
.bf-popup-headline {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #f4f4f5;
}
.bf-popup-desc {
  font-size: 11px;
  color: #a1a1aa;
  margin-bottom: 8px;
  line-height: 1.5;
}
.bf-popup-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.bf-popup-tier {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bf-popup-conf {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  font-size: 10px;
  color: #71717a;
}
.bf-conf-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.bf-conf-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.bf-popup-time { font-size: 10px; color: #52525b; margin-bottom: 6px; }
.popup-detection {
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
.popup-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #52525b;
  margin-bottom: 4px;
}
.popup-det-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #a1a1aa;
  padding: 1px 0;
}
.popup-det-row span { color: #e4e4e7; }
.bf-popup-sources {
  font-size: 10px;
  color: #52525b;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 6px;
  margin-top: 4px;
}

/* Popup internals */
.pop-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
  line-height: 1.3;
}
.pop-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}
.pop-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pop-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pop-confidence { font-size: 10px; color: var(--text-muted); }
.pop-time {
  font-size: 10px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.pop-sources { font-size: 10px; color: var(--text-dim); margin-top: 4px; }

/* Live ring */
.live-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: live-pulse 2s ease-out infinite;
  pointer-events: none;
}

/* Arc hover tooltip */
.bf-arc-tooltip {
  position: absolute;
  background: rgba(9,9,11,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: #e4e4e7;
  pointer-events: none;
  white-space: normal;
  max-width: 220px;
  line-height: 1.6;
  z-index: 20;
  transform: translate(-50%, -110%);
}

/* Date range HUD */
.bf-date-hud {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9,9,11,0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 11px;
  color: #e4e4e7;
  z-index: 10;
  pointer-events: none;
}

/* Scrubber histogram */
.bf-scrubber-hist {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  pointer-events: none;
}
.bf-scrubber-hist-bar {
  position: absolute;
  bottom: 0;
  background: #f59e0b;
  border-radius: 1px 1px 0 0;
}

/* Custom map markers */
.bf-marker-strike {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}
.bf-marker-pulse-red  { animation: marker-pulse 2.2s ease-in-out infinite; }
.bf-marker-pulse-blue { animation: marker-pulse-blue 2.2s ease-in-out infinite; }

.bf-marker-force {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  background: rgba(9,9,11,0.88);
  backdrop-filter: blur(2px);
}
.bf-marker-site {
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.bf-marker-site-inner {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  margin: 2px;
}

/* Hide DOM markers when zoomed out (clusters take over) */
#battlefield-map.bf-hide-markers .bf-marker-impact,
#battlefield-map.bf-hide-markers .live-ring,
#battlefield-map.bf-hide-markers .bf-map-highlight {
  display: none !important;
}

/* Impact marker - circle with crosshair at strike target */
.bf-marker-impact {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
  cursor: pointer;
}
.bf-marker-impact::before,
.bf-marker-impact::after {
  content: '';
  position: absolute;
  background: currentColor;
}
.bf-marker-impact::before {
  width: 8px;
  height: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.bf-marker-impact::after {
  width: 1px;
  height: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.bf-marker-impact.confirmed { width: 26px; height: 26px; }
.bf-marker-impact.unconfirmed { opacity: 0.4; }

/* Launch marker - upward triangle at known launch origin */
.bf-marker-launch {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid currentColor;
  opacity: 0.7;
  cursor: default;
}

/* Error card */
.bf-data-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(220,38,38,0.07);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: 6px;
}
.bf-data-error-icon {
  font-size: 18px;
  color: var(--accent-red);
  flex-shrink: 0;
  line-height: 1;
}
.bf-data-error-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.bf-data-error-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}


/* ============================================
   FULLSCREEN BUTTON
   ============================================ */

.bf-fullscreen-btn {
  position: absolute !important;
  top: 14px !important;
  left: 14px !important;
  right: auto !important;
  width: auto !important;
  height: 34px !important;
  padding: 0 14px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9,9,11,0.85) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 6px !important;
  color: #f4f4f5 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  cursor: pointer;
  z-index: 410;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.bf-fullscreen-btn:hover {
  background: rgba(30,30,35,0.95) !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: var(--text-primary);
}

/* Fullscreen close button - visible in fullscreen mode */
.bf-fullscreen-close {
  position: fixed;
  top: 14px;
  left: 14px;
  right: auto;
  width: auto;
  height: 34px;
  padding: 0 14px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(9,9,11,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #f4f4f5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  z-index: 520;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.bf-fullscreen-close:hover {
  background: rgba(220,38,38,0.85);
  border-color: rgba(220,38,38,0.6);
  color: #fff;
  box-shadow: 0 4px 20px rgba(220,38,38,0.4);
}

@media (max-width: 768px) {
  .bf-fullscreen-close {
    width: 48px;
    height: 48px;
    font-size: 22px;
    top: 10px;
    right: 10px;
    border-radius: 10px;
  }
}


/* ============================================
   STRIKE CARD / INTEL PANEL
   ============================================ */

.bf-strike-card {
  position: relative;
  top: auto;
  right: auto;
  height: 100%;
  max-height: 100%;
  align-self: flex-start;
  width: 26%;
  min-width: 26%;
  overflow: hidden;
  z-index: 100;
  background: rgba(10,12,16,0.97);
  box-shadow: -8px 0 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  color: #e4e4e7;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.06);
}
.bf-strike-card.open {
  width: 26%;
  min-width: 26%;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Mobile swipe handle / collapsed header */
.bf-card-swipe-handle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 6px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.bf-swipe-bar {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
}
.bf-swipe-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #71717a;
  margin-top: 4px;
}

/* Legend panel (default view) */
.bf-panel-legend {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.bf-panel-legend-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.bf-panel-legend-title {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #52525b;
  margin-bottom: 4px;
}
.bf-panel-legend-sub {
  display: block;
  font-size: 12px;
  color: #3f3f46;
  font-style: italic;
}
.bf-panel-legend-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.bf-panel-legend-group-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3f3f46;
  margin-bottom: 10px;
}
.bf-panel-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #71717a;
}
.bf-panel-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Event panel */
.bf-panel-event {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Actor accent bar */
.bf-card-actor-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.bf-card-actor-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bf-card-weapon-label {
  font-size: 10px;
  color: #52525b;
  letter-spacing: 0.06em;
  flex: 1;
}

/* Strike history */
.bf-card-history-text {
  font-size: 12px;
  color: #f59e0b;
  font-weight: 600;
}

/* Related events */
.bf-related-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.1s;
}
.bf-related-item:last-child { border-bottom: none; }
.bf-related-item:hover { background: rgba(255,255,255,0.03); margin: 0 -16px; padding: 7px 16px; }
.bf-related-actor { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; flex-shrink: 0; }
.bf-related-headline { font-size: 11px; color: #71717a; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-related-time { font-size: 10px; color: #3f3f46; flex-shrink: 0; }

/* Legend footer (inside event view) */
.bf-card-legend-footer {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.bf-card-legend-footer-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3f3f46;
  margin-bottom: 8px;
}
.bf-card-legend-footer-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #52525b;
  flex-wrap: wrap;
}
.bf-card-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Detection source badges */
.bf-detection-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.bf-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.bf-badge.firms {
  background: rgba(245,158,11,0.18);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.4);
}
.bf-badge.seismic {
  background: rgba(167,139,250,0.18);
  color: #a78bfa;
  border-color: rgba(167,139,250,0.4);
}
.bf-badge.news {
  background: rgba(161,161,170,0.12);
  color: #a1a1aa;
  border-color: rgba(161,161,170,0.25);
}
.bf-badge.gemini {
  background: rgba(245,158,11,0.12);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.3);
}

/* Intelligence sourced disclaimer */
.bf-intel-disclaimer {
  font-size: 11px;
  color: #71717a;
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.5;
  padding: 5px 8px;
  background: rgba(113,113,122,0.08);
  border-radius: 4px;
}

/* Headline links */
.bf-headline-link {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e4e4e7;
  line-height: 1.45;
  margin-bottom: 4px;
  text-decoration: none;
  transition: color 0.15s;
}
.bf-headline-link:hover {
  color: #f59e0b;
  text-decoration: underline;
}
.bf-headline-nolink { cursor: default; }
.bf-headline-nolink:hover { color: #e4e4e7; text-decoration: none; }

/* Confirmation summary */
.bf-card-summary { margin-top: 10px; margin-bottom: 10px; }
.bf-card-summary-text {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.55;
  font-style: italic;
}

/* Threat assessment */
.bf-card-threat {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 4px;
  padding: 6px 10px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 5px;
}
.bf-threat-icon {
  font-size: 12px;
  color: #ef4444;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Secondary meta rows */
.bf-card-meta-rows { display: flex; flex-direction: column; gap: 5px; }
.bf-card-meta-row { display: flex; align-items: baseline; gap: 8px; }
.bf-card-meta-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #52525b;
  text-transform: uppercase;
  min-width: 36px;
  flex-shrink: 0;
}
.bf-card-meta-section .bf-card-actor { font-size: 11px; letter-spacing: 0.04em; }
.bf-card-meta-section .bf-card-type { font-size: 11px; color: #a1a1aa; }
.bf-card-meta-section .bf-card-dist { font-size: 11px; color: #71717a; margin-left: 0; }
.bf-card-meta-section .bf-card-time { font-size: 10px; color: #52525b; }

/* Sources */
.bf-card-sources { overflow-y: auto; max-height: 120px; }

/* Mobile tap-outside overlay */
.bf-card-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: transparent;
}

/* Ad zones */
.ad-zone {
  display: none;
  width: 300px;
  height: 250px;
  margin: 12px auto;
  overflow: hidden;
}
.ad-zone-battlefield-footer {
  width: 100%;
  max-width: 300px;
  margin: 16px auto 0;
}


/* ============================================
   CARD INTERIOR
   ============================================ */

.bf-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  margin-left: auto;
  background: none;
  border: none;
  color: #52525b;
  font-size: 16px;
  cursor: pointer;
  z-index: 10;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.bf-card-close:hover {
  color: #e4e4e7;
  background: rgba(255,255,255,0.05);
}

.bf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  padding-right: 36px;
  flex-shrink: 0;
}
.bf-card-ticker { display: flex; align-items: center; gap: 6px; }
.bf-card-ticker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff2222;
  animation: bf-pulse 1.4s ease-in-out infinite;
}
.bf-card-ticker-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff2222;
}
.bf-card-ts {
  font-size: 10px;
  color: #52525b;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.bf-card-headline {
  padding: 0 16px 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.bf-card-headline a { color: inherit; text-decoration: none; }
.bf-card-headline a:hover { color: #a1a1aa; }

.bf-card-tier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 12px;
  flex-shrink: 0;
}
.bf-card-tier-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.bf-card-conf-bar-wrap {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.bf-card-conf-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
  background: #22c55e;
}
.bf-card-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0 16px;
  flex-shrink: 0;
}
.bf-card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}
.bf-card-section {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bf-card-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #52525b;
  margin-bottom: 5px;
}
.bf-card-section-text {
  font-size: 13px;
  line-height: 1.6;
  color: #a1a1aa;
}
.bf-card-threat-text { color: #f97316; }
.bf-card-coords {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: #71717a;
}
.bf-card-sensor-row { display: flex; flex-wrap: wrap; gap: 6px; }
.bf-card-sensor-chip {
  font-size: 11px;
  background: rgba(245,158,11,0.08);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 600;
}
.bf-card-sources-row { display: flex; flex-wrap: wrap; gap: 5px; }
.bf-card-news-chip {
  font-size: 11px;
  background: rgba(255,255,255,0.05);
  color: #a1a1aa;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 2px 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.bf-card-news-chip:hover {
  background: rgba(255,255,255,0.1);
  color: #e4e4e7;
}
.bf-card-footer {
  padding: 12px 16px 16px;
  display: flex;
  gap: 8px;
}
.bf-share-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #71717a;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bf-share-btn:hover { background: rgba(255,255,255,0.1); color: #e4e4e7; }


/* ============================================
   STATS ROW
   ============================================ */

.bf-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.4fr;
  gap: 12px;
  margin: 16px 0 20px;
  padding-left: 16px;
  padding-right: 16px;
}
.bf-stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bf-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #52525b;
  text-transform: uppercase;
}
.bf-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.bf-stat-value--small {
  font-size: 16px;
  font-weight: 600;
  color: #f59e0b;
  letter-spacing: 0.02em;
}


/* ============================================
   THEATER CONTENT
   ============================================ */

/* Dashboard grid */
.bf-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
  padding-left: 16px;
  padding-right: 16px;
}
.bf-intel-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: stretch;
}

/* Theater blocks */
.bf-theater-blocks {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bf-theater-block {
  flex: 1;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
}
.bf-theater-block:last-child { border-bottom: none; }
.bf-theater-block--strikes { border-bottom: none; --strikes-accent: #f59e0b; }

.bf-block-date {
  margin-left: 8px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  font-size: 9px;
}
.bf-block-header {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #f59e0b;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(245,158,11,0.25);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.bf-block-timestamp { font-size: 10px; color: #52525b; margin-bottom: 12px; }
.bf-block-content {
  flex: 1;
  font-size: 13px;
  line-height: 1.7;
  color: #a1a1aa;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
.bf-block-content.skeleton-text { color: #3f3f46; }

/* Strikes list */
.bf-strikes-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 8px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3f3f46 transparent;
}
.bf-strikes-list::-webkit-scrollbar { width: 4px; }
.bf-strikes-list::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 2px; }

.bf-strike-item {
  padding: 14px 16px;
  background: #161616;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.12s;
}
.bf-strike-item:first-child { border-radius: 6px 6px 0 0; }
.bf-strike-item:last-child  { border-radius: 0 0 6px 6px; border-bottom: none; }
.bf-strike-item--clickable  { cursor: pointer; }
.bf-strike-item--clickable:hover { background: #1e1e1e; }

.bf-strike-toprow { display: flex; gap: 12px; align-items: flex-start; }
.bf-strike-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f3f46;
  flex-shrink: 0;
  margin-top: 5px;
}
.bf-strike-dot--high { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.bf-strike-main { flex: 1; min-width: 0; }
.bf-strike-title { font-size: 13px; font-weight: 600; color: #e4e4e7; line-height: 1.4; margin-bottom: 4px; }
.bf-strike-location { font-size: 11px; color: #71717a; margin-bottom: 5px; }
.bf-strike-desc { font-size: 12px; color: #a1a1aa; line-height: 1.6; margin-top: 4px; }
.bf-strike-coords { font-size: 10px; color: #3f3f46; font-family: 'IBM Plex Mono', monospace; margin-left: 4px; }
.bf-strike-footer { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.bf-strike-time { font-size: 10px; color: #52525b; font-family: 'IBM Plex Mono', monospace; }
.bf-strike-actors { display: flex; gap: 4px; flex-wrap: wrap; }
.bf-strike-actor-chip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid;
  text-transform: uppercase;
}
.bf-strike-src { font-size: 10px; color: #3f3f46; font-style: italic; margin-left: auto; }
.bf-strike-severity { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* Facilities panel */
.bf-facilities { padding: 24px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.bf-facilities-header {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #f59e0b;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  border-bottom: 1px solid rgba(245,158,11,0.25);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.bf-facilities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bf-facilities--panel { height: 100%; }
.bf-facilities--panel .bf-facilities-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3f3f46 transparent;
}
.bf-facilities--panel .bf-facilities-grid::-webkit-scrollbar { width: 4px; }
.bf-facilities--panel .bf-facilities-grid::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 2px; }

.bf-facility-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.bf-facility-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.bf-facility-icon { font-size: 16px; width: 24px; text-align: center; flex-shrink: 0; }
.bf-facility-info { flex: 1; min-width: 0; }
.bf-facility-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.bf-facility-type { font-size: 10px; color: #52525b; letter-spacing: 0.06em; margin-top: 2px; }
.bf-facility-desc { font-size: 11px; color: #71717a; line-height: 1.4; }
.bf-facility-arrow { color: #3f3f46; font-size: 18px; flex-shrink: 0; }

/* Methodology */
.bf-methodology { padding: 24px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.bf-method-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #52525b;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.bf-method-text { font-size: 12px; line-height: 1.7; color: #71717a; }

/* Disclaimer */
.bf-disclaimer { padding: 24px 16px; }
.bf-disclaimer p { font-size: 11px; line-height: 1.6; color: #52525b; }

/* Legend toggle (collapsible legend component) */
.bf-legend-toggle {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: none;
  color: #71717a;
  font-size: 11px;
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.bf-legend-toggle:hover { color: #a1a1aa; }
.bf-legend-content { display: none; padding: 12px 16px; }
.bf-legend-content.open { display: block; }
.bf-legend-items { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.bf-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #a1a1aa; }
.bf-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bf-legend-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.1); }

/* Live event feed column */
.bf-feed-col {
  position: sticky;
  top: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(9,9,11,0.6);
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.bf-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.bf-feed-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #52525b;
  text-transform: uppercase;
}
.bf-feed-pulse {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: live-pulse 2s ease-out infinite;
}
.bf-feed-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.bf-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.1s;
}
.bf-feed-item:hover { background: rgba(255,255,255,0.04); }
.bf-feed-item:last-child { border-bottom: none; }
.bf-feed-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.bf-feed-item-body { flex: 1; min-width: 0; }
.bf-feed-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}
.bf-feed-actor { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.bf-feed-tier { font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.bf-feed-target {
  font-size: 11px;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.bf-feed-ago { font-size: 10px; color: #52525b; }

/* Timeline events feed (below map) */
.bf-timeline-feed {
  margin: 16px 16px 20px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(9,9,11,0.6);
  overflow: hidden;
}
.bf-timeline-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.bf-timeline-feed-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #f59e0b;
  text-transform: uppercase;
}
.bf-timeline-feed-count { font-size: 10px; color: #71717a; font-variant-numeric: tabular-nums; }
.bf-timeline-feed-controls {
  display: flex;
  gap: 8px;
  padding: 10px 16px 6px;
  align-items: center;
}
.bf-tl-search-wrap { position: relative; flex: 1; min-width: 160px; }
.bf-tl-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  font-size: 14px;
  pointer-events: none;
}
.bf-tl-search {
  width: 100%;
  background: rgba(15,15,18,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 7px 10px 7px 30px;
  color: #e4e4e7;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.bf-tl-search::placeholder { color: #71717a; }
.bf-tl-search:focus { border-color: #f59e0b; }
.bf-tl-sort {
  background: rgba(15,15,18,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 7px 10px;
  color: #e4e4e7;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.bf-tl-sort:focus { border-color: #f59e0b; }
.bf-tl-filters {
  display: flex;
  gap: 8px;
  padding: 4px 16px 10px;
  flex-wrap: wrap;
  align-items: center;
}
.bf-tl-type-pills, .bf-tl-actor-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.bf-tl-pill {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #71717a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.bf-tl-pill:hover { border-color: rgba(255,255,255,0.2); color: #e4e4e7; }
.bf-tl-pill.active { background: #f59e0b; border-color: #f59e0b; color: #000; }
.bf-tl-actor-pill {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--pill-color, rgba(255,255,255,0.08));
  background: transparent;
  color: var(--pill-color, #e4e4e7);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.bf-tl-actor-pill:hover, .bf-tl-actor-pill.active {
  background: var(--pill-color, rgba(255,255,255,0.1));
  color: #000;
}
.bf-tl-list {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.bf-tl-event {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.1s;
}
.bf-tl-event:hover { background: rgba(255,255,255,0.04); }
.bf-tl-event:last-child { border-bottom: none; }
.bf-tl-event-accent { width: 3px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.bf-tl-event-body { flex: 1; min-width: 0; }
.bf-tl-event-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.bf-tl-event-time {
  font-size: 10px;
  font-weight: 600;
  color: #52525b;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.bf-tl-tier-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.bf-tl-tier--confirmed   { background: rgba(34,197,94,0.18);  color: #22c55e; }
.bf-tl-tier--probable    { background: rgba(202,138,4,0.2);   color: #ca8a04; }
.bf-tl-tier--possible    { background: rgba(168,85,247,0.18); color: #a855f7; }
.bf-tl-tier--unconfirmed { background: rgba(82,82,91,0.25);   color: #71717a; }
.bf-tl-actor-chip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}
.bf-tl-event-headline {
  font-size: 12px;
  font-weight: 700;
  color: #e4e4e7;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bf-tl-event-coords { font-size: 10px; color: #52525b; margin-top: 2px; }


/* ============================================
   SENSORS
   ============================================ */

/* Selected event highlight ring */
.bf-map-highlight {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #ffd700;
  background: rgba(255, 215, 0, 0.08);
  pointer-events: none;
  animation: highlight-pulse 1.2s ease-out infinite;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5), 0 0 24px rgba(255, 215, 0, 0.2);
}
@keyframes highlight-pulse {
  0%   { transform: scale(1);    opacity: 1;   box-shadow: 0 0 12px rgba(255,215,0,0.5), 0 0 24px rgba(255,215,0,0.2); }
  50%  { transform: scale(1.55); opacity: 0.5; box-shadow: 0 0 20px rgba(255,215,0,0.7), 0 0 40px rgba(255,215,0,0.3); }
  100% { transform: scale(1);    opacity: 1;   box-shadow: 0 0 12px rgba(255,215,0,0.5), 0 0 24px rgba(255,215,0,0.2); }
}

/* Selected marker yellow ring */
.bf-marker-impact.bf-selected {
  outline: 2.5px solid #ffd700 !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(255,215,0,0.35), 0 0 16px rgba(255,215,0,0.5) !important;
}

/* Hit count badge on impact markers */
.bf-marker-hit-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  background: rgba(9,9,11,0.92);
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: inherit;
  padding: 1px 4px;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1.2;
}

/* Multi-strike glow animation */
@keyframes bf-multi-glow {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.4); }
}

/* Location Intelligence Card - Strike Timeline */
.bf-locint-timeline { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.bf-locint-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 5px;
  transition: background 0.1s;
}
.bf-locint-timeline-item:hover { background: rgba(255,255,255,0.07); }
.bf-locint-actor-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 3px;
}
.bf-locint-item-body { flex: 1; min-width: 0; }
.bf-locint-item-date {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #52525b;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.bf-locint-item-headline { font-size: 11px; color: #a1a1aa; line-height: 1.4; margin-bottom: 3px; }
.bf-locint-tier-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 3px;
  padding: 1px 5px;
}


/* ============================================
   RESPONSIVE / MOBILE
   ============================================ */

@media (max-width: 768px) {
  .bf-map-wrap { flex-direction: column; }
  .bf-card-swipe-handle { display: flex; }

  .bf-strike-card {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    min-width: unset !important;
    height: 44px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.7);
    transition: height 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    flex-shrink: 0;
    z-index: 200;
  }
  .bf-strike-card.open {
    height: 65vh;
    width: 100% !important;
    min-width: unset !important;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .bf-under-map { padding: 0 0 24px; }

  .bf-stats-row {
    grid-template-columns: 1fr 1fr;
    padding-left: 12px;
    padding-right: 12px;
  }
  .bf-stat-card--wide { grid-column: span 2; }

  .bf-dashboard-grid {
    grid-template-columns: 1fr;
    padding-left: 12px;
    padding-right: 12px;
  }

  .bf-control-bar {
    margin-left: 0;
    margin-right: 0;
  }

  .bf-methodology,
  .bf-facilities,
  .bf-disclaimer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .bf-theater-block { flex: none; }
  .bf-feed-col { position: static; }
  .bf-feed-list { max-height: 300px; }

  .bf-timeline-feed { margin: 12px; }
  .bf-tl-list { max-height: 400px; }
  .bf-tl-search { font-size: 16px; }
  .bf-tl-sort { font-size: 16px; }
  .bf-tl-pill, .bf-tl-actor-pill { min-height: 44px; padding: 10px 14px; }

  .bf-fullscreen-close {
    width: 48px;
    height: 48px;
    font-size: 22px;
    top: 10px;
    right: 10px;
    border-radius: 10px;
  }
}


/* ============================================
   FULLSCREEN MODE
   All body.bf-map-fullscreen overrides consolidated here
   ============================================ */

body.bf-map-fullscreen .bf-control-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 510;
  margin: 0;
  border-radius: 0;
}

body.bf-map-fullscreen .bf-map-wrap {
  overflow: visible !important;
}

body.bf-map-fullscreen #battlefield-map {
  position: fixed;
  inset: 0;
  height: calc(100dvh - 52px) !important;
  min-height: unset !important;
  z-index: 500;
  border-radius: 0;
}

body.bf-map-fullscreen .bf-fullscreen-btn {
  display: none !important;
}

body.bf-map-fullscreen .bf-fullscreen-close {
  display: flex;
}

body.bf-map-fullscreen .bf-strike-card,
body.bf-map-fullscreen .bf-strike-card.open {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 52px !important;
  left: auto !important;
  width: 26% !important;
  min-width: 220px !important;
  height: calc(100dvh - 52px) !important;
  max-height: calc(100dvh - 52px) !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  z-index: 515 !important;
}

body.bf-map-fullscreen #bf-panel-legend,
body.bf-map-fullscreen #bf-panel-event {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

body.bf-map-fullscreen #bf-card-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
}

body.bf-map-fullscreen #tbb-header,
body.bf-map-fullscreen #tbb-status-strip {
  z-index: 490;
}

/* Legacy scrubber fullscreen dock (scrubber is hidden but rule preserved) */
body.bf-map-fullscreen .bf-scrubber {
  z-index: 510;
  position: fixed !important;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  border-radius: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  transform: none;
  width: 100%;
}

/* === RANGE SLIDER SCRUBBER === */
.bf-cbar-left { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.bf-cbar-right { display: flex; align-items: center; gap: 6px; }
.bf-cbar-slider-wrap {
  flex: 1;
  position: relative;
  height: 44px;
  display: flex;
  align-items: flex-end;
}

.bf-cbar-range {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  width: 100%;
  height: 36px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.bf-cbar-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 3px;
  height: 44px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  cursor: ew-resize;
  margin-top: -8px;
}
.bf-cbar-range::-moz-range-thumb {
  width: 3px;
  height: 44px;
  background: #ffffff;
  border-radius: 2px;
  border: none;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  cursor: ew-resize;
}
.bf-cbar-range::-webkit-slider-runnable-track { background: transparent; }
.bf-cbar-range::-moz-range-track { background: transparent; }

/* Histogram drag hint */
.bf-cbar-hint {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #3f3f46;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
  text-transform: lowercase;
}

/* TODAY btn shows current scrubber date */
.bf-cbar-today { min-width: 140px; text-align: center; }

/* Drag cursor on track */
.bf-cbar-track { cursor: grab; }
.bf-cbar-track:active { cursor: grabbing; }

/* Align range thumb with bars - range input has ~6px thumb-width padding on each side */
.bf-cbar-range { margin: 0; padding: 0; }
.bf-cbar-slider-wrap .bf-cbar-track { padding-left: 1px; padding-right: 1px; }

/* ── Legend Color Classes ── */

/* Confidence tier dots */
.bf-legend-dot--confirmed { background: #22c55e; }
.bf-legend-dot--probable  { background: #f59e0b; }
.bf-legend-dot--possible  { background: #a78bfa; }
.bf-legend-dot--unconfirmed { background: #52525b; }

/* Actor chips */
.bf-legend-chip--us    { background: #00d4ff; color: #000; }
.bf-legend-chip--idf   { background: #ffffff; color: #000; }
.bf-legend-chip--irgc  { background: #ff2222; color: #fff; }
.bf-legend-chip--houthi { background: #e8c000; color: #000; }

/* Actor text labels */
.bf-legend-text--us    { color: #00d4ff; font-weight: 600; }
.bf-legend-text--idf   { color: #ffffff; font-weight: 600; }
.bf-legend-text--irgc  { color: #ff2222; font-weight: 600; }
.bf-legend-text--houthi { color: #e8c000; font-weight: 600; }

/* Strike arc swatches */
.bf-legend-arc--us   { background: #00d4ff; }
.bf-legend-arc--idf  { background: transparent; border-top: 2px dashed #ffffff; height: 0; display: inline-block; width: 24px; }
.bf-legend-arc--irgc { background: #ff2222; }
.bf-legend-arc--houthi { background: transparent; border-top: 2px dotted #e8c000; height: 0; display: inline-block; width: 24px; }

/* Arc type labels */
.bf-legend-arc-type-sep { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,0.07); }
.bf-legend-arc-svg { flex-shrink: 0; }
.bf-legend-arc-label { color: #71717a; font-size: 10px; }

/* Sensor dots */
.bf-legend-dot--firms { background: #ff6600; opacity: 0.8; }
.bf-legend-dot--seismic { background: #a78bfa; border: 1px solid #a78bfa; }

/* Footer legend dots */
.bf-footer-dot--confirmed { background: #22c55e; }
.bf-footer-dot--probable  { background: #f59e0b; margin-left: 10px; }
.bf-footer-dot--possible  { background: #a78bfa; margin-left: 10px; }
.bf-footer-dot--unconfirmed { background: #52525b; margin-left: 10px; }
.bf-footer-row--actors { margin-top: 4px; }
.bf-footer-dot--us   { background: #00d4ff; }
.bf-footer-dot--idf  { background: #ffffff; margin-left: 10px; }
.bf-footer-dot--irgc { background: #ff2222; margin-left: 10px; }
.bf-footer-dot--houthi { background: #e8c000; margin-left: 10px; }

/* Actor pill colors */
.bf-tl-actor-pill--us     { --pill-color: #00d4ff; }
.bf-tl-actor-pill--idf    { --pill-color: #ffffff; }
.bf-tl-actor-pill--iran   { --pill-color: #ff2222; }
.bf-tl-actor-pill--houthi { --pill-color: #e8c000; }
