/* Live Flight tab — dark cockpit theme, high contrast for daylight/sunlight use */

#LiveFlight.tabcontent {
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
}

/* Fullscreen mode — toggled via body.lf-fullscreen in index.html's tab-switch
   handler. Hides Skywalk's own tab bar and expands the map to the full
   viewport instead of just the area below it. */
body.lf-fullscreen .app-container {
  display: none !important;
}

body.lf-fullscreen #LiveFlight.tabcontent {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100dvh;
}

body.lf-fullscreen .lf-root {
  height: 100vh;
  height: 100dvh; /* no tab bar to reserve space for anymore */
}

.lf-traffic-warning {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  max-width: 85%;
  background: rgba(60, 40, 0, 0.92);
  color: #ffcf80;
  border: 1px solid rgba(255, 180, 84, 0.6);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-family: Arial, sans-serif;
  text-align: center;
  pointer-events: none;
}

.lf-close-btn {
  position: absolute;
  top: 30px;              /* below the status bar */
  left: 7%;
  transform: translateX(-50%);
  z-index: 1001;
  width: 36px;
  height: 36px;
  background: rgba(10, 14, 18, 0.9);
  color: #cfd8e3;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}


#LIVEFLIGHT_ROOT {
  background: #0b0f14;
  overflow: hidden;
}

.lf-root {
  height: calc(100vh - 110px); /* fallback for browsers without dvh support */
  height: calc(100dvh - 110px); /* dvh accounts for mobile browsers' collapsing address bar, preventing the page-level scroll */
}

#lf-map {
  background: #0b0f14;
}

.lf-topbar {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%); /* centered so it never overlaps the map's zoom control */
  z-index: 1000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lf-status-secondary {
  color: #9adcff;
  font-size: 11px;
  padding: 4px 10px;
}

.lf-status {
  background: rgba(10, 14, 18, 0.85);
  color: #ffb454;
  font-family: "Courier New", monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 180, 84, 0.35);
  pointer-events: auto;
  white-space: nowrap;
}

/* Mobile browsers render a grey/white tap-highlight + focus ring on top of
   custom button styling by default, which looked like the buttons were
   "changing colour" on tap. Disabling native button chrome fixes it. */
.lf-btn,
.lf-chip,
.lf-menu-btn {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  user-select: none;
}
.lf-btn:focus,
.lf-chip:focus,
.lf-menu-btn:focus {
  outline: none;
}

.lf-menu-btn {
  position: absolute;
  bottom: 16px;
  right: 10px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  background: rgba(10, 14, 18, 0.9);
  color: #ffb454;
  border: 1px solid rgba(255, 180, 84, 0.5);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lf-menu-panel {
  position: absolute;
  bottom: 68px;
  right: 10px;
  z-index: 1001;
  width: 220px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 14, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px;
}

.lf-menu-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lf-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 2px 0;
}

.lf-menu-label {
  color: #9aa5b1;
  font-size: 11px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lf-chip-grid {
  flex-direction: row;
  flex-wrap: wrap;
}
.lf-chip-grid .lf-chip {
  flex: 1 1 45%;
  text-align: center;
}

.lf-btn {
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 14, 18, 0.85);
  color: #cfd8e3;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.lf-btn-active {
  color: #ffb454;
  border-color: rgba(255, 180, 84, 0.6);
}

.lf-panel-label {
  color: #9aa5b1;
  font-size: 10px;
  font-family: Arial, sans-serif;
  margin-top: 2px;
}

.lf-field-row {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.lf-field {
  flex: 1 1 50%;
  min-width: 0; /* lets the number input shrink instead of overflowing the row */
  display: flex;
  flex-direction: column;
}

.lf-field .lf-alt-input {
  width: 100%;
}

.lf-alt-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 14, 18, 0.85);
  color: #cfd8e3;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 4px;
  font-size: 12px;
  text-align: center;
}

.lf-chip {
  background: transparent;
  color: #cfd8e3;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.lf-chip-active {
  color: #0b0f14;
  background: #b46cff;
  border-color: #b46cff;
}

/* Route waypoint marker — matches the Enroute tab's convention (white dot, black ring) */
.lf-wp-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}
.lf-pos-icon {
  background: transparent;
  border: none;
}

.lf-pos-plane {
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.7));
}

.lf-pos-plane path {
  fill: #ffb454;
  stroke: #0b0f14;
  stroke-width: 0.7;
  stroke-linejoin: round;
}


/* Realtime traffic aircraft marker */
.lf-traffic-icon {
  background: transparent;
  border: none;
}

.lf-traffic-plane {
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}

.lf-traffic-plane path {
  fill: var(--ac-color, #4fd1ff);
  stroke: #0b0f14;
  stroke-width: 0.8;
  stroke-linejoin: round;
}
