/* ==========================================================================
   ldsmaps.org - Interactive Weather Map & Radar Styling
   ========================================================================== */

.weather-map-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  height: 480px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fullscreen Mode */
.weather-map-card.fullscreen-map {
  position: fixed !important;
  inset: 1.5rem !important;
  height: auto !important;
  z-index: 1000 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9) !important;
  border-color: var(--accent-cyan) !important;
}

/* Map Header Bar & Layer Switcher */
.map-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  z-index: 10;
}

.map-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.map-title-heading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

/* Layer Tabs */
.map-layer-selector {
  display: flex;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 3px;
}

.map-layer-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-display);
}
.map-layer-tab:hover {
  color: #ffffff;
}
.map-layer-tab.active {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.map-expand-btn {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.map-expand-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}
.map-expand-btn svg {
  width: 15px;
  height: 15px;
}

/* Map Container Frame */
.map-viewport-frame {
  flex: 1;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#weather-map {
  width: 100%;
  height: 100%;
  background: #090d16;
}

/* Leaflet Dark Customizations */
.leaflet-container {
  background: #090d16 !important;
  font-family: var(--font-body) !important;
}

.leaflet-bar {
  border: 1px solid var(--border-glass) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.leaflet-bar a {
  background: rgba(15, 23, 42, 0.85) !important;
  color: #ffffff !important;
  border-bottom: 1px solid var(--border-glass) !important;
  backdrop-filter: blur(10px);
}
.leaflet-bar a:hover {
  background: rgba(30, 41, 59, 0.95) !important;
  color: var(--accent-cyan) !important;
}

/* Pulsing Location Marker */
.radar-pulse-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pulse-container {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pulse-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-cyan);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
}
.pulse-ring {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  animation: radar-marker-pulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes radar-marker-pulse {
  0% { transform: scale(0.5); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Map Popups */
.leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass-bright);
  color: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6) !important;
}
.leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.95) !important;
}
.map-popup-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  padding: 0.1rem 0;
}

/* Radar Player Floating Controls */
.radar-controls-floating {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.radar-btn-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.radar-control-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.radar-control-btn:hover {
  background: var(--accent-cyan);
  color: #090d16;
  border-color: transparent;
}

.radar-time-pill {
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.radar-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}
.radar-legend-bar {
  width: 70px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22c55e, #eab308, #ef4444, #a855f7);
}
