/*
  Un solo elemento, due ruoli (vedi LoaderService):

  1. Launch screen — al primo caricamento è lime pieno (#D9FF00, l'unico posto
     dove Orma usa questa variante satura) col logo invertito in marrone.
  2. Velo di caricamento — dopo il boot, `body.splash-screen-booted` lo
     trasforma nel velo a schermo intero di §6.12: scrim caldo scuro, logo
     nascosto, spinner lime. Senza questo, ogni navigazione lampeggerebbe lime.
*/
fightback-splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  background-color: #d9ff00;
  opacity: 1;
  transition: opacity 0.4s ease-out;
  pointer-events: none;
}

fightback-splash-screen img {
  width: 160px;
  height: auto;
}

fightback-splash-screen .splash-spinner {
  display: flex;
  gap: 0.5rem;
}

fightback-splash-screen .splash-spinner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #302414;
  animation: splash-bounce 1.4s ease-in-out infinite both;
}

fightback-splash-screen .splash-spinner-dot:nth-child(1) {
  animation-delay: -0.32s;
}

fightback-splash-screen .splash-spinner-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes splash-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

fightback-splash-screen .splash-message {
  display: none;
  max-width: 20rem;
  margin: 0;
  padding: 0 1rem;
  text-align: center;
  color: #604f35;
  font-family: var(--font-sans, sans-serif);
  font-size: 1rem;
  line-height: 1.4;
}

fightback-splash-screen.has-message .splash-message {
  display: block;
}

/* Dopo il boot: velo, non schermata. */
body.splash-screen-booted fightback-splash-screen {
  background-color: rgba(31, 24, 0, 0.9);
  gap: 1.25rem;
}

body.splash-screen-booted fightback-splash-screen img {
  display: none;
}

body.splash-screen-booted fightback-splash-screen .splash-spinner-dot {
  background-color: #d8fd35;
}

body.splash-screen-booted fightback-splash-screen .splash-message {
  color: #f4f4ee;
}

body:not(.splash-screen-hidden) {
  overflow: hidden;
}

body.splash-screen-hidden fightback-splash-screen {
  opacity: 0;
  pointer-events: none;
}
