/* ==========================================================================
   SSB Soaring Suite - Shared Design System & Theme Variables
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --bg-primary: #07080e;
  --bg-secondary: #0f111e;
  --bg-card: rgba(22, 24, 43, 0.4);
  --bg-card-hover: rgba(26, 29, 54, 0.65);
  --bg-glass: rgba(13, 16, 28, 0.65);
  
  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(0, 242, 254, 0.4);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(0, 242, 254, 0.5);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Brand Accent Colors */
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-blue-rgb: 79, 172, 254;
  --accent-green: #10b981;
  --accent-green-rgb: 16, 185, 129;
  --accent-emerald: #10b981;
  --accent-emerald-rgb: 16, 185, 129;
  --accent-red: #f43f5e;
  --accent-red-rgb: 244, 63, 94;
  --accent-orange: #f59e0b;
  --accent-orange-rgb: 245, 158, 11;
  --accent-purple: #8b5cf6;
  --accent-purple-rgb: 139, 92, 246;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --grad-highlight: linear-gradient(135deg, #4facfe 0%, #8b5cf6 100%);
  --grad-dark: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --grad-active: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-upcoming: linear-gradient(135deg, #475569 0%, #334155 100%);
  
  /* Shadows & Glows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  
  --glow-cyan: 0 0 20px rgba(0, 242, 254, 0.15);
  --glow-cyan-strong: 0 0 25px rgba(0, 242, 254, 0.35);
  
  /* Typography */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;
  
  /* Transitions & Blurs */
  --glass-blur: blur(14px);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: screen;
}

.glow-1 {
  top: -10%;
  left: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(79, 172, 254, 0.05) 70%, transparent 100%);
  animation: floatSlow 25s infinite alternate;
}

.glow-2 {
  top: 40%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(79, 172, 254, 0.04) 60%, transparent 100%);
  animation: floatSlow 30s infinite alternate-reverse;
}

/* Floating animation keyframes */
@keyframes floatSlow {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* ==========================================================================
   Cross-Application Header Navigation & App Switcher
   ========================================================================== */
.main-header,
.app-header {
  position: relative;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  animation: fadeInDown var(--transition-slow, 0.4s ease);
}

.header-logo-section,
.header-logo-group,
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.header-logo,
.logo-svg {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.25));
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.header-logo:hover,
.logo-svg:hover {
  transform: scale(1.06) translateY(-1px);
  filter: drop-shadow(0 0 18px rgba(0, 242, 254, 0.5));
}

.header-titles,
.header-title-group,
.title-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.header-titles h1,
.header-title-group h1,
.title-group h1 {
  font-family: var(--font-sans) !important;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
  background: linear-gradient(135deg, #ffffff 30%, #e2e8f0 70%, var(--accent-cyan, #00f2fe) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: #ffffff !important;
  margin: 0 0 3px 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.header-titles .subtitle,
.header-title-group .subtitle,
.title-group .subtitle,
.header-subtitle {
  font-family: var(--font-sans) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary, #94a3b8) !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.header-actions {
  position: relative;
  z-index: 501;
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-hub-btn,
.app-switcher-btn,
.info-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 38px !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
  background: var(--bg-glass) !important;
  border: 1px solid var(--border-glass) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  text-decoration: none !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  transition: all var(--transition-fast) !important;
}

.back-hub-btn:hover,
.back-hub-btn:focus,
.app-switcher-btn:hover,
.app-switcher.is-open .app-switcher-btn,
.info-btn:hover,
.info-btn:focus {
  border-color: var(--border-color-hover) !important;
  background: var(--bg-card-hover) !important;
  color: var(--accent-cyan) !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
  box-shadow: var(--glow-cyan) !important;
}

.back-hub-btn:visited {
  color: var(--text-primary) !important;
}

.back-hub-btn i,
.back-hub-btn svg,
.app-switcher-btn i,
.app-switcher-btn svg,
.info-btn i,
.info-btn svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}

/* Suite-Wide Responsive Mobile Header Consistency */
@media (max-width: 768px) {
  .main-header,
  .app-header,
  header.main-header,
  header.app-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding: 12px 0 !important;
  }

  .header-logo-section,
  .header-logo-group,
  .header-left {
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  .header-actions {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
  }
}

.app-switcher {
  position: relative;
  display: inline-block;
  z-index: 502;
}

.app-switcher-btn:hover,
.app-switcher.is-open .app-switcher-btn {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--glow-cyan);
  color: var(--accent-cyan);
}

.app-switcher-btn i {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.app-switcher.is-open .app-switcher-btn .chevron-icon {
  transform: rotate(180deg);
}

.app-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: rgba(13, 16, 28, 0.98);
  border: 1px solid var(--border-color-hover);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), var(--glow-cyan);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 8px;
  z-index: 99999;
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-switcher.is-open .app-switcher-dropdown {
  display: flex;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-switcher-header {
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.app-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.app-switcher-item:hover {
  background: rgba(0, 242, 254, 0.1);
  color: var(--text-primary);
  border-color: transparent;
}

.app-switcher-item.is-active {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  font-weight: 600;
}

.app-switcher-item i {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* ==========================================================================
   Flight Category Badges & Telemetry Chips
   ========================================================================== */
.flight-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cat-vfr {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.cat-mvfr {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

.cat-ifr {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  text-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

.cat-lifr {
  background: rgba(217, 70, 239, 0.15);
  border: 1px solid rgba(217, 70, 239, 0.4);
  color: #e879f9;
  text-shadow: 0 0 10px rgba(217, 70, 239, 0.4);
}

.weather-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.weather-chip strong {
  color: var(--text-primary);
}

.weather-chip.da-chip {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* ==========================================================================
   Version Badge & Changelog Modal Shared Design System
   ========================================================================== */
.version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  border-radius: 5px;
  vertical-align: middle;
  margin-left: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.version-badge:hover,
.version-badge:focus-visible {
  background: rgba(0, 242, 254, 0.16) !important;
  border-color: rgba(0, 242, 254, 0.5) !important;
  color: var(--accent-cyan, #00f2fe) !important;
  -webkit-text-fill-color: var(--accent-cyan, #00f2fe) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.35);
}

.version-badge:active {
  transform: translateY(0);
  box-shadow: 0 0 4px rgba(0, 242, 254, 0.2);
}

/* Shared Changelog Entries Formatting */
.changelog-entry {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.changelog-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.changelog-entry .entry-version {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: 6px;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.changelog-entry .entry-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.changelog-entry ul {
  margin-top: 8px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.changelog-entry li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.changelog-entry li strong {
  color: var(--text-primary);
}
