/* ============================================================
   MERCER WORLDWIDE WAR ROOM — MAP STYLES (Leaflet)
   ============================================================ */

/* ===== MAP CONTAINER ===== */
.map-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #080e14;
  border-radius: 2px;
}

#leaflet-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  z-index: 1;
  background: #080e14;
}

.panel-map .panel-body {
  position: relative;
  height: 100%;
}

/* ===== DARK GREEN MILITARY TINT ON TILES ===== */
#leaflet-map .leaflet-tile-pane {
  filter: sepia(0.3) hue-rotate(90deg) saturate(0.6) brightness(0.7);
}

/* ===== LEAFLET UI OVERRIDES ===== */
.leaflet-control-zoom {
  display: none !important;  /* We use our own controls */
}

.leaflet-control-attribution {
  display: none !important;
}

/* ===== MAP OVERLAY LABEL ===== */
.map-overlay-label {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-terminal);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 1000;
}

/* ===== MERCER WORLDWIDE DIAGONAL WATERMARK ===== */
.map-container::after {
  content: 'MERCER WORLDWIDE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(0, 255, 65, 0.03);
  letter-spacing: 12px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1001;
  user-select: none;
}

/* ===== CUSTOM MARKER ICONS ===== */
.war-marker-critical {
  background: #ff0040;
  border: 2px solid #ff0040;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff0040, 0 0 16px rgba(255, 0, 64, 0.4);
  animation: pulse-marker 2s ease-in-out infinite;
}

.war-marker-warning {
  background: #ffaa00;
  border: 2px solid #ffaa00;
  border-radius: 50%;
  box-shadow: 0 0 8px #ffaa00, 0 0 12px rgba(255, 170, 0, 0.3);
  animation: pulse-marker 2.5s ease-in-out infinite;
}

.war-marker-info {
  background: #00e5ff;
  border: 2px solid #00e5ff;
  border-radius: 50%;
  box-shadow: 0 0 6px #00e5ff;
}

.war-marker-base {
  background: #0066ff;
  border: 2px solid #0066ff;
  border-radius: 50%;
  box-shadow: 0 0 6px #0066ff, 0 0 10px rgba(0, 102, 255, 0.3);
}

.war-marker-carrier {
  background: #0066ff;
  border: 3px solid rgba(0, 102, 255, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 10px #0066ff, 0 0 20px rgba(0, 102, 255, 0.4);
  animation: pulse-marker 2s ease-in-out infinite;
}

/* ===== PULSE RING ON CRITICAL MARKERS ===== */
.war-marker-critical::after,
.war-marker-carrier::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid currentColor;
  transform: translate(-50%, -50%);
  animation: marker-ring 2s ease-out infinite;
  pointer-events: none;
}

.war-marker-critical::after {
  border-color: #ff0040;
}

.war-marker-carrier::after {
  border-color: #0066ff;
}

@keyframes pulse-marker {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes marker-ring {
  0% { width: 100%; height: 100%; opacity: 0.8; }
  100% { width: 350%; height: 350%; opacity: 0; }
}

/* ===== LEAFLET POPUP OVERRIDES ===== */
.leaflet-popup-content-wrapper {
  background: rgba(10, 18, 26, 0.95) !important;
  border: 1px solid rgba(0, 255, 65, 0.25) !important;
  border-radius: 2px !important;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6), 0 0 6px rgba(0, 255, 65, 0.1) !important;
}

.leaflet-popup-content {
  font-family: var(--font-body) !important;
  font-size: 0.7rem !important;
  color: #c0c0c0 !important;
  margin: 8px 12px !important;
  line-height: 1.5 !important;
}

.leaflet-popup-tip {
  background: rgba(10, 18, 26, 0.95) !important;
  border: 1px solid rgba(0, 255, 65, 0.25) !important;
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  color: rgba(0, 255, 65, 0.6) !important;
  font-size: 16px !important;
}

.leaflet-popup-close-button:hover {
  color: #00ff41 !important;
}

.popup-title {
  font-family: var(--font-terminal);
  font-size: 0.7rem;
  color: #00ff41;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  padding-bottom: 4px;
}

.popup-title-critical { color: #ff0040; }
.popup-title-warning { color: #ffaa00; }
.popup-title-base { color: #0066ff; }

.popup-detail {
  font-size: 0.65rem;
  color: #888;
}

.popup-type {
  display: inline-block;
  font-family: var(--font-terminal);
  font-size: 0.5rem;
  padding: 1px 6px;
  border-radius: 2px;
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.popup-type-critical {
  background: rgba(255, 0, 64, 0.15);
  color: #ff0040;
  border: 1px solid rgba(255, 0, 64, 0.3);
}

.popup-type-warning {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.popup-type-info {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.popup-type-base {
  background: rgba(0, 102, 255, 0.15);
  color: #0066ff;
  border: 1px solid rgba(0, 102, 255, 0.3);
}

/* ===== PERMANENT LABELS ===== */
.leaflet-tooltip.war-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-family: var(--font-terminal) !important;
  font-size: 9px !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  padding: 0 !important;
  white-space: nowrap !important;
  text-shadow: 0 0 4px rgba(0, 0, 0, 1), 0 0 8px rgba(0, 0, 0, 0.8) !important;
}

.leaflet-tooltip.war-label::before {
  display: none !important;
}

.war-label-critical { color: #ff0040 !important; font-weight: bold !important; }
.war-label-warning { color: #ffaa00 !important; }
.war-label-info { color: #00e5ff !important; }
.war-label-base { color: #0066ff !important; font-size: 7px !important; }
.war-label-carrier { color: #4488ff !important; font-size: 8px !important; }
.war-label-water {
  color: rgba(0, 229, 255, 0.25) !important;
  font-size: 8px !important;
  letter-spacing: 4px !important;
  font-style: italic !important;
}

/* ===== MAP PAN/ZOOM CONTROLS ===== */
.map-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  align-items: flex-start;
  z-index: 1002;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 260px;
}

.map-zoom-btn {
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-terminal);
  font-size: 0.55rem;
  letter-spacing: 1px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  line-height: 1;
}

.map-zoom-btn:hover {
  background: rgba(0, 255, 65, 0.12);
  border-color: var(--text-primary);
  box-shadow: 0 0 6px rgba(0, 255, 65, 0.2);
}

.map-zoom-btn.active {
  background: rgba(0, 255, 65, 0.18);
  border-color: var(--text-primary);
  color: #fff;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.3);
}

.map-zoom-btns {
  display: flex;
  gap: 3px;
}

.map-zoom-in,
.map-zoom-out,
.map-zoom-reset {
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-family: var(--font-body);
}

/* ===== MAP LEGEND ===== */
.map-legend {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1002;
  pointer-events: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-terminal);
  font-size: 0.45rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.legend-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot-red { background: #ff0040; }
.legend-dot-amber { background: #ffaa00; }
.legend-dot-blue { background: #0066ff; }
.legend-dot-cyan { background: #00e5ff; }

/* ===== MAP COORDINATES OVERLAY ===== */
.map-coords {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-family: var(--font-terminal);
  font-size: 0.5rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 1002;
}
