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: #fff;
  opacity: 0.8;
  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: var(--color-background);
  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: var(--color-background);
  font-family: var(--font-sans, sans-serif);
  font-size: 1rem;
  line-height: 1.4;
}

/* The splash background is white in every theme, but Fightback's background
   token is yellow: use the dark foreground there so the spinner and the
   message stay visible. */
.theme-fightback fightback-splash-screen .splash-spinner-dot {
  background-color: var(--color-foreground);
}

.theme-fightback fightback-splash-screen .splash-message {
  color: var(--color-foreground);
}

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

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

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