/* The first paint, before the app bundle has run.
 *
 * It lives outside the bundle on purpose: the gap it fills is the time before
 * Angular has even started, so anything the app itself renders is too late.
 * The colours match the app's paper and green, and the background also matches
 * the manifest's background_color so an installed app's own launch screen flows
 * into this one rather than flashing a different shade.
 *
 * The splash is hidden by BootSplashService once the first route is on screen
 * and the session check has settled. If no route has arrived by the fallback it
 * stays up and grows a Retry: uncovering the empty page underneath is what used
 * to leave the app on a grey screen.
 */
html,
body {
  background: #f2f3f2;
}

.vp-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #f2f3f2;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}

.vp-splash-logo {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.vp-splash-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vp-splash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #56f52f;
  animation: vp-splash-bounce 1.1s infinite ease-in-out;
}

.vp-splash-dots span:nth-child(2) {
  animation-delay: 140ms;
}

.vp-splash-dots span:nth-child(3) {
  animation-delay: 280ms;
}

/* Shown when the start took longer than it should and no page has arrived.
 * The splash stays up rather than uncovering an empty page, so this is the way
 * out: a start that never finished can be started again without closing the
 * app. See BootSplashService. */
.vp-splash-retry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}

.vp-splash-retry-copy {
  max-width: 300px;
  margin: 0;
  color: #66726c;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.vp-splash-retry .vp-splash-retry-action {
  padding: 11px 26px;
  color: #000000;
  background: #56f52f;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.vp-splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes vp-splash-bounce {
  0%,
  70%,
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-7px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vp-splash-dots span {
    animation: none;
    opacity: 1;
  }
}
