/* Interactive E-Map Dynamic FOV & Alarm Blinking Styles */
.emap-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 550px;
  background-color: #0b0f19;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #1e293b;
  user-select: none;
}

.emap-background-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.85;
}

.emap-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* FOV Cones */
.fov-cone {
  transition: fill 0.3s ease, stroke 0.3s ease;
  cursor: pointer;
}

.fov-cone-normal {
  fill: rgba(0, 230, 118, 0.18);
  stroke: rgba(0, 230, 118, 0.6);
  stroke-width: 1.5;
}

.fov-cone-normal:hover {
  fill: rgba(0, 230, 118, 0.3);
  stroke: rgba(0, 230, 118, 0.9);
}

.fov-cone-motion {
  fill: rgba(255, 214, 0, 0.25);
  stroke: rgba(255, 214, 0, 0.8);
  stroke-width: 2;
}

.fov-cone-alarm {
  fill: rgba(255, 23, 68, 0.35);
  stroke: rgba(255, 23, 68, 0.95);
  stroke-width: 2.5;
  animation: fovPulseAlarm 1.2s infinite ease-in-out;
}

@keyframes fovPulseAlarm {
  0% {
    fill: rgba(255, 23, 68, 0.2);
    stroke-width: 2;
  }
  50% {
    fill: rgba(255, 23, 68, 0.5);
    stroke-width: 4;
  }
  100% {
    fill: rgba(255, 23, 68, 0.2);
    stroke-width: 2;
  }
}

/* Camera Node Markers */
.camera-node-marker {
  cursor: grab;
}

.camera-node-marker:active {
  cursor: grabbing;
}

.camera-marker-circle {
  fill: #0f172a;
  stroke: #38bdf8;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.camera-marker-circle.alarm {
  stroke: #ff1744;
  fill: #450a0a;
  animation: markerAlarmPulse 1s infinite alternate;
}

@keyframes markerAlarmPulse {
  from { r: 12; filter: drop-shadow(0 0 2px #ff1744); }
  to { r: 15; filter: drop-shadow(0 0 10px #ff1744); }
}

.camera-marker-label {
  fill: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

/* Live Popover Video */
.emap-popover {
  position: absolute;
  width: 320px;
  background: #0f172a;
  border: 1px solid #38bdf8;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  overflow: hidden;
}

.emap-popover-header {
  background: #1e293b;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.emap-popover video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}
