﻿/* ============================================================
   MANZIL — Map Styles
   Premium controls · Custom markers · Route glow
   ============================================================ */

.maplibregl-map {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
}

/* ============================================================
   MARKERS
   ============================================================ */

.mz-marker {
  pointer-events: none;
}

/* PICKUP MARKER */
.mz-marker-pickup {
  width: 40px;
  height: 40px;
  position: relative;
  display: grid;
  place-items: center;
}

.mz-pin-pickup {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  animation: mzPinDrop 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mz-pin-pickup .mz-pin-dot {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--neon);
  border: 4px solid #FFFFFF;
  box-shadow:
    0 0 0 6px rgba(0, 229, 160, 0.25),
    0 4px 12px rgba(0, 229, 160, 0.5);
  animation: mzPickupPulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes mzPickupPulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(0, 229, 160, 0.25),
      0 4px 12px rgba(0, 229, 160, 0.5);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(0, 229, 160, 0.15),
      0 6px 16px rgba(0, 229, 160, 0.7);
  }
}

/* DROP MARKER */
.mz-marker-drop {
  width: 48px;
  height: 52px;
  position: relative;
  animation: mzPinDrop 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mz-pin-drop {
  position: relative;
  width: 48px;
  height: 48px;
  background: #0A0A0A;
  border-radius: 999px 999px 999px 4px;
  transform: rotate(-45deg);
  display: grid;
  place-items: center;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mz-pin-drop svg {
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
  stroke: #00E5A0;
  fill: none;
}

/* DRIVER CAR MARKER */
.mz-marker-driver {
  width: 44px;
  height: 44px;
  position: relative;
}

.mz-car {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--neon);
  display: grid;
  place-items: center;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 8px 20px rgba(0, 229, 160, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 300ms linear;
  will-change: transform;
}

.mz-car svg {
  width: 22px;
  height: 22px;
  stroke: #0A0A0A;
  fill: none;
}

/* USER DOT */
.mz-marker-user {
  width: 24px;
  height: 24px;
  position: relative;
  display: grid;
  place-items: center;
}

.mz-userdot {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #3B82F6;
  border: 3px solid #FFFFFF;
  box-shadow:
    0 4px 12px rgba(59, 130, 246, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.mz-userdot span {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.4);
  animation: userPulse 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: -1;
}

@keyframes userPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes mzPinDrop {
  0% { transform: scale(0.4) translateY(-20px); opacity: 0; }
  60% { transform: scale(1.05) translateY(2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ============================================================
   ZOOM CONTROLS — BRANDED
   ============================================================ */

.maplibregl-ctrl-group {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.maplibregl-ctrl-top-right {
  top: max(env(safe-area-inset-top), 16px);
  right: 16px;
}

.maplibregl-ctrl-group button {
  width: 44px !important;
  height: 44px !important;
  background: var(--white) !important;
  border: none !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
              background 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  -webkit-tap-highlight-color: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

.maplibregl-ctrl-group button + button {
  margin-top: 8px !important;
  border-top: none !important;
}

.maplibregl-ctrl-group button:hover {
  background: var(--elevated) !important;
}

.maplibregl-ctrl-group button:active {
  transform: scale(0.92) !important;
  background: var(--neon-soft) !important;
}

.maplibregl-ctrl-group button:active .maplibregl-ctrl-icon {
  filter: brightness(0.5) sepia(1) hue-rotate(110deg) saturate(3) !important;
}

.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: grayscale(1) brightness(0.3);
  transition: filter 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   ATTRIBUTION
   ============================================================ */

.maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(6px);
  font-size: 9px !important;
  border-radius: 999px !important;
  padding: 1px 8px !important;
  margin: 4px !important;
  opacity: 0.55;
  max-width: 60px;
  overflow: hidden;
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1),
              max-width 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.maplibregl-ctrl-attrib:hover,
.maplibregl-ctrl-attrib.maplibregl-compact-show {
  max-width: 100%;
  opacity: 1;
}

.maplibregl-ctrl-attrib a {
  color: #6E6E6E !important;
  text-decoration: none;
}

.maplibregl-ctrl-attrib-button {
  background-color: transparent !important;
  filter: opacity(0.5);
}

/* ============================================================
   POPUPS (unused but reserved)
   ============================================================ */

.maplibregl-popup {
  font-family: 'Manrope', sans-serif;
}

.maplibregl-popup-content {
  border-radius: 16px !important;
  padding: 12px 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  font-size: 13px;
  font-weight: 600;
}

.maplibregl-popup-tip {
  border-top-color: var(--white) !important;
  border-bottom-color: var(--white) !important;
}

/* ============================================================
   LEAFLET RESIDUE CLEANUP
   ============================================================ */

.leaflet-container {
  display: none !important;
}

/* ============================================================
   ROUTE LINE — PREMIUM GLOW
   Handled in map.js — but here for any extra polish
   ============================================================ */

/* Ensure route layers render above map but below markers */
.maplibregl-canvas {
  outline: none !important;
}

/* ============================================================
   RESPONSIVE — Mobile first
   ============================================================ */

@media (max-width: 400px) {
  .maplibregl-ctrl-group button {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
  }
  .maplibregl-ctrl-top-right {
    right: 12px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .mz-pin-pickup .mz-pin-dot,
  .mz-userdot span,
  .mz-car {
    animation: none !important;
    transition: none !important;
  }
}