* { font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; background: #FAF9F6; }
#map { width: 100vw; height: 100vh; z-index: 1; background: #f8fafc; }

/* Glass UI */
.glass-bar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
}
.glass-drawer {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}

/* Creator Map Pin Badge */
.creator-pin-wrap {
  cursor: pointer;
  position: relative;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.creator-pin-wrap:hover {
  transform: scale(1.22);
  z-index: 9999 !important;
}
.creator-frequent-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 4.5px;
  border-radius: 9999px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
}
.creator-pin {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  overflow: hidden;
  background: #0F172A;
}
.creator-pin-inner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transform: rotate(45deg);
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.creator-pin-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Consensus Multi-Creator Pin */
.consensus-pin-wrap {
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.consensus-pin-wrap:hover {
  transform: scale(1.25);
  z-index: 9999 !important;
}
.consensus-pin {
  width: 46px;
  height: 46px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #ffffff;
  background: linear-gradient(135deg, #FF5A36, #F59E0B);
}
.consensus-pin-inner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Modern Teal/Cyan Cluster Badges */
.vlog-cluster-wrap { background: transparent !important; border: none !important; }
.vlog-cluster {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  cursor: pointer;
  position: relative;
}

/* Glass halo pulse ring */
.vlog-cluster::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: inherit;
  opacity: 0.3;
  z-index: -1;
  transition: inset 0.2s ease, opacity 0.2s ease;
}

.vlog-cluster:hover {
  transform: scale(1.12);
  z-index: 9999 !important;
}
.vlog-cluster:hover::before {
  inset: -6px;
  opacity: 0.45;
}

/* Three distinct tiers: compact (1-9), medium (10-99), grand (100+) */
.vlog-cluster.cluster-small {
  background: linear-gradient(135deg, #2E758B 0%, #215A6B 100%);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(33, 90, 107, 0.4), 0 1px 3px rgba(0, 0, 0, 0.15);
  font-size: 13px;
}

.vlog-cluster.cluster-medium {
  background: linear-gradient(135deg, #1C6B7F 0%, #174856 100%);
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(23, 72, 86, 0.45), 0 2px 5px rgba(0, 0, 0, 0.15);
  font-size: 14px;
}

.vlog-cluster.cluster-large {
  background: linear-gradient(135deg, #0E5466 0%, #082F3B 100%);
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(8, 47, 59, 0.55), 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 15px;
}

.vlog-cluster .cluster-num {
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Tooltip */
.leaflet-tooltip.vlog-tooltip {
  background: #0F172A !important;
  color: #F8FAFC !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  padding: 7px 11px !important;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.5) !important;
  min-width: 200px !important;
  max-width: 340px !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}
.leaflet-tooltip-top.vlog-tooltip:before { border-top-color: #0F172A !important; }

/* User Live Location Marker (Near Me) */
.user-location-marker {
  width: 18px;
  height: 18px;
  background: #2563eb;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}
.user-location-marker::after {
  content: '';
  position: absolute;
  top: -7px;
  left: -7px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.4);
  animation: userPulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes userPulseRing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.3); opacity: 0; }
}
.touch-scroll {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

/* Hide scrollbars */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Safe Area Insets */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* Hide Leaflet zoom controls on touch/mobile to prevent FAB collisions */
@media (max-width: 639px) {
  .leaflet-control-zoom {
    display: none !important;
  }
  .leaflet-bottom.leaflet-right {
    margin-bottom: 2px !important;
  }
  .leaflet-control-attribution {
    font-size: 8px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    padding: 1px 4px !important;
  }
}

/* Venue & AI Drawer / Bottom-Sheet Transitions */
#venueDrawer, #aiPanel {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
#venueDrawer.drawer-open, #aiPanel.drawer-open {
  transform: translateY(0) !important;
}
@media (min-width: 640px) {
  #venueDrawer.drawer-open, #aiPanel.drawer-open {
    transform: translateX(0) !important;
  }
}

/* AI Interactive Spot Link Pills */
.ai-spot-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
  padding: 1px 7px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: baseline;
  margin: 0 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ai-spot-tag:hover {
  background-color: #215A6B;
  color: #ffffff;
  border-color: #215A6B;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(33, 90, 107, 0.25);
}
.ai-spot-tag:active {
  transform: translateY(0);
}

/* AI-Sprinkled Search Icon Button (Left side of search bar) */
.ai-search-icon-btn {
  background: transparent;
  color: #475569;
  outline: none;
}
.ai-search-icon-btn:hover {
  color: #0f172a;
}
.ai-search-icon-btn:hover .ai-search-svg {
  transform: scale(1.1);
}
.ai-search-icon-btn .ai-sparkle-path {
  fill: #8b5cf6;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(139, 92, 246, 0.45));
  transition: all 0.25s ease;
}
.ai-search-icon-btn .ai-sparkle-path-sm {
  fill: #06b6d4;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(6, 182, 212, 0.45));
  transition: all 0.25s ease;
}
.ai-search-icon-btn .ai-sparkle-dot {
  fill: #ec4899;
  opacity: 0.85;
}
.ai-search-icon-btn:hover .ai-sparkle-path,
.ai-search-icon-btn.has-query .ai-sparkle-path {
  fill: #7c3aed;
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.8));
}
.ai-search-icon-btn:hover .ai-sparkle-path-sm,
.ai-search-icon-btn.has-query .ai-sparkle-path-sm {
  fill: #0284c7;
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(2, 132, 199, 0.8));
}
.ai-search-icon-btn.has-query {
  color: #215A6B;
  animation: aiIconGlow 2.5s infinite alternate;
}
@keyframes aiIconGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 1px rgba(33, 90, 107, 0.3)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 5px rgba(124, 58, 237, 0.65)); }
}

/* Mobile Full-Width Search When Typing / Focused with Query */
@media (max-width: 639px) {
  body.mobile-search-active #navBrandLink,
  body.mobile-search-active #navActionButtons {
    display: none !important;
  }
  body.mobile-search-active #globalSearchContainer {
    max-width: 100% !important;
    width: 100% !important;
  }
}


