/**
 * Sigma — tech pulsing map markers (dashboard + live location)
 */

.sd-map-marker-icon {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

.sd-map-marker-icon.sigma-live-marker-wrap,
.sigma-live-marker-wrap.sd-map-marker-icon {
  cursor: pointer;
}

.sd-panel-body--map .leaflet-marker-pane .sd-map-marker-icon,
.sigma-live-loc-layout .leaflet-marker-pane .sd-map-marker-icon {
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.28));
}

.sd-map-marker-wrap {
  position: relative;
  width: 44px;
  height: 52px;
  pointer-events: none;
}

.sd-map-marker-orbit {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 38px;
  height: 38px;
  margin-left: -19px;
  border: 1px dashed currentColor;
  border-radius: 50%;
  opacity: 0.85;
  animation: sd-map-orbit-spin 5s linear infinite;
}

.sd-map-marker-pulse {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow: 0 0 10px currentColor;
  opacity: 0;
  animation: sd-map-pulse-ring 2.2s ease-out infinite;
}

.sd-map-marker-pulse--b {
  animation-delay: 1.1s;
}

.sd-map-marker-core {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sd-map-marker-hex {
  width: 22px;
  height: 22px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: linear-gradient(145deg, var(--sd-marker-core-a, #22d3ee) 0%, var(--sd-marker-core-b, #0284c7) 100%);
  box-shadow:
    0 0 16px var(--sd-marker-glow, rgba(34, 211, 238, 0.85)),
    inset 0 0 10px rgba(255, 255, 255, 0.28);
  animation: sd-map-core-glow 1.6s ease-in-out infinite;
  overflow: hidden;
}

.sd-map-marker-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sd-map-marker-wrap.has-photo .sd-map-marker-hex {
  background: transparent;
  box-shadow:
    0 0 16px var(--sd-marker-glow, rgba(34, 211, 238, 0.85)),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sd-map-marker-wrap.has-photo .sd-map-marker-dot {
  display: none;
}

.sd-map-marker-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95);
  animation: sd-map-dot-blink 1.6s ease-in-out infinite;
}

.sd-map-marker-pin {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  background: linear-gradient(180deg, var(--sd-marker-glow, rgba(34, 211, 238, 0.9)) 0%, transparent 100%);
  box-shadow: 0 0 8px var(--sd-marker-glow, rgba(34, 211, 238, 0.75));
}

/* Freshness tone */
.sd-map-marker-wrap--live {
  color: rgba(34, 211, 238, 0.78);
  --sd-marker-core-a: #67e8f9;
  --sd-marker-core-b: #0891b2;
  --sd-marker-glow: rgba(34, 211, 238, 0.9);
}

.sd-map-marker-wrap--warn {
  color: rgba(251, 191, 36, 0.82);
  --sd-marker-core-a: #fde68a;
  --sd-marker-core-b: #d97706;
  --sd-marker-glow: rgba(245, 158, 11, 0.88);
}

.sd-map-marker-wrap--warn .sd-map-marker-orbit {
  animation-duration: 3.5s;
}

.sd-map-marker-wrap--off {
  color: rgba(100, 116, 139, 0.65);
  --sd-marker-core-a: #94a3b8;
  --sd-marker-core-b: #475569;
  --sd-marker-glow: rgba(100, 116, 139, 0.55);
}

.sd-map-marker-wrap--off .sd-map-marker-orbit {
  animation-duration: 9s;
  opacity: 0.55;
}

.sd-map-marker-wrap--off .sd-map-marker-pulse {
  animation-duration: 3.2s;
}

.sd-map-marker-wrap--off .sd-map-marker-dot {
  animation: none;
  opacity: 0.65;
}

/* Work-nature ring colors (live location screen) */
.sd-map-marker-wrap--ring-red {
  color: rgba(248, 113, 113, 0.78);
  --sd-marker-core-a: #fca5a5;
  --sd-marker-core-b: #dc2626;
  --sd-marker-glow: rgba(220, 38, 38, 0.9);
}

.sd-map-marker-wrap--ring-blue {
  color: rgba(96, 165, 250, 0.78);
  --sd-marker-core-a: #93c5fd;
  --sd-marker-core-b: #2563eb;
  --sd-marker-glow: rgba(37, 99, 235, 0.9);
}

.sd-map-marker-wrap--ring-green {
  color: rgba(74, 222, 128, 0.78);
  --sd-marker-core-a: #86efac;
  --sd-marker-core-b: #16a34a;
  --sd-marker-glow: rgba(22, 163, 74, 0.88);
}

.sd-map-marker-wrap--ring-neutral {
  color: rgba(148, 163, 184, 0.65);
  --sd-marker-core-a: #cbd5e1;
  --sd-marker-core-b: #64748b;
  --sd-marker-glow: rgba(100, 116, 139, 0.55);
}

@keyframes sd-map-pulse-ring {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@keyframes sd-map-orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes sd-map-core-glow {
  0%, 100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.18);
    transform: scale(1.06);
  }
}

@keyframes sd-map-dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}
