/* Leaflet overrides — recolour standard OSM tiles into a dark HUD map and
   restyle markers/popups/clusters to match the dashboard theme. */

.leaflet-container {
  background: #04070a;
  font-family: var(--font-mono);
}

.leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.95) saturate(0.6);
}

.leaflet-control-zoom {
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius) !important;
}

.leaflet-control-zoom a {
  background: rgba(10, 14, 20, 0.9) !important;
  color: var(--accent) !important;
  border-bottom: 1px solid var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--panel-alt) !important;
}

.leaflet-control-attribution {
  background: rgba(10, 14, 20, 0.75) !important;
  color: var(--text-faint) !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a {
  color: var(--text-dim) !important;
}

/* Article location markers */

.wid-marker {
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 6px var(--marker-color, var(--accent));
}

.wid-marker.subject {
  animation: wid-pulse 2.2s ease-out infinite;
}

@keyframes wid-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--marker-color, var(--accent)) 55%, transparent);
  }
  70% {
    box-shadow: 0 0 0 12px color-mix(in srgb, var(--marker-color, var(--accent)) 0%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--marker-color, var(--accent)) 0%, transparent);
  }
}

.wid-marker.secondary {
  opacity: 0.7;
}

.marker-cluster {
  background: rgba(10, 14, 20, 0.7) !important;
}

.marker-cluster div {
  background: rgba(79, 216, 232, 0.25) !important;
  color: var(--text) !important;
  font-family: var(--font-mono) !important;
  font-weight: 600;
  border: 1px solid var(--accent) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--panel-alt) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
  background: var(--panel-alt) !important;
}

.wid-popup-title {
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 4px;
  cursor: pointer;
}

.wid-popup-title:hover {
  color: var(--accent);
}

.wid-popup-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
