/* MISTER FAST LiveMapChat WEB V3.2.2
   Live Route & Vehicle Highlight — WEB only. */

/* Main pickup -> destination route: moving dashes, not hard blinking. */
#mf514Map .leaflet-overlay-pane svg path.mf-v31-route,
#mf514Map .leaflet-overlay-pane svg path.mf-v362-main-route,
#mf514Map .leaflet-overlay-pane svg path.mf-v3383-route,
#mf514Map .leaflet-overlay-pane svg path.mf-v322-route-active,
.mf514-map-pane .leaflet-overlay-pane svg path.mf-v31-route,
.mf514-map-pane .leaflet-overlay-pane svg path.mf-v362-main-route,
.mf514-map-pane .leaflet-overlay-pane svg path.mf-v3383-route,
.mf514-map-pane .leaflet-overlay-pane svg path.mf-v322-route-active {
  stroke: #003da5 !important;
  stroke-width: 6px !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 13 10 !important;
  animation: mf322RouteFlow 1.15s linear infinite, mf322RouteGlow 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(0,61,165,.46));
}

/* Driver -> pickup route remains green and has a slightly faster flow. */
#mf514Map .leaflet-overlay-pane svg path.mf-v362-driver-route,
.mf514-map-pane .leaflet-overlay-pane svg path.mf-v362-driver-route {
  stroke: #20a765 !important;
  stroke-width: 5px !important;
  stroke-dasharray: 10 9 !important;
  animation: mf322DriverRouteFlow .9s linear infinite, mf322DriverRouteGlow 1.55s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(32,167,101,.45));
}

@keyframes mf322RouteFlow {
  to { stroke-dashoffset: -46; }
}
@keyframes mf322DriverRouteFlow {
  to { stroke-dashoffset: -38; }
}
@keyframes mf322RouteGlow {
  0%,100% { opacity: .76; }
  50% { opacity: 1; }
}
@keyframes mf322DriverRouteGlow {
  0%,100% { opacity: .72; }
  50% { opacity: .98; }
}

/* Non-interactive pulse overlays. The existing functional markers remain untouched. */
.mf-v322-pulse-icon {
  background: transparent !important;
  border: 0 !important;
  pointer-events: none !important;
}
.mf-v322-pulse {
  --mf322-pulse-color: 255,196,0;
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translateZ(0);
}
.mf-v322-pulse::before,
.mf-v322-pulse::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 3px solid rgba(var(--mf322-pulse-color),.95);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.88), 0 0 12px rgba(var(--mf322-pulse-color),.42);
  animation: mf322PulseRing 1.35s ease-out infinite;
}
.mf-v322-pulse::after {
  animation-delay: .46s;
}
.mf-v322-pulse-core {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgb(var(--mf322-pulse-color));
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  font-size: 13px;
  line-height: 1;
}
.mf-v322-pulse.is-driver { --mf322-pulse-color: 255,196,0; }
.mf-v322-pulse.is-pickup { --mf322-pulse-color: 46,204,113; }
.mf-v322-pulse.is-dropoff { --mf322-pulse-color: 231,76,60; }
.mf-v322-pulse.is-driver .mf-v322-pulse-core {
  width: 24px;
  height: 24px;
  font-size: 16px;
  background: #ffc400;
}

@keyframes mf322PulseRing {
  0% { transform: scale(.42); opacity: .95; }
  58% { opacity: .48; }
  100% { transform: scale(1.72); opacity: 0; }
}

/* Make the selected native driver marker easier to spot when its engine exposes a selected class. */
#mf514Map .is-selected .mf-driver-marker,
#mf514Map .mf-driver-marker.is-selected,
#mf514Map .mf-v304-marker.is-selected,
#mf514Map .mf-v304-marker-selected {
  filter: drop-shadow(0 0 7px rgba(255,196,0,.9));
}

@media (prefers-reduced-motion: reduce) {
  #mf514Map .leaflet-overlay-pane svg path,
  .mf514-map-pane .leaflet-overlay-pane svg path,
  .mf-v322-pulse::before,
  .mf-v322-pulse::after {
    animation: none !important;
  }
  .mf-v322-pulse::before { transform: scale(1.05); opacity: .72; }
  .mf-v322-pulse::after { display: none; }
}
