/* ============================================================
   World Map - D3 Aitoff Projection
   Matches celestial map for visual unity
   ============================================================ */

.world-map-aitoff {
  display: block;
}

/* Ocean / Sphere */
.world-map-aitoff .ocean .sphere {
  fill: #0a1628;
}

/* Land / Countries */
.world-map-aitoff .land .country {
  fill: #1e4d4d;
  stroke: #2dd4bf;
  stroke-width: 0.4;
  stroke-opacity: 0.5;
  transition: fill 0.2s ease;
}

.world-map-aitoff .land .country:hover {
  fill: #2a6363;
}

/* Grid / Graticule */
.world-map-aitoff .grid .graticule {
  fill: none;
  stroke: #22d3ee;
  stroke-opacity: 0.1;
  stroke-width: 0.3;
}

.world-map-aitoff .grid .equator {
  fill: none;
  stroke: #6fe3a3;
  stroke-opacity: 0.25;
  stroke-width: 0.6;
}

.world-map-aitoff .grid .prime-meridian {
  fill: none;
  stroke: #6fe3a3;
  stroke-opacity: 0.18;
  stroke-width: 0.5;
}

.world-map-aitoff .grid .boundary {
  fill: none;
  stroke: #22d3ee;
  stroke-opacity: 0.3;
  stroke-width: 1;
}

/* Station markers */
.station-marker {
  cursor: pointer;
  pointer-events: auto;
}

.station-marker .marker-dot {
  fill: #4a5568;
  stroke: #1a202c;
  stroke-width: 1;
  transition: all 0.2s ease;
}

/* ============================================================
   Signal Status Colors - Matching UI Status Display
   Colors from layout.css drift-status classes
   ============================================================ */

/* NOISE: Gray - no significant signal (#7f8b99) */
.station-marker.signal-noise .marker-dot {
  fill: #7f8b99;
  stroke: none;
  filter: drop-shadow(0 0 2px rgba(127, 139, 153, 0.4));
}

.station-marker.signal-noise .pulse-ring {
  opacity: 0;
  animation: none;
}

/* RFI: Red - interference detected (#d94a4a) */
.station-marker.signal-rfi .marker-dot {
  fill: #d94a4a;
  stroke: none;
  filter: drop-shadow(0 0 3px rgba(217, 74, 74, 0.5));
}

.station-marker.signal-rfi .pulse-ring {
  opacity: 0;
  animation: none;
}

/* ETI CANDIDATE: Green - potential signal! (#6fe3a3) - BLINK */
.station-marker.signal-eti .marker-dot {
  fill: #6fe3a3;
  stroke: none;
  filter: drop-shadow(0 0 4px rgba(111, 227, 163, 0.6));
  animation: blink-eti 0.8s ease-in-out infinite;
}

.station-marker.signal-eti .pulse-ring {
  opacity: 0;
  animation: none;
}

/* OFFLINE: Dark gray - disconnected */
.station-marker.offline .marker-dot {
  fill: #3a3f47;
  stroke: none;
  filter: none;
}

.station-marker.offline .pulse-ring {
  opacity: 0;
  animation: none;
}

/* Legacy online class - fallback to noise */
.station-marker.online .marker-dot {
  fill: #7f8b99;
  stroke: none;
  filter: drop-shadow(0 0 2px rgba(127, 139, 153, 0.4));
}

/* Selected state - bright highlight */
.station-marker.selected .marker-dot {
  stroke: #fff !important;
  stroke-width: 2 !important;
}

.station-marker.selected .pulse-ring {
  opacity: 0;
  animation: none;
}

/* ============================================================
   Animations - Gentle, matching UI style
   ============================================================ */

.station-marker .pulse-ring {
  fill: none;
  stroke-width: 1;
  opacity: 0;
}

/* ETI: Fast blink - only for candidate signals */
@keyframes blink-eti {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes pulse-expand {
  0% { r: 6; opacity: 0.5; }
  100% { r: 30; opacity: 0; }
}

/* Station label */
.station-marker .station-label {
  font-size: 9px;
  font-family: 'IBM Plex Mono', monospace;
  fill: #e2e8f0;
  text-anchor: middle;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.station-marker:hover .station-label,
.station-marker.selected .station-label {
  opacity: 1;
}


/* ============================================================
   RESPONSIVE: Mobile
   ============================================================ */

@media screen and (max-width: 768px) {
  .station-marker .station-label {
    font-size: 8px;
  }

  .world-map-aitoff .land .country {
    stroke-width: 0.3;
  }

  .world-map-aitoff .grid .graticule {
    stroke-width: 0.2;
  }
}

@media screen and (max-width: 480px) {
  .station-marker .station-label {
    font-size: 7px;
  }

  /* Touch-friendly: always show labels on mobile */
  .station-marker.online .station-label,
  .station-marker.selected .station-label {
    opacity: 0.8;
  }
}
