/* ─── Map View ─────────────────────────────────────────── */
.map-page {
  position: fixed;
  top: 60px;   /* below nav — toolbar is 60px tall */
  left: 0; right: 0;
  bottom: 0; /* fill to bottom edge — dock overlays on top */
  z-index: 1;
  /* Override page transition opacity so map stays visible */
  opacity: 1 !important;
}
@media (max-width: 768px) {
  .map-page { top: calc(60px + env(safe-area-inset-top, 0px)); bottom: 0; }
}
/* Ensure #app doesn't clip the fixed-position map */
#app:has(.map-page) {
  overflow: visible;
  min-height: auto;
}
/* CRITICAL: Neutralize page transition transform when map is showing.
   CSS transform on #app creates a new containing block which breaks
   position:fixed on .map-page — Leaflet gets wrong container dimensions
   and the map renders as a blank page with the location dot at the top.
   Use a near-instant duration so animationend still fires (needed for
   the router to clean up the class), but the transform is never visible. */
#app.page-enter:has(.map-page),
#app.page-exit:has(.map-page) {
  animation-duration: 0.001s !important;
}

/* ─── Map container ────────────────────────────────────── */
.map-container {
  width: 100%;
  height: 100%;
  background: #0a0e1a;
}

/* Kill Leaflet's default white/gray background everywhere —
   so unloaded tiles blend into the dark UI instead of flashing white */
.map-container.leaflet-container,
.map-page .leaflet-container {
  background: #0a0e1a !important;
}
.map-page .leaflet-tile-pane {
  /* No white tile placeholder flash */
  background: transparent !important;
}
/* Unloaded tiles: invisible instead of white squares */
.map-page .leaflet-tile {
  background: transparent !important;
}
/* Keep old zoom tiles visible longer so you never see black gaps */
.map-page .leaflet-tile-pane .leaflet-layer {
  will-change: auto !important;     /* reduce GPU layers = less memory on mobile */
}
/* Fade tiles in once loaded for smoother feel */
.map-page .leaflet-tile-loaded {
  animation: map-tile-in 0.25s ease;
}
@keyframes map-tile-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* During zoom, keep the previous zoom's tiles visible until new ones load */
.map-page .leaflet-zoom-anim .leaflet-tile {
  visibility: visible !important;
}

/* ─── Top overlay with filter chips ────────────────────── */
.map-top-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 600;
  padding: 8px 12px 14px;
  background: linear-gradient(to bottom, rgba(11,13,16,0.85) 0%, rgba(11,13,16,0.55) 60%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.map-top-overlay > * { pointer-events: auto; }
.map-chip-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.map-chip-strip::-webkit-scrollbar { display: none; }
.map-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.07);
  color: var(--muted, #8b949e);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  /* No backdrop-filter on chips — parent .map-top-overlay has opaque gradient */
}
.map-chip:active { transform: scale(0.95); }
.map-chip--active {
  background: linear-gradient(135deg, rgba(255,179,71,0.2), rgba(196,113,237,0.2));
  color: var(--text, #e8e6f0);
  border-color: rgba(255,179,71,0.3);
}

/* ─── Search row (pill + legend button) ───────────────── */
.map-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.map-search-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 40px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted, #6b6b8a);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.map-search-pill:focus-within {
  border-color: rgba(255,179,71,0.35);
}
.map-search-pill svg {
  flex-shrink: 0;
  opacity: 0.5;
}
.map-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text, #e8e6f0);
  font-size: 14px;
  font-family: inherit;
}
.map-search-input::placeholder {
  color: var(--muted, #6b6b8a);
  opacity: 0.7;
}

/* ─── Legend button + card ─────────────────────────────── */
.map-legend-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--muted, #6b6b8a);
  cursor: pointer;
  transition: all 0.2s ease;
}
.map-legend-btn:hover {
  background: rgba(255,255,255,0.14);
}
.map-legend-btn:active {
  transform: scale(0.92);
}
.map-legend-card {
  position: absolute;
  top: 84px;
  right: 14px;
  z-index: 650;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 190px;
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.map-legend-card--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.map-legend-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #e8e6f0);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted, #6b6b8a);
}
.map-legend-item:last-child {
  margin-bottom: 0;
}
.map-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid;
}
.map-legend-friends {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ─── Standalone legend toggle button (top-right) ────── */
.map-legend-toggle {
  position: absolute;
  top: 48px;
  right: 14px;
  z-index: 700;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(15, 18, 30, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted, #6b6b8a);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.map-legend-toggle:hover {
  background: rgba(25, 28, 45, 0.95);
  color: var(--text, #e8e6f0);
}
.map-legend-toggle:active {
  transform: scale(0.92);
}

/* Override Leaflet zoom control styling */
.map-page .leaflet-control-zoom {
  border: none !important;
  position: absolute !important;
  top: 108px !important;
  left: 14px !important;
  right: auto !important;
  margin: 0 !important;
}
.map-page .leaflet-control-zoom a {
  background: rgba(15, 18, 30, 0.85) !important;
  color: var(--text, #e8e6f0) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 30px !important;
  font-size: 16px !important;
}
.map-page .leaflet-control-zoom a:hover {
  background: rgba(25, 28, 45, 0.95) !important;
}

/* Attribution */
.map-page .leaflet-control-attribution {
  background: transparent !important;
  color: rgba(255,255,255,0.2) !important;
  font-size: 9px !important;
  padding: 2px 6px !important;
}
.map-page .leaflet-control-attribution a {
  color: rgba(255,255,255,0.3) !important;
}

/* ─── User location marker — iOS-accurate blue dot ───── */
/* iOS Maps uses #007AFF — exact Apple system blue */
.map-user-marker { background: none !important; border: none !important; }
.map-user-dot {
  width: 14px; height: 14px;
  background: #007AFF;
  border: 2.5px solid #fff;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 6px rgba(0, 122, 255, 0.5);
}
/* Three staggered sonar rings for radar/sonar feel */
.map-sonar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 122, 255, 0.5);
  background: transparent;
  pointer-events: none;
}
.map-sonar-ring--1 {
  top: -18px; left: -18px;
  width: 50px; height: 50px;
  animation: map-sonar 3s ease-out infinite;
}
.map-sonar-ring--2 {
  top: -18px; left: -18px;
  width: 50px; height: 50px;
  animation: map-sonar 3s ease-out 1s infinite;
}
.map-sonar-ring--3 {
  top: -18px; left: -18px;
  width: 50px; height: 50px;
  animation: map-sonar 3s ease-out 2s infinite;
}
/* Soft glow behind the dot — iOS-accurate blue */
.map-user-glow {
  position: absolute;
  top: -6px; left: -6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,122,255,0.35) 0%, transparent 70%);
  z-index: 1;
  animation: map-glow-breathe 2.5s ease-in-out infinite;
}
@keyframes map-sonar {
  0%   { transform: scale(0.4); opacity: 0.7; }
  70%  { opacity: 0.15; }
  100% { transform: scale(3.5); opacity: 0; }
}
@keyframes map-glow-breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.4); opacity: 1; }
}

/* ─── Emoji circle markers ─────────────────────────────── */
.map-marker-emoji { background: none !important; border: none !important; }
.map-emoji-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.85);
  border: 2px solid #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.map-emoji-circle:hover {
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* ─── Dot markers (zoomed out) — star-like points ────────── */
.map-marker-dot {
  background: none !important;
  border: none !important;
  /* Center the tiny dot inside the larger tap target */
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.map-dot {
  border-radius: 50%;
  opacity: 0.9;
}

/* ─── Locate me button ─────────────────────────────────── */
.map-locate-btn {
  position: absolute;
  top: 56px;
  left: 14px;
  z-index: 700;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(15, 18, 30, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text, #e8e6f0);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.map-locate-btn:hover { background: rgba(25, 28, 45, 0.95); }
.map-locate-btn:active { transform: scale(0.92); }
.map-locate-active { color: #007AFF; border-color: rgba(0, 122, 255, 0.4); box-shadow: 0 0 12px rgba(0,122,255,0.2); }
.map-locate-loading { animation: map-locate-spin 1s linear infinite; }
@keyframes map-locate-spin { to { transform: rotate(360deg); } }
.map-locate-error { color: #f43f5e; border-color: rgba(244, 63, 94, 0.3); }

/* ─── Event card handle pill ──────────────────────────── */
.map-card-pill {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
}

/* ─── Event card (single event) ────────────────────────── */
.map-event-card {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 14, 26, 0.97);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px 16px 0 0;
  z-index: 900;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 55vh;
  overflow: hidden;
}
.map-event-card--hidden { transform: translateY(100%); pointer-events: none; visibility: hidden; }
.map-event-card--visible { transform: translateY(0); pointer-events: auto; visibility: visible; }

.map-event-card-handle {
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
  cursor: grab;
}
.map-event-card-close {
  position: absolute;
  top: 10px; right: 14px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text, #e8e6f0);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.map-event-card-close:hover { background: rgba(255,255,255,0.15); }

.map-event-card-content {
  overflow-y: auto;
  max-height: calc(55vh - 40px);
  -webkit-overflow-scrolling: touch;
}

/* Card hero image */
.map-card-hero {
  width: 100%;
  height: 140px;
  position: relative;
  border-radius: 0;
}
.map-card-hero-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50px;
  background: linear-gradient(transparent, rgba(10, 14, 26, 0.95));
}
.map-card-body {
  padding: 12px 16px 20px;
  position: relative;
}
.map-card-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.map-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text, #e8e6f0);
  line-height: 1.25;
  margin-bottom: 6px;
}
.map-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--muted, #6b6b8a);
  margin-bottom: 10px;
}
.map-card-social {
  display: flex;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 14px;
}
.map-card-going { color: #10b981; font-weight: 600; }
.map-card-interested { color: #f59e0b; font-weight: 600; }

.map-card-view-btn {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.map-card-view-btn:hover { background: rgba(139, 92, 246, 0.25); }

/* ─── Full event overlay ───────────────────────────────── */
.map-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 5000;
}
.map-overlay--hidden { display: none; }
.map-overlay--visible { display: block; }
.map-overlay--visible .map-overlay-panel {
  animation: map-overlay-in 0.3s ease forwards;
}
.map-overlay--exit .map-overlay-panel {
  animation: map-overlay-out 0.3s ease forwards;
}

@keyframes map-overlay-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes map-overlay-out {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

.map-overlay-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.map-overlay-panel {
  position: absolute;
  top: 48px; left: 0; right: 0; bottom: 0;
  background: var(--bg, #0a0e1a);
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.map-overlay-close {
  position: fixed;
  top: 56px; right: 14px;
  z-index: 5001;
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.map-overlay-close:hover { background: rgba(0,0,0,0.6); }
.map-overlay-content { min-height: 100%; }

/* ─── Loading indicator ───────────────────────────────── */

/* ─── Loading Indicator — Progress Bar ─────────────────── */
.map-loader {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.map-loader--visible {
  opacity: 1;
  pointer-events: auto;
}
/* Branded pin */
.map-loader-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.map-loader-glow {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,.25) 0%, transparent 70%);
  animation: map-glow-pulse 2s ease-in-out infinite;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes map-glow-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .6; }
  50%      { transform: translate(-50%, -50%) scale(1.4); opacity: .2; }
}
.map-loader-pin {
  animation: map-pin-bounce 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4));
}
@keyframes map-pin-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30%      { transform: translateY(-12px) scale(1.05); }
  50%      { transform: translateY(-8px) scale(1.02); }
  70%      { transform: translateY(-10px) scale(1.03); }
}
/* Progress bar */
.map-loader-bar-wrap {
  width: 200px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}
.map-loader-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #a855f7, #ec4899, #f59e0b);
  background-size: 200% 100%;
  animation: map-bar-shimmer 2s linear infinite;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
@keyframes map-bar-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.map-loader-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #8b949e);
  letter-spacing: 0.3px;
  transition: opacity 0.15s ease;
  min-height: 1.4em;
}

/* ─── Hover tooltip (desktop) ─────────────────────────── */
.map-tooltip {
  position: absolute;
  z-index: 750;
  pointer-events: none;
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 240px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.map-tooltip--visible {
  opacity: 1;
  transform: translateY(0);
}
.map-tt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #e8e6f0);
  line-height: 1.3;
  margin-bottom: 2px;
}
.map-tt-meta {
  font-size: 11px;
  color: var(--muted, #6b6b8a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Desktop left detail panel ───────────────────────── */
.map-desktop-panel {
  display: none; /* hidden on mobile */
}

/* ─── Desktop breakpoint (≥1024px) ────────────────────── */
@media (min-width: 1024px) {
  /* Bottom event card also visible on desktop — centered, wider */
  .map-event-card {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border-radius: 18px 18px 0 0;
  }
  .map-event-card.map-event-card--visible {
    transform: translateX(-50%) translateY(0);
  }
  .map-event-card.map-event-card--hidden {
    transform: translateX(-50%) translateY(100%);
  }

  /* Remove bottom dock spacing on desktop */
  .map-page { bottom: 0; }

  /* Desktop left detail panel — hidden, using bottom card instead */
  .map-desktop-panel {
    display: none !important;
  }

  /* Panel close button */
  .map-dp-close {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 2;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--text, #e8e6f0);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
  }
  .map-dp-close:hover { background: rgba(255,255,255,0.15); }

  /* Panel scrollable content */
  .map-dp-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Panel hero image */
  .map-dp-hero {
    width: 100%;
    height: 200px;
    position: relative;
    flex-shrink: 0;
  }
  .map-dp-hero-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(10, 14, 26, 0.97));
  }

  /* Panel body */
  .map-dp-body {
    padding: 14px 20px 20px;
  }
  .map-dp-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
  }
  .map-dp-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text, #e8e6f0);
    line-height: 1.25;
    margin-bottom: 12px;
  }

  /* Meta rows with icons */
  .map-dp-meta { margin-bottom: 14px; }
  .map-dp-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted, #8b949e);
    margin-bottom: 6px;
  }
  .map-dp-meta-row svg {
    flex-shrink: 0;
    opacity: 0.5;
  }

  /* Social stats */
  .map-dp-social {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
  }
  .map-dp-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
  }
  .map-dp-stat--going { color: #10b981; }
  .map-dp-stat--interested { color: #f59e0b; }
  .map-dp-stat-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
  }
  .map-dp-stat-dot.g { background: #10b981; }
  .map-dp-stat-dot.y { background: #f59e0b; }

  /* Description */
  .map-dp-desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted, #8b949e);
  }

  /* Action buttons */
  .map-dp-actions {
    flex-shrink: 0;
    padding: 14px 20px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .map-dp-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .map-dp-btn--primary {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
  }
  .map-dp-btn--primary:hover {
    background: rgba(139, 92, 246, 0.25);
  }
  .map-dp-btn--secondary {
    background: rgba(255,255,255,0.06);
    color: var(--muted, #8b949e);
  }
  .map-dp-btn--secondary:hover {
    background: rgba(255,255,255,0.1);
  }

  /* Shift map when panel is open */
  .map-page--panel-open .map-container {
    margin-left: 380px;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .map-container {
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Shift top overlay when panel is open */
  .map-page--panel-open .map-top-overlay {
    left: 380px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .map-top-overlay {
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Shift locate button when panel is open */
  .map-page--panel-open .map-locate-btn {
    left: 394px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Zoom controls — left-aligned below locate */
  .map-page .leaflet-control-zoom {
    top: 108px !important;
    left: 14px !important;
    right: auto !important;
    margin: 0 !important;
  }
}

/* ─── Loader fade-out ─────────────────────────────────── */
.map-loader--fade-out {
  opacity: 0 !important;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ─── Event cluster markers ──────────────────────────── */
.map-cluster-marker {
  background: none !important;
  border: none !important;
}
.map-cluster-bubble {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: map-cluster-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.map-cluster-bubble:hover {
  transform: scale(1.12);
}
.map-cluster-count {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  z-index: 2;
  line-height: 1;
}
.map-cluster-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid;
  opacity: 0.3;
  animation: map-cluster-pulse 2.5s ease-in-out infinite;
}
@keyframes map-cluster-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes map-cluster-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50%      { transform: scale(1.25); opacity: 0.1; }
}

/* ─── "In This Area" bottom card row ─────────────────── */
.map-area-row {
  position: absolute;
  bottom: 12px; left: 0; right: 0;
  z-index: 800;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .35s ease, transform .35s ease;
}
.map-area-row--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Hide area row when single event card is open */
.map-event-card--visible ~ .map-area-row,
.map-area-row:has(~ .map-event-card--visible) { display: none; }
/* Fallback: JS will also hide it */

.map-area-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.map-area-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ec4899;
  box-shadow: 0 0 6px rgba(236,72,153,.5);
}
.map-area-count {
  font-weight: 500;
  color: rgba(255,255,255,.4);
}
.map-area-scroll {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0 16px 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.map-area-scroll::-webkit-scrollbar { display: none; }

/* Individual area card */
.map-ac {
  flex: 0 0 200px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: rgba(14,17,24,.88);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
}
.map-ac:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.map-ac:active { transform: scale(.97); }

.map-ac-img {
  width: 100%;
  height: 80px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.map-ac-img-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, transparent, rgba(14,17,24,.88));
}

.map-ac-body {
  padding: 6px 10px 8px;
}
.map-ac-date {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.map-ac-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.map-ac-venue {
  font-size: 10px;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* ─── Expanded / selected card in bottom row ───────── */
.map-ac--expanded {
  flex: 0 0 300px;
  border-color: rgba(168,85,247,.5);
  box-shadow: 0 0 20px rgba(168,85,247,.2), 0 8px 32px rgba(0,0,0,.5);
  transform: none !important;
}
.map-ac--expanded .map-ac-img { height: 110px; }
.map-ac--expanded .map-ac-title {
  font-size: 14px;
  white-space: normal;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.map-ac-expanded-info {
  padding: 0 10px 10px;
}
.map-ac-desc {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.map-ac-stats {
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: rgba(255,255,255,.5);
  margin-bottom: 8px;
}
.map-ac-going { color: rgba(74,222,128,.8); }
.map-ac-interested { color: rgba(250,204,21,.8); }
.map-ac-view-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-left: 3px solid #8b5cf6;
  border-radius: 6px;
  background: rgba(139,92,246,.15);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease;
}
.map-ac-view-btn:hover {
  background: rgba(139,92,246,.3);
}

/* Mobile: smaller cards */
@media (max-width: 600px) {
  .map-area-row { bottom: 8px; }
  .map-ac { flex: 0 0 170px; }
  .map-ac-img { height: 65px; }
  .map-ac-title { font-size: 11px; }
  .map-ac--expanded { flex: 0 0 250px; }
  .map-ac--expanded .map-ac-img { height: 90px; }
}

/* ─── Pulsing selected dot overlay ─────────────────────── */
.map-pulse-marker {
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.map-pulse-core {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  z-index: 2;
}
.map-pulse-ring {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--pulse-color, #a855f7);
  opacity: 0;
  animation: mapPulseRing 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}
@keyframes mapPulseRing {
  0% { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ─── Button rows on map cards ────────────────────────── */
.map-card-btn-row,
.map-ac-btn-row {
  display: flex; gap: 8px; margin-top: 8px;
}
.map-card-share-btn,
.map-ac-share-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.map-card-share-btn:hover,
.map-ac-share-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
}
.map-card-view-btn,
.map-ac-view-btn {
  flex: 1;
}

/* end map.css */
