.app-startup {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  background: Canvas;
  color: CanvasText;
  color-scheme: light dark;
}

.app-startup button {
  padding: 0.5rem 1rem;
  font: inherit;
}

.app-startup__logo img {
  display: block;
  width: auto;
  height: 28px;
}

/* The wordmark with three hopping squares in place of its dot. The hop matches AppBrandLoader.vue and
   the colours match brandColours in theme.ts; keep them in step. The static logo only shows once
   loading has failed. */
.app-startup__loader {
  display: block;
  width: auto;
  height: 28px;
}

.app-startup__wordmark {
  fill: #0b1220;
}

.app-startup__loader rect {
  fill: #2563eb;
  transform-box: fill-box;
}

.app-startup__loader rect:nth-of-type(2) {
  fill: #0ea5a4;
}

.app-startup__loader rect:nth-of-type(3) {
  fill: #10b981;
}

.app-startup:not([data-failed]) .app-startup__logo,
.app-startup[data-failed] .app-startup__loader {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .app-startup__loader rect {
    animation: app-startup-hop 1100ms ease-in-out infinite both;
  }

  .app-startup__loader rect:nth-of-type(2) {
    animation-delay: 150ms;
  }

  .app-startup__loader rect:nth-of-type(3) {
    animation-delay: 300ms;
  }
}

@keyframes app-startup-hop {
  0%,
  70%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

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

@media (prefers-color-scheme: dark) {
  .app-startup {
    /* Matches the app's dark page background. */
    background: #0b0f17;
  }

  .app-startup__wordmark {
    fill: #fff;
  }

  .app-startup__loader rect {
    fill: #60a5fa;
  }

  .app-startup__loader rect:nth-of-type(2) {
    fill: #22d3ee;
  }

  .app-startup__loader rect:nth-of-type(3) {
    fill: #34d399;
  }
}
