/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #10151C;
}
::-webkit-scrollbar-thumb {
  background: #283445;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3B82F6;
}

/* Leaflet Container & Dark Mode styling */
.leaflet-container {
  background: #10151C !important;
  font-family: inherit;
}

.leaflet-bar {
  border: 1px solid #283445 !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-bar a {
  background-color: #18202A !important;
  color: #E2E8F0 !important;
  border-bottom: 1px solid #283445 !important;
  transition: all 0.15s ease;
}

.leaflet-bar a:hover {
  background-color: #242E3D !important;
  color: #60A5FA !important;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  background: #18202A !important;
  color: #E2E8F0 !important;
  border: 1px solid #283445 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.8) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 12px 14px !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background: #18202A !important;
  border: 1px solid #283445 !important;
}

.leaflet-popup-close-button {
  color: #94A3B8 !important;
  padding: 6px 10px !important;
}

.leaflet-popup-close-button:hover {
  color: #F87171 !important;
}

/* Custom ForeFlight METAR Station Dot */
.metar-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.metar-dot:hover {
  transform: scale(1.4);
  z-index: 1000 !important;
}

.metar-dot.vfr {
  background-color: #00B894;
  box-shadow: 0 0 10px rgba(0, 184, 148, 0.8);
}

.metar-dot.mvfr {
  background-color: #0984E3;
  box-shadow: 0 0 10px rgba(9, 132, 227, 0.8);
}

.metar-dot.ifr {
  background-color: #D63031;
  box-shadow: 0 0 10px rgba(214, 48, 49, 0.8);
}

.metar-dot.lifr {
  background-color: #6C5CE7;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.8);
}

/* Station Label Tooltip */
.leaflet-tooltip-metar {
  background-color: rgba(16, 21, 28, 0.85) !important;
  color: #FFFFFF !important;
  border: 1px solid #283445 !important;
  border-radius: 6px !important;
  font-family: monospace !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 5px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-tooltip-metar:before {
  border-top-color: rgba(16, 21, 28, 0.85) !important;
}

/* Custom Lightning Strike Animations & Canvas */
@keyframes lightning-pulse {
  0% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 8px #FFE600); }
  50% { transform: scale(1.6); opacity: 0.8; filter: drop-shadow(0 0 16px #FFE600); }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 8px #FFE600); }
}

.lightning-live-pulse {
  animation: lightning-pulse 1.2s infinite ease-in-out;
}

/* Basemap Active Button */
.basemap-opt.active {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #3B82F6 !important;
}

/* Custom Range Slider Styling */
#timeline-slider {
  background: linear-gradient(to right, #1E293B, #3B82F6);
  height: 6px;
  border-radius: 4px;
}

#timeline-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3B82F6;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.9);
  cursor: pointer;
  transition: transform 0.1s ease;
}

#timeline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  background: #60A5FA;
}

#timeline-slider::-webkit-slider-thumb:active {
  transform: scale(1.4);
}

/* Speed Button Active Styling */
.speed-btn.active {
  background-color: #2563EB !important;
  color: #FFFFFF !important;
}

/* Telemetry Mini Meters & Gauges */
.telemetry-bar-fill {
  transition: width 0.4s ease, background-color 0.4s ease;
}

/* Flightradar24 Style ADS-B Aircraft Markers */
.aircraft-marker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.25s linear;
}

.aircraft-icon-svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 2px #000000);
  transition: transform 0.3s ease-out;
  transform-origin: center center;
}

.aircraft-marker-container:hover .aircraft-icon-svg {
  filter: drop-shadow(0 0 8px #00B0FF) drop-shadow(0 0 2px #000000);
  transform: scale(1.3);
}

.aircraft-label {
  background-color: rgba(16, 21, 28, 0.88);
  color: #F8FAFC;
  font-family: monospace;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 3.5px;
  border-radius: 4px;
  border: 1px solid #283445;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  margin-top: 1px;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.aircraft-label.on-ground {
  color: #94A3B8;
  border-color: #334155;
}

/* Aircraft Altitude Categories */
.aircraft-alt-ground { color: #A0AEC0; fill: #A0AEC0; }
.aircraft-alt-low { color: #00E676; fill: #00E676; }
.aircraft-alt-mid { color: #00B0FF; fill: #00B0FF; }
.aircraft-alt-high { color: #FF9100; fill: #FF9100; }
.aircraft-alt-jet { color: #E040FB; fill: #E040FB; }

/* Enhanced Aircraft Tooltip & Popup */
.leaflet-tooltip-aircraft {
  background-color: rgba(16, 21, 28, 0.95) !important;
  color: #FFFFFF !important;
  border: 1px solid #38BDF8 !important;
  border-radius: 8px !important;
  font-family: monospace !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 4px 8px !important;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.8) !important;
}

.leaflet-tooltip-aircraft:before {
  border-top-color: rgba(16, 21, 28, 0.95) !important;
}

