/* Loading & Floating Indicators */
.map-overlay-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(5px);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(6, 182, 212, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.floating-indicator {
  position: absolute;
  top: 20px;
  left: 460px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-heading);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.floating-indicator i {
  color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Helper Utilities */
.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* Custom Marker Pins */
.custom-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 4px;
  border-radius: 17px;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  border: 2px solid #ffffff;
  white-space: nowrap;
}

/* Stop Number Badge Pill on Active Route Pins */
.stop-number-pill {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #38bdf8;
  color: #0b0f19;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 10px;
  border: 2px solid #080c14;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  line-height: 1;
  z-index: 10;
}

.pin-origin {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.8);
  font-size: 13px;
}

/* Active Charging Stop Highlight Pin (Bright Amber/Gold Border & Pulsing Halo) */
.pin-active-stop {
  width: 40px !important;
  height: 40px !important;
  border: 3px solid #fbbf24 !important; /* Bright Gold / Amber Border */
  box-shadow:
    0 0 0 5px rgba(251, 191, 36, 0.45),
    0 0 25px rgba(251, 191, 36, 0.95) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  z-index: 99999 !important;
  animation: pulseActiveGold 1.8s infinite ease-in-out;
}

@keyframes pulseActiveGold {
  0% {
    box-shadow:
      0 0 0 3px #fbbf24,
      0 0 14px rgba(251, 191, 36, 0.8);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(251, 191, 36, 0.25),
      0 0 32px rgba(251, 191, 36, 1);
    transform: scale(1.16);
  }
  100% {
    box-shadow:
      0 0 0 3px #fbbf24,
      0 0 14px rgba(251, 191, 36, 0.8);
    transform: scale(1);
  }
}

/* Sidebar Timeline Mouseover Map Marker Bounce Highlight */
.pin-hover-highlight {
  width: 48px !important;
  height: 48px !important;
  border: 4px solid #38bdf8 !important; /* Bright Cyan Halo */
  box-shadow:
    0 0 0 10px rgba(56, 189, 248, 0.5),
    0 0 35px rgba(56, 189, 248, 1) !important;
  z-index: 100000 !important;
  animation: bounceHighlight 0.6s infinite alternate cubic-bezier(0.36, 0, 0.66, -0.56);
}

@keyframes bounceHighlight {
  0% {
    transform: scale(1.2) translateY(0);
  }
  100% {
    transform: scale(1.35) translateY(-10px);
  }
}

.clickable-detour:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Sidebar Timeline Card Focus Glow Effect */
.timeline-card-highlight {
  border-color: #38bdf8 !important;
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.4),
    0 6px 24px rgba(56, 189, 248, 0.3) !important;
  animation: timelineCardFlash 0.6s ease-in-out 2 alternate;
}

@keyframes timelineCardFlash {
  0% {
    transform: scale(1);
    background-color: var(--card-bg);
  }
  100% {
    transform: scale(1.03);
    background-color: rgba(56, 189, 248, 0.18);
  }
}

.pin-destination {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
  font-size: 13px;
}

.pin-charger {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
}

.pin-candidate {
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8) !important;
}

.pin-cached {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-egat {
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.85);
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.pin-backen {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.85);
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.pin-closed {
  background: linear-gradient(135deg, #64748b, #334155);
  border-color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.6);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-nissan {
  background: linear-gradient(135deg, #c026d3, #701a75);
  box-shadow: 0 0 14px rgba(192, 38, 211, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-pea {
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-ptt {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-tesla {
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-shell {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.85);
  color: #000;
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-shop {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-mea {
  background: linear-gradient(135deg, #f97316, #c2410c);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-sharge {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-evolt {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-ea {
  background: linear-gradient(135deg, #84cc16, #4d7c0f);
  box-shadow: 0 0 14px rgba(132, 204, 22, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-mg {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-rever {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-pupa {
  background: linear-gradient(135deg, #ec4899, #be185d);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-onecharge {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-ginka {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-altervim {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-igreen {
  background: linear-gradient(135deg, #22c55e, #15803d);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-onion {
  background: linear-gradient(135deg, #eab308, #a16207);
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.pin-spark {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.85);
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.brand-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.brand-expand-btn:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
}

.btn-inline-preset {
  font-size: 0.73rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-inline-preset:hover {
  background: #10b981;
  color: #000;
  border-color: #10b981;
}

