/* ==========================================================
   VextaLearn — App launch splash screen
   Shown only when the app is opened in installed/standalone
   mode (see splash.js). A normal browser tab never sees this —
   the element is removed from the DOM entirely in that case.
   Isolated on purpose: only touches #vxt-splash and its
   children, no existing selector is modified.
   ========================================================== */

#vxt-splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  z-index: 100000;
  display: none; /* JS-controlled; only ever set to flex in standalone mode */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #0D1B3E; /* deep navy fallback */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  text-align: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
}

#vxt-splash.vxt-splash--visible {
  opacity: 1;
}

/* Full-bleed splash image — fills the screen, centred */
.vxt-splash__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: vxt-splash-fade 0.6s ease forwards;
}

/* Tagline sits on top of the image, pinned near the bottom */
.vxt-splash__tagline {
  position: relative;
  z-index: 1;
  margin: 0;
  margin-top: auto;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Spinner sits below tagline */
.vxt-splash__spinner {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  margin-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: #17A3E8;
  border-radius: 50%;
  animation: vxt-splash-spin 0.7s linear infinite;
}

@keyframes vxt-splash-fade {
  0%  { opacity: 0; transform: scale(1.04); }
  100%{ opacity: 1; transform: scale(1); }
}

@keyframes vxt-splash-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #vxt-splash,
  .vxt-splash__bg,
  .vxt-splash__spinner {
    animation: none !important;
    transition: none !important;
  }
}
