/* ==========================================================================
   PIXELSIGHT TOPOLOGY & FAA VIRTUAL ADS-B TRANSPONDER SYSTEM - STYLESHEET
   ========================================================================== */

:root {
  --bg-dark: #090d16;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(6, 182, 212, 0.35);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --cyan-primary: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.4);
  --emerald-success: #10b981;
  --amber-warning: #f59e0b;
  --red-alert: #ef4444;
  --indigo-accent: #6366f1;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--cyan-glow);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 50% 0%, #111827 0%, #090d16 100%);
}

/* Top Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  height: 64px;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-pixels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 22px;
  height: 22px;
}

.pixel {
  background: var(--cyan-primary);
  border-radius: 2px;
  transition: transform 0.3s ease;
}

.pixel.p1 { opacity: 0.6; }
.pixel.p2 { opacity: 0.9; background: #38bdf8; }
.pixel.p3 { opacity: 1.0; background: var(--cyan-primary); box-shadow: 0 0 8px var(--cyan-primary); }
.pixel.p4 { opacity: 0.4; }

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
}

.brand-title .highlight {
  color: var(--cyan-primary);
}

.brand-sub {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: -2px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--emerald-success);
}

.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald-success);
  box-shadow: 0 0 8px var(--emerald-success);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0.4; transform: scale(0.9); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--cyan-primary);
  transform: translateY(-1px);
}

.action-btn.icon-only {
  padding: 8px 12px;
}

.badge {
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge.red { background: rgba(239, 68, 68, 0.2); color: var(--red-alert); border: 1px solid var(--red-alert); }
.badge.cyan { background: rgba(6, 182, 212, 0.2); color: var(--cyan-primary); border: 1px solid var(--cyan-primary); }
.badge.emerald { background: rgba(16, 185, 129, 0.2); color: var(--emerald-success); border: 1px solid var(--emerald-success); }

/* Main Grid Layout */
.main-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Sidebar Panel */
.sidebar-panel {
  background: rgba(11, 17, 28, 0.85);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Custom Scrollbar */
.sidebar-panel::-webkit-scrollbar {
  width: 6px;
}

.sidebar-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.sidebar-panel::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-primary);
}

/* Card Sections */
.card-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-section:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.step-num {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-primary);
  border: 1px solid var(--border-highlight);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.section-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}

.section-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Input & Search Controls */
.input-group {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 14px;
  transition: border-color 0.2s ease;
}

.input-group:focus-within {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.input-icon {
  color: var(--cyan-primary);
  margin-right: 10px;
  font-size: 0.9rem;
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.btn-primary.glow-btn {
  box-shadow: 0 0 16px var(--cyan-glow);
}

.btn-primary.large {
  padding: 12px 20px;
  font-size: 0.9rem;
}

.btn-primary.full-width {
  width: 100%;
}

.btn-primary.success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.preset-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}

.chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-primary);
  border-color: var(--cyan-primary);
}

/* Info & Confirmation Card */
.info-card {
  margin-top: 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 14px;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.geo-details {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 12px;
}

.geo-details strong {
  color: var(--cyan-primary);
}

.slider-group {
  margin-top: 10px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.highlight-text {
  color: var(--cyan-primary);
  font-weight: 700;
  font-family: var(--font-mono);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan-primary);
  cursor: pointer;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm.secondary {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-main);
}

.btn-sm.success {
  background: var(--emerald-success);
  color: #fff;
  flex: 1;
}

/* Topographic Grid */
.topo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.topo-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.topo-icon {
  font-size: 1.1rem;
  color: var(--cyan-primary);
  width: 24px;
}

.topo-info {
  display: flex;
  flex-direction: column;
}

.topo-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topo-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-mono);
}

.terrain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.tag i {
  color: var(--cyan-primary);
  margin-right: 4px;
}

/* Threat Combo Multi-select */
.combo-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}

.threat-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.threat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.threat-item:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(6, 182, 212, 0.3);
}

.threat-item.selected {
  border-color: var(--cyan-primary);
  background: rgba(6, 182, 212, 0.08);
}

.threat-item input[type="checkbox"] {
  accent-color: var(--cyan-primary);
  margin-top: 3px;
}

.threat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.threat-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.range-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.threat-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.range-summary-banner {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.banner-title {
  font-size: 0.68rem;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--cyan-primary);
}

.banner-value {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
}

.banner-value span:first-child {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.banner-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Topology Results */
.topo-specs-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.spec-label { color: var(--text-muted); }
.spec-val { font-weight: 600; color: var(--cyan-primary); font-family: var(--font-mono); }

.topology-results {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  padding: 10px 6px;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stat-card.highlight { border-color: var(--cyan-primary); background: rgba(6, 182, 212, 0.1); }
.stat-card.success { border-color: var(--emerald-success); background: rgba(16, 185, 129, 0.1); }

.stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.overlap-legend-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--radius-md);
}

.overlap-legend-card h4 {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.legend-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-step {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.legend-step.step-1 { background: rgba(100, 116, 139, 0.25); color: #cbd5e1; border-left: 4px solid #94a3b8; }
.legend-step.step-2 { background: rgba(6, 182, 212, 0.35); color: #7dd3fc; border-left: 4px solid var(--cyan-primary); }
.legend-step.step-3 { background: rgba(16, 185, 129, 0.45); color: #6ee7b7; border-left: 4px solid var(--emerald-success); }

/* Table */
.units-table-wrapper h4 {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.units-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.units-table th, .units-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.units-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: rgba(15, 23, 42, 0.9);
}

.units-table td {
  font-family: var(--font-mono);
  color: #e2e8f0;
}

/* FAA ADS-B Section */
.adsb-status-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
}

.adsb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.subtext {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.code-preview {
  background: rgba(0, 0, 0, 0.6);
  border: 1px dashed var(--cyan-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-lbl {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 700;
}

.code-preview code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan-primary);
  font-weight: 700;
}

.save-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--cyan-primary);
}

.flex-1 { flex: 1; }

/* Map Viewport Area */
.map-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #020617;
}

.map-viewport {
  width: 100%;
  height: 100%;
}

.map-controls-header {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 500;
  pointer-events: none;
}

.map-mode-selector, .map-legend-pills {
  pointer-events: auto;
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.map-controls-header .action-btn {
  pointer-events: auto;
}

.map-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-mode-btn.active {
  background: var(--cyan-primary);
  color: #fff;
}

.map-legend-pills {
  padding: 6px 12px;
  gap: 12px;
}

.map-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.sight-1 .swatch { background: rgba(148, 163, 184, 0.5); border: 1px solid #cbd5e1; }
.sight-2 .swatch { background: rgba(6, 182, 212, 0.6); border: 1px solid var(--cyan-primary); }
.sight-3 .swatch { background: rgba(16, 185, 129, 0.8); border: 1px solid var(--emerald-success); }
.swatch-dotted {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px dashed #10b981;
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}
.swatch-dotted-red {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px dashed #ef4444;
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Refine Cyan Circle Drag Toolbar & Pulsing Styles */
.refine-toolbar {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 17, 28, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--cyan-primary);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeInDown 0.3s ease-out;
}

.refine-toolbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan-primary);
}

.pulse-dot-cyan {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #06b6d4;
  box-shadow: 0 0 10px #06b6d4;
  animation: cyanPulse 1.2s infinite ease-in-out;
}

@keyframes cyanPulse {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7); }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.cyan-glow-btn {
  background: linear-gradient(135deg, #06b6d4, #0284c7) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5) !important;
}

.cyan-glow-btn:hover {
  background: linear-gradient(135deg, #38bdf8, #0369a1) !important;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.8) !important;
}

.blinking-cyan-circle-path {
  animation: cyanPathBlink 1.2s infinite ease-in-out !important;
}

@keyframes cyanPathBlink {
  0% { stroke-opacity: 0.9; fill-opacity: 0.05; stroke-width: 2px; }
  50% { stroke-opacity: 1; fill-opacity: 0.22; stroke-width: 3.5px; filter: drop-shadow(0 0 12px #06b6d4); }
  100% { stroke-opacity: 0.9; fill-opacity: 0.05; stroke-width: 2px; }
}

.refine-center-cursor {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.35);
  border: 2px solid #06b6d4;
  box-shadow: 0 0 20px #06b6d4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #06b6d4;
  font-size: 12px;
  cursor: grab;
  animation: cyanPulse 1.2s infinite ease-in-out;
}

/* Flightradar24 Plane Marker Styles */
.fr24-plane-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.plane-heading-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-size: 16px;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  transition: transform 0.3s ease;
}

.plane-tag {
  position: absolute;
  top: 24px;
  background: rgba(11, 17, 28, 0.85);
  border: 1px solid #10b981;
  color: #10b981;
  font-size: 8px;
  font-family: var(--font-mono);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
}

/* TCAS Cockpit Observer Range Controls */
.tcas-range-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 17, 28, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-top: 14px;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.range-controls-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cyan-primary);
  margin-right: 4px;
  font-family: var(--font-mono);
}

.tcas-range-controls .range-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tcas-range-controls .range-btn:hover {
  border-color: var(--cyan-primary);
  color: #fff;
}

.tcas-range-controls .range-btn.active {
  background: var(--cyan-primary);
  border-color: var(--cyan-primary);
  color: #0b111c;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.fr24-plane-wrapper.tcas-focus .plane-heading-arrow {
  color: #00f0ff !important;
  font-size: 20px !important;
  text-shadow: 0 0 15px #00f0ff, 0 0 25px #00f0ff !important;
  animation: planeFocusPulse 1.2s infinite ease-in-out;
}

.fr24-plane-wrapper.tcas-focus .plane-tag {
  border-color: #00f0ff !important;
  color: #00f0ff !important;
  font-weight: bold;
}

@keyframes planeFocusPulse {
  0% { filter: drop-shadow(0 0 2px #00f0ff); }
  50% { filter: drop-shadow(0 0 10px #00f0ff); }
  100% { filter: drop-shadow(0 0 2px #00f0ff); }
}

/* Live Telemetry HUD */
.telemetry-hud {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 580px;
  max-height: calc(100vh - 60px);
  background: rgba(11, 17, 28, 0.94);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 16px;
  z-index: 500;
  box-shadow: var(--shadow-main);
  animation: slideUp 0.3s ease-out;
  overflow-y: auto;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.hud-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.hud-status-badge {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-alert);
  border: 1px solid var(--red-alert);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.hud-item {
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

.hud-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.hud-item strong {
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.icd-json-stream {
  background: #020617;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  max-height: 280px;
  overflow-y: auto;
}

.stream-header {
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.icd-json-stream pre {
  color: #38bdf8;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Modals & Drawers */
.drawer-overlay, .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.modal-overlay {
  justify-content: center;
  align-items: center;
}

/* User Manual Modal Styling */
.manual-modal-content {
  width: 880px;
  max-width: 92vw;
  height: 85vh;
  max-height: 850px;
  background: rgba(11, 17, 28, 0.97);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
  animation: modalZoomIn 0.25s ease-out;
}

@keyframes modalZoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manual-modal-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 12px;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.65;
}

.manual-modal-body h1,
.manual-modal-body h2,
.manual-modal-body h3 {
  color: var(--cyan-primary);
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.manual-modal-body h2 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
}

.manual-modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.82rem;
}

.manual-modal-body th {
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.manual-modal-body td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.5);
}

.manual-modal-body blockquote {
  background: rgba(6, 182, 212, 0.1);
  border-left: 4px solid var(--cyan-primary);
  padding: 10px 14px;
  margin: 1rem 0;
  border-radius: 4px;
  color: #e2e8f0;
}

@media print {
  body * {
    visibility: hidden;
  }
  #user-manual-modal, #user-manual-modal * {
    visibility: visible;
  }
  #user-manual-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: #fff !important;
    color: #000 !important;
  }
  .manual-modal-content {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    background: #fff !important;
    color: #000 !important;
  }
  .manual-modal-body {
    color: #000 !important;
  }
  .manual-modal-body h1, .manual-modal-body h2, .manual-modal-body h3 {
    color: #0284c7 !important;
  }
  .modal-actions-right {
    display: none !important;
  }
}

.drawer-content {
  width: 420px;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  border-left: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  animation: slideLeft 0.3s ease-out;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header, .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.icon-btn:hover { color: #fff; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scenario-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.scenario-card:hover {
  border-color: var(--cyan-primary);
  background: rgba(30, 41, 59, 0.9);
}

.scenario-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scenario-head strong { font-size: 0.9rem; color: #fff; }
.scenario-date { font-size: 0.7rem; color: var(--text-dim); }

.scenario-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.scenario-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.modal-card {
  width: 480px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-main);
}

.modal-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  outline: none;
}

.form-group input:focus {
  border-color: var(--cyan-primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.empty-state {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding: 30px 10px;
}

/* Helper Utilities */
.hidden { display: none !important; }
.text-cyan { color: var(--cyan-primary); }
.text-emerald { color: var(--emerald-success); }
.text-amber { color: var(--amber-warning); }
.text-red { color: var(--red-alert); }

/* Pointing Toggle Button Group */
.pointing-selector-group {
  margin-top: 10px;
  margin-bottom: 12px;
}

.toggle-btn-group {
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--radius-md);
}

.toggle-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.toggle-mode-btn.active {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.toggle-mode-btn:hover:not(.active) {
  background: rgba(30, 41, 59, 0.7);
  color: #fff;
}

/* Custom Dark Blue Camera Sensor Icon & Directional Pointer */
.custom-pixel-sensor-icon {
  background: transparent !important;
  border: none !important;
}

.sensor-node-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-blue-camera-node {
  width: 32px;
  height: 32px;
  background: #091328; /* Deep Dark Blue */
  border: 2.5px solid #2563eb; /* Dark Royal Blue Accent */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa; /* Vibrant Blue Camera Icon */
  font-size: 0.85rem;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.85);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-blue-camera-node:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 1.0);
  border-color: #3b82f6;
  color: #93c5fd;
}

/* Directional Pointer Arrow at Top of Camera Node */
.view-direction-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid #2563eb; /* Arrow pointing forward in direction of view */
}

.dark-blue-camera-node:hover .view-direction-pointer {
  border-bottom-color: #3b82f6;
}

.sensor-label-tag {
  position: absolute;
  bottom: -16px;
  background: rgba(9, 19, 40, 0.95);
  border: 1px solid #2563eb;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* ==========================================================================
   TCAS II COCKPIT RADAR SCOPE DISPLAY STYLES
   ========================================================================== */
.tcas-display-wrapper {
  background: #040914;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 0.75rem;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0,0,0,0.5);
}

.tcas-header-bar {
  background: rgba(9, 19, 40, 0.9);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(6, 182, 212, 0.25);
}

.tcas-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.tcas-view-toggle {
  display: flex;
  gap: 0.35rem;
}

.tcas-tab-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tcas-tab-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  color: #fff;
}

.tcas-tab-btn.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
}

.tcas-scope-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem 0.5rem;
  background: radial-gradient(circle at center, #071224 0%, #030814 100%);
}

.tcas-radar-glass {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, #08172e 0%, #030814 90%);
  border: 2px solid rgba(6, 182, 212, 0.5);
  box-shadow: inset 0 0 25px rgba(6, 182, 212, 0.25), 0 0 15px rgba(6, 182, 212, 0.2);
  overflow: hidden;
}

/* Rotating Radar Sweep Beam */
.radar-sweep-beam {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(6, 182, 212, 0.35) 0deg, rgba(6, 182, 212, 0) 60deg, transparent 360deg);
  animation: radarSweep 4s linear infinite;
  pointer-events: none;
}

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Concentric Range Rings */
.ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(6, 182, 212, 0.35);
  pointer-events: none;
}

.ring-3nm { width: 90%; height: 90%; }
.ring-2nm { width: 60%; height: 60%; }
.ring-1nm { width: 30%; height: 30%; }

.ring-lbl {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(50%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(6, 182, 212, 0.6);
}

/* Radar Crosshair lines */
.radar-crosshair {
  position: absolute;
  background: rgba(6, 182, 212, 0.25);
  pointer-events: none;
}

.radar-crosshair.h-line {
  top: 50%; left: 0; width: 100%; height: 1px;
}

.radar-crosshair.v-line {
  left: 50%; top: 0; height: 100%; width: 1px;
}

.cardinal {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(6, 182, 212, 0.7);
  pointer-events: none;
}

.cardinal.n { top: 4px; left: 50%; transform: translateX(-50%); }
.cardinal.s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.cardinal.e { right: 6px; top: 50%; transform: translateY(-50%); }
.cardinal.w { left: 6px; top: 50%; transform: translateY(-50%); }

/* Ownship Center Icon */
.ownship-symbol {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.ownship-chevron {
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 11px solid #06b6d4;
  filter: drop-shadow(0 0 6px rgba(6,182,212,0.9));
}

/* Intruder Target Blip (Dynamic TCAS Position) */
.tcas-target-blip {
  position: absolute;
  top: 30%; left: 65%;
  transform: translate(-50%, -50%);
  z-index: 20;
  transition: all 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intruder-symbol {
  width: 12px;
  height: 12px;
  background: #ef4444;
  transform: rotate(45deg);
  box-shadow: 0 0 12px #ef4444, 0 0 20px rgba(239, 68, 68, 0.8);
  animation: blipPulse 1.2s ease-in-out infinite alternate;
}

@keyframes blipPulse {
  0% { transform: rotate(45deg) scale(0.9); opacity: 0.85; }
  100% { transform: rotate(45deg) scale(1.2); opacity: 1; box-shadow: 0 0 16px #ef4444, 0 0 25px rgba(239, 68, 68, 1); }
}

.target-datablock {
  position: absolute;
  left: 16px;
  top: -6px;
  background: rgba(9, 13, 22, 0.92);
  border: 1px solid #ef4444;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.8);
  pointer-events: none;
}

.db-line {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.2;
  color: #f1f5f9;
}

.tcas-readout-bar {
  width: 100%;
  display: flex;
  justify-content: space-around;
  background: rgba(9, 19, 40, 0.85);
  padding: 0.4rem 0.5rem;
  border-top: 1px solid rgba(6, 182, 212, 0.2);
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ==========================================================================
   BOLD BLINKING RED TARGET MARKER FOR LIVE VIRTUAL ADS-B SIMULATOR
   ========================================================================== */
.bold-red-target-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Expanding Radar Ping Wave */
.bold-target-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #ff0044;
  box-shadow: 0 0 15px #ff0044;
  animation: targetPingPulse 1.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes targetPingPulse {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Bold Blinking Solid Red Center Circle */
.bold-target-circle {
  width: 22px;
  height: 22px;
  background: #ff0033;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 18px #ff0033, 0 0 30px rgba(255, 0, 51, 0.9);
  animation: boldRedBlink 0.5s ease-in-out infinite alternate;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bold-target-circle i {
  color: #ffffff;
  font-size: 10px;
}

@keyframes boldRedBlink {
  0% {
    transform: scale(0.9);
    background: #cc0022;
    box-shadow: 0 0 10px #ff0033, 0 0 20px rgba(255, 0, 51, 0.6);
  }
  100% {
    transform: scale(1.3);
    background: #ff0044;
    box-shadow: 0 0 25px #ff0044, 0 0 40px rgba(255, 0, 68, 1);
  }
}

/* Floating Live Target Tag */
.bold-target-tag {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 13, 22, 0.95);
  border: 1px solid #ff0044;
  color: #ff4d6d;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 0, 68, 0.4);
  pointer-events: none;
}

/* Telemetry HUD Dynamic Multi-Target Cards */
.hud-targets-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 4px;
}

.hud-target-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
}

.hud-card-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
}

.status-badge-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge-pill.badge-red { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid #ef4444; }
.status-badge-pill.badge-yellow { background: rgba(234, 179, 8, 0.25); color: #fde047; border: 1px solid #eab308; }
.status-badge-pill.badge-green { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; border: 1px solid #10b981; }
.status-badge-pill.badge-blue { background: rgba(0, 240, 255, 0.25); color: #a5f3fc; border: 1px solid #00f0ff; }

/* Target Observation Level Styling Rules */
/* 0 Cameras: Rapid Blinking RED */
.bold-target-ping.red-ping { border-color: #ef4444; box-shadow: 0 0 15px #ef4444; animation: rapidPing 0.35s ease-out infinite; }
.bold-target-circle.red-circle { background: #ef4444; box-shadow: 0 0 18px #ef4444, 0 0 30px rgba(239, 68, 68, 0.9); }
.bold-target-tag.red-tag { border-color: #ef4444; color: #fca5a5; background: rgba(239, 68, 68, 0.25); }

/* 1 Camera: Blinking YELLOW / AMBER */
.bold-target-ping.yellow-ping { border-color: #eab308; box-shadow: 0 0 15px #eab308; animation: rapidPing 0.6s ease-out infinite; }
.bold-target-circle.yellow-circle { background: #eab308; box-shadow: 0 0 18px #eab308, 0 0 30px rgba(234, 179, 8, 0.9); }
.bold-target-tag.yellow-tag { border-color: #eab308; color: #fde047; background: rgba(234, 179, 8, 0.25); }

/* 2 Cameras: Blinking GREEN */
.bold-target-ping.green-ping { border-color: #10b981; box-shadow: 0 0 15px #10b981; animation: rapidPing 0.8s ease-out infinite; }
.bold-target-circle.green-circle { background: #10b981; box-shadow: 0 0 18px #10b981, 0 0 30px rgba(16, 185, 129, 0.9); }
.bold-target-tag.green-tag { border-color: #10b981; color: #6ee7b7; background: rgba(16, 185, 129, 0.25); }

/* 3+ Cameras: Blinking BLUE / CYAN */
.bold-target-ping.blue-ping { border-color: #00f0ff; box-shadow: 0 0 15px #00f0ff; animation: rapidPing 0.8s ease-out infinite; }
.bold-target-circle.blue-circle { background: #00f0ff; box-shadow: 0 0 18px #00f0ff, 0 0 30px rgba(0, 240, 255, 0.9); }
.bold-target-tag.blue-tag { border-color: #00f0ff; color: #a5f3fc; background: rgba(0, 240, 255, 0.25); }

@keyframes rapidPing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ==========================================================================
   INTERACTIVE CAMERA EDITING MODE & POPUP CONTROLS
   ========================================================================== */
.editing-blink-ring {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #00f0ff;
  box-shadow: 0 0 15px #00f0ff, 0 0 25px rgba(0, 240, 255, 0.9);
  animation: editRingBlink 0.5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 5;
}

@keyframes editRingBlink {
  0% { transform: scale(0.85); opacity: 0.3; border-color: #ff0055; box-shadow: 0 0 8px #ff0055; }
  100% { transform: scale(1.35); opacity: 1; border-color: #00f0ff; box-shadow: 0 0 25px #00f0ff, 0 0 40px #00f0ff; }
}

.cam-popup-box {
  font-family: var(--font-sans);
  color: #0f172a;
  line-height: 1.4;
  padding: 4px;
  min-width: 250px;
}

.editing-guide-banner {
  background: #0f172a;
  color: #38bdf8;
  font-size: 0.72rem;
  padding: 6px 8px;
  border-radius: 4px;
  margin-top: 6px;
  margin-bottom: 8px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cam-popup-title {
  color: #1e3a8a;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cam-popup-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  padding: 1px 5px;
  border-radius: 4px;
}

.rotate-btn-group {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.btn-rotate {
  flex: 1;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  padding: 5px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-rotate:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.cam-popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.btn-cam-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cam-edit {
  background: #0284c7;
  color: #ffffff;
}
.btn-cam-edit:hover { background: #0369a1; }

.btn-cam-set {
  background: #10b981;
  color: #ffffff;
}
.btn-cam-set:hover { background: #059669; }

.btn-cam-del {
  background: #ef4444;
  color: #ffffff;
}
.btn-cam-del:hover { background: #dc2626; }

.azimuth-slider-box {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 8px;
  border-radius: 4px;
}

.azimuth-slider-box label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.azimuth-slider-input {
  width: 100%;
  accent-color: #0284c7;
  cursor: pointer;
}

/* Dynamic Zoom Scaling overrides for Leaflet markers */
.fr24-plane-marker {
  width: var(--plane-icon-size, 30px) !important;
  height: var(--plane-icon-size, 30px) !important;
  margin-left: calc(var(--plane-icon-size, 30px) / -2) !important;
  margin-top: calc(var(--plane-icon-size, 30px) / -2) !important;
}

.sim-bold-target-icon {
  width: var(--drone-icon-size, 36px) !important;
  height: var(--drone-icon-size, 36px) !important;
  margin-left: calc(var(--drone-icon-size, 36px) / -2) !important;
  margin-top: calc(var(--drone-icon-size, 36px) / -2) !important;
}

.custom-pixel-sensor-icon {
  width: var(--camera-icon-size, 44px) !important;
  height: var(--camera-icon-size, 44px) !important;
  margin-left: calc(var(--camera-icon-size, 44px) / -2) !important;
  margin-top: calc(var(--camera-icon-size, 44px) / -2) !important;
}

.fr24-plane-wrapper {
  width: var(--plane-icon-size, 30px) !important;
  height: var(--plane-icon-size, 30px) !important;
}

.bold-red-target-wrapper {
  width: var(--drone-icon-size, 36px) !important;
  height: var(--drone-icon-size, 36px) !important;
}

.sensor-node-wrapper {
  width: var(--camera-icon-size, 44px) !important;
  height: var(--camera-icon-size, 44px) !important;
}

