/* Decorative loading weather; the loading controls retain the upper layer. */
#christmas-snow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* The artwork rotates +90deg in portrait. Keep snow in screen space so its
   gravity still points down rather than across the physical screen. */
@media (orientation: portrait) {
  #christmas-snow {
    width: var(--splash-vw, 100vw);
    height: var(--splash-vh, 100vh);
    transform: translate(-50%, -50%) rotate(-90deg);
  }
}

#splash-content > #direct-entry-progress,
#splash-content > #loading-brand-logo {
  z-index: 1;
}

.christmas-snow-flake {
  position: absolute;
  display: block;
  pointer-events: none;
  background: url('christmas-snowflake.f7086.png') center / contain no-repeat;
  opacity: 0;
  animation-name: christmas-snow-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-play-state: paused;
}

#christmas-snow[data-running="true"] .christmas-snow-flake {
  animation-play-state: running;
}

@keyframes christmas-snow-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--snow-r0));
  }
  8% { opacity: var(--snow-opacity); }
  25% {
    opacity: var(--snow-opacity);
    transform: translate3d(var(--snow-x1), var(--snow-y1), 0) rotate(var(--snow-r1));
  }
  50% {
    opacity: var(--snow-opacity);
    transform: translate3d(var(--snow-x2), var(--snow-y2), 0) rotate(var(--snow-r2));
  }
  75% {
    opacity: var(--snow-fade-opacity);
    transform: translate3d(var(--snow-x3), var(--snow-y3), 0) rotate(var(--snow-r3));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--snow-x4), var(--snow-y4), 0) rotate(var(--snow-r4));
  }
}
