/* SkyPulse App CSS — consolidated from Stitch design exports */

/* ─── Map container ─── */
#map-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ─── Tab panels ─── */
.tab-panel {
  display: contents;
}
.tab-panel.hidden {
  display: none;
}
.tab-panel:not(.hidden) {
  display: flex;
  flex-direction: column;
}
/* Map tab is special — needs position relative to host FABs */
#tab-map:not(.hidden) {
  display: block;
}

/* ─── Detail sheet transition ─── */
#detail-sheet {
  transition: transform 0.3s ease;
}
#detail-sheet.hidden {
  transform: translateY(100%);
  display: block !important; /* keep in DOM for animation */
  pointer-events: none;
}

/* ─── HUD Panel (glassmorphism card) ─── */
.hud-panel {
  background-color: rgba(20, 66, 114, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Glass card ─── */
.glass-card {
  background: rgba(20, 66, 114, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Glass panel (alias for glass-card, used in saved/auth UI) ─── */
.glass-panel {
  background-color: rgba(20, 66, 114, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Glow effects ─── */
.glow-active {
  filter: drop-shadow(0 0 8px rgba(0, 219, 231, 0.5));
}
.neon-glow {
  filter: drop-shadow(0 0 8px rgba(0, 219, 231, 0.5));
}

/* ─── Aircraft marker ─── */
.aircraft-marker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: center;
  cursor: pointer;
}
.aircraft-icon {
  color: #e1fdff;
  filter: drop-shadow(0 0 4px rgba(225, 253, 255, 0.8));
}
.aircraft-label {
  background-color: rgba(5, 7, 10, 0.7);
  border: 1px solid rgba(0, 219, 231, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #e1fdff;
}
.trail {
  position: absolute;
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(225, 253, 255, 0.4), transparent);
  top: 20px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  transform-origin: top;
}
.aircraft-marker.highlighted .aircraft-icon {
  filter: drop-shadow(0 0 12px rgba(0, 219, 231, 1));
  color: #00dbe7;
}

/* ─── Leaflet custom marker styles ─── */
.leaflet-aircraft-marker {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.leaflet-aircraft-marker .aircraft-icon {
  font-size: 20px;
  line-height: 1;
}

/* ─── Glass switch (toggle) ─── */
.glass-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 48px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.glass-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: #dee2f2;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.glass-switch:checked {
  background-color: rgba(0, 219, 231, 0.2);
  border-color: #00dbe7;
  box-shadow: 0 0 12px rgba(0, 219, 231, 0.3) inset;
}
.glass-switch:checked::after {
  left: 26px;
  background-color: #00f2ff;
  box-shadow: 0 0 8px rgba(0, 242, 255, 0.8);
}

/* ─── Glass range slider ─── */
.glass-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}
.glass-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00f2ff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
  transition: transform 0.1s;
}
.glass-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.glass-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00f2ff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

/* ─── Glass input ─── */
.glass-input {
  background: rgba(20, 66, 114, 0.1);
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.3s ease;
  outline: none;
}
.glass-input:focus {
  outline: none;
  border-bottom-color: #00f2ff;
  background: rgba(0, 219, 231, 0.05);
  box-shadow: 0 4px 12px rgba(0, 219, 231, 0.1);
}
.glass-input::placeholder {
  color: rgba(185, 202, 203, 0.5);
}

/* ─── Radar sweep animation ─── */
@keyframes radar-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.radar-sweep {
  animation: radar-spin 4s linear infinite;
  background: conic-gradient(from 0deg, transparent 70%, rgba(0, 219, 231, 0.4) 100%);
}

/* ─── Ambient background ─── */
.ambient-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% -20%, rgba(0, 219, 231, 0.15) 0%, rgba(5, 7, 10, 1) 60%);
  z-index: -1;
  pointer-events: none;
}

/* ─── Sort chips ─── */
.sort-chip {
  white-space: nowrap;
  transition: all 0.2s ease;
}
.sort-chip.active {
  background-color: #e1fdff;
  color: #00363a;
  border-color: #e1fdff;
}
.sort-chip:not(.active) {
  background: rgba(20, 66, 114, 0.15);
  backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.1);
  color: #b9cacb;
}

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

/* ─── Safe bottom area ─── */
.safe-bottom {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

/* ─── Settings segment buttons ─── */
.settings-seg-btn {
  transition: all 0.2s ease;
}
.settings-seg-btn.active {
  background-color: rgba(0, 219, 231, 0.2);
  color: #e1fdff;
  box-shadow: inset 0 -2px 0 rgba(0, 219, 231, 1);
}

/* ─── Material Symbols default variation ─── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #05070A; }
::-webkit-scrollbar-thumb { background: #303541; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #849495; }

/* ─── Leaflet overrides for dark map ─── */
.leaflet-container {
  background: #05070A;
  font-family: 'Inter', sans-serif;
}
.leaflet-tile-pane {
  filter: brightness(0.7) saturate(0.6) hue-rotate(180deg) invert(0.05);
}
.leaflet-control-zoom a {
  background: rgba(20, 66, 114, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e1fdff !important;
}
.leaflet-control-zoom a:hover {
  background: rgba(0, 219, 231, 0.2) !important;
}

/* ─── Auth modal tabs ─── */
.auth-tab-btn {
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}
.auth-tab-btn.active {
  color: #e1fdff;
  border-bottom-color: #00dbe7;
}
