/* FILE: assets/css/incident-map.css */

/* =========================
   POPUP WRAPPER
========================= */

.incident-map-popup {
  position: fixed;
  inset: 0;
  z-index: 99998;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;
}

.incident-map-popup.hidden {
  display: none !important;
}

/* =========================
   BACKDROP
========================= */

.incident-map-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(0,0,0,.74);
  backdrop-filter: blur(6px);
}

/* =========================
   PANEL
========================= */

.incident-map-panel {
  position: relative;
  z-index: 2;

  width: min(980px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));

  display: flex;
  flex-direction: column;
  overflow: hidden;

  border-radius: 18px;
  border: 1px solid rgba(47,129,247,.75);

  background:
    radial-gradient(circle at top, rgba(17,24,39,.98), rgba(5,7,10,.98));

  box-shadow:
    0 0 0 1px rgba(47,129,247,.16),
    0 0 18px rgba(47,129,247,.38),
    0 24px 70px rgba(0,0,0,.62);

  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* =========================
   CLOSE BUTTON
========================= */

.incident-map-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 20;

  width: 38px;
  height: 38px;

  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;

  background: rgba(255,59,48,.18);
  color: #ffffff;

  font-size: 28px;
  line-height: 1;
  font-weight: 900;

  cursor: pointer;
}

.incident-map-close:hover {
  background: rgba(255,59,48,.32);
}

/* =========================
   HEADER
========================= */

.incident-map-header {
  position: relative;

  padding: 18px 18px 16px;
  border-bottom: 0;
}

.incident-map-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;

  bottom: 0;
  height: 2px;

  background: linear-gradient(
    to right,
    transparent,
    rgba(47,129,247,.95),
    transparent
  );

  box-shadow:
    0 0 6px rgba(47,129,247,.85),
    0 0 12px rgba(47,129,247,.55);
}

.incident-map-header strong {
  display: block;
  margin-bottom: 4px;

  color: #ffffff;
  font-size: 20px;
  letter-spacing: .4px;

  text-shadow: 0 0 6px rgba(47,129,247,.45);
}

.incident-map-header small {
  color: #bcd4f5;
  font-size: 11px;
  letter-spacing: .5px;
}

/* =========================
   MAP AREA
========================= */

.incident-map {
  flex: 1;
  min-height: 300px;
  width: 100%;
}

/* =========================
   FOOT MESSAGE
========================= */

#incidentMapMsg,
.incident-map-panel .msg {
  padding: 10px 16px;
  border-top: 1px solid rgba(47,129,247,.45);

  color: var(--muted);
  font-size: 13px;

  box-shadow: 0 -6px 10px -10px rgba(47,129,247,.7);
}

/* =========================
   OPEN MAP BUTTON
========================= */

#openIncidentMap,
#openIncidentMapBtn,
.incident-map-open-btn,
.open-incident-map,
.open-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;

  border-radius: 10px;
  border: 1px solid rgba(47,129,247,.65);

  background: rgba(47,129,247,.22);
  color: #ffffff;

  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2px;
  text-decoration: none;

  box-shadow:
    inset 0 0 12px rgba(47,129,247,.12),
    0 0 10px rgba(47,129,247,.18);

  cursor: pointer;
  transition: .18s ease;
}

#openIncidentMap:hover,
#openIncidentMapBtn:hover,
.incident-map-open-btn:hover,
.open-incident-map:hover,
.open-map-btn:hover {
  background: rgba(47,129,247,.36);
  transform: translateY(-1px);

  box-shadow:
    inset 0 0 14px rgba(47,129,247,.18),
    0 0 14px rgba(47,129,247,.28);
}

/* =========================
   LEAFLET FIXES
========================= */

.leaflet-container {
  background: #0b1220;
  font-family: Arial, Helvetica, sans-serif;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
}

.leaflet-popup-content {
  margin: 12px 14px;
  line-height: 1.45;
  font-size: 13px;
}

.leaflet-popup-tip {
  background: #111827;
}

.leaflet-control-zoom a {
  background: #111827 !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.08) !important;
}

.leaflet-control-attribution {
  background: rgba(17,24,39,.72) !important;
  color: #cbd5e1 !important;
  font-size: 10px !important;
}

/* =========================
   LIVE MARKER PULSE
========================= */

.live-marker-pulse {
  animation: liveMarkerPulse 1.2s ease-in-out infinite;
}

@keyframes liveMarkerPulse {
  0%,100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.12);
    opacity: .82;
  }

}
}