/* Park Vibes - Custom Styling */

:root {
  --primary-emerald: #10b981;
  --primary-teal: #0d9488;
  --amber-fresh: #f59e0b;
  --purple-expiring: #8b5cf6;
}

/* Ensure map fills entire screen behind controls */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  background-color: #f8fafc;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Glassmorphic floating panels */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.12);
}

.glass-modal {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Pulsing Beacon Markers */
.beacon-marker-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beacon-core {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 2px solid white;
  position: relative;
  z-index: 3;
  transition: transform 0.2s ease;
}

.beacon-core:hover {
  transform: scale(1.15);
}

/* Pulse rings */
.beacon-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  animation: beacon-pulse 2.2s infinite ease-out;
}

.beacon-ring-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  animation: beacon-pulse 2.2s infinite ease-out;
  animation-delay: 0.9s;
}

@keyframes beacon-pulse {
  0% {
    width: 36px;
    height: 36px;
    opacity: 0.85;
  }
  100% {
    width: 90px;
    height: 90px;
    opacity: 0;
  }
}

/* Freshness variations */
.beacon-fresh .beacon-core {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}
.beacon-fresh .beacon-ring,
.beacon-fresh .beacon-ring-2 {
  border: 2px solid #10b981;
  background-color: rgba(16, 185, 129, 0.2);
}

.beacon-moderate .beacon-core {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}
.beacon-moderate .beacon-ring,
.beacon-moderate .beacon-ring-2 {
  border: 2px solid #f59e0b;
  background-color: rgba(245, 158, 11, 0.2);
}

.beacon-expiring .beacon-core {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
}
.beacon-expiring .beacon-ring,
.beacon-expiring .beacon-ring-2 {
  border: 2px solid #8b5cf6;
  background-color: rgba(139, 92, 246, 0.2);
}

/* Inactive / Empty Park Pin */
.park-empty-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #94a3b8;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
}

.park-empty-pin:hover {
  transform: scale(1.15);
  border-color: #10b981;
  color: #10b981;
}

/* Leaflet Popup overrides */
.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
}

.leaflet-popup-tip-container {
  margin-top: -1px;
}

/* Leaflet control placement */
.leaflet-top.leaflet-left {
  top: 80px;
}

/* Centered Modal System (Always perfectly centered on both mobile and desktop) */
.modal-centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 2001;
}

.modal-centered.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Quick Chip Active states */
.chip-active {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  font-weight: 600;
}
