/* Fixed decoration never participates in document flow or receives input. */
.gomig-flight-atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  contain: layout paint;
}

/* Embedded chat keeps its controls and messages in front of the same sky. */
body[data-flight-background="neon-1030"] .conversation {
  position: relative;
  isolation: isolate;
}
body[data-flight-background="neon-1030"] .conversation > :not([data-flight-scene]) {
  position: relative;
  z-index: 1;
}

.gomig-flight-cloud {
  position: absolute;
  width: min(48vw, 520px);
  height: min(24vw, 240px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(131, 210, 236, .09), transparent 68%);
}

.gomig-flight-cloud--one { top: 14%; left: -8%; }
.gomig-flight-cloud--two { top: 61%; right: -10%; opacity: .6; }

.gomig-flight-plane { position: absolute; opacity: .74; }

.gomig-flight-jet {
  display: block;
  width: clamp(86px, 12vw, 144px);
  height: auto;
  overflow: visible;
}

.gomig-flight-jet--cyan {
  color: #00e5ff;
  filter: drop-shadow(0 0 3px rgba(0, 229, 255, .72)) drop-shadow(0 0 9px rgba(0, 229, 255, .22));
}

.gomig-flight-jet--magenta {
  color: #ff2b9f;
  transform: scaleX(-1);
  filter: drop-shadow(0 0 3px rgba(255, 43, 159, .72)) drop-shadow(0 0 9px rgba(255, 43, 159, .22));
}

.gomig-flight-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gomig-flight-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  color: #c8f6ff;
  background: currentColor;
  opacity: .72;
  box-shadow: 0 0 5px rgba(109, 231, 255, .68);
}

.gomig-flight-star:nth-child(3n) { color: #ffb4de; }

.gomig-flight-star::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: .5px;
  width: 1px;
  height: 23px;
  background: linear-gradient(to top, currentColor, transparent);
  opacity: .56;
}

@media (prefers-reduced-motion: no-preference) {
  .gomig-flight-plane--cyan { animation: gomig-flight-east 36s linear infinite -12s; }
  .gomig-flight-plane--magenta { animation: gomig-flight-west 44s linear infinite -21s; }
  .gomig-flight-star { animation-name: gomig-flight-star-fall; animation-timing-function: linear; animation-iteration-count: infinite; }

  @keyframes gomig-flight-east {
    from { transform: translate3d(-25vw, 8vh, 0) rotate(-5deg); }
    to { transform: translate3d(105vw, -15vh, 0) rotate(-5deg); }
  }

  @keyframes gomig-flight-west {
    from { transform: translate3d(40vw, -7vh, 0) rotate(5deg); }
    to { transform: translate3d(-85vw, 13vh, 0) rotate(5deg); }
  }

  @keyframes gomig-flight-star-fall {
    0% { transform: translate3d(4vw, -30vh, 0); opacity: 0; }
    8%, 86% { opacity: .8; }
    100% { transform: translate3d(-9vw, 100vh, 0); opacity: 0; }
  }
}

/* A visible static sky remains when motion is reduced. */
@media (prefers-reduced-motion: reduce) {
  .gomig-flight-plane,
  .gomig-flight-star {
    animation: none !important;
    opacity: .72;
  }

  .gomig-flight-plane { transform: none; }
  .gomig-flight-star { transform: none; }
  .gomig-flight-star::after { height: 7px; opacity: .35; }
}

@media (max-width: 480px) {
  .gomig-flight-jet { width: 92px; }
  .gomig-flight-plane { opacity: .68; }
  .gomig-flight-cloud { width: 70vw; height: 38vw; }
}
