:root {
  --splash-bg: #ffffff;
  --splash-spinner: #00444f;
}

#fuse-splash-screen {
  display: block;
  /* position: fixed (not absolute) so the splash always covers the viewport
   * regardless of #root's current size. Master could use absolute because
   * html had a teal background that masked any gap — the rebrand changed
   * html to white, which exposed the gap whenever #root hadn't yet filled
   * the viewport (initial auth check, slow first render). See ENG2-1995. */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--splash-bg);
  z-index: 99999;
  pointer-events: none;
}

#fuse-splash-screen .center {
  display: block;
  width: 100%;
  position: absolute;
  margin-top: 50vh;
  transform: translateY(-50%);
}

#fuse-splash-screen .logo {
  width: 128px;
  margin: 0 auto;
}

#fuse-splash-screen .logo img {
  filter: none;
}

#fuse-splash-screen .spinner-wrapper {
  display: block;
  position: relative;
  width: 100%;
  min-height: 100px;
  height: 100px;
  /* ENG2-2104: hidden until the brand-correct logo has rendered, so the splash
   * never shows a spinner next to a blank/unresolved logo. visibility (not
   * display) keeps the 100px reserved so revealing it causes no layout shift.
   * The inline <script> after the logo <img> adds .logo-ready on load/error
   * (with a timeout fallback) — see public/index.html. */
  visibility: hidden;
}

#fuse-splash-screen.logo-ready .spinner-wrapper {
  visibility: visible;
}

#fuse-splash-screen .spinner-wrapper .spinner {
  position: absolute;
  overflow: hidden;
  left: 50%;
  margin-left: -50px;
  animation: outer-rotate 2.91667s linear infinite;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner {
  width: 100px;
  height: 100px;
  position: relative;
  animation: sporadic-rotate 5.25s cubic-bezier(0.35, 0, 0.25, 1) infinite;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner .gap {
  position: absolute;
  left: 49px;
  right: 49px;
  top: 0;
  bottom: 0;
  border-top: 10px solid;
  box-sizing: border-box;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner .left,
#fuse-splash-screen .spinner-wrapper .spinner .inner .right {
  position: absolute;
  top: 0;
  height: 100px;
  width: 50px;
  overflow: hidden;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner .left .half-circle,
#fuse-splash-screen .spinner-wrapper .spinner .inner .right .half-circle {
  position: absolute;
  top: 0;
  width: 100px;
  height: 100px;
  box-sizing: border-box;
  border: 10px solid var(--splash-spinner);
  border-bottom-color: transparent;
  border-radius: 50%;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner .left {
  left: 0;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner .left .half-circle {
  left: 0;
  border-right-color: transparent;
  animation: left-wobble 1.3125s cubic-bezier(0.35, 0, 0.25, 1) infinite;
  -webkit-animation: left-wobble 1.3125s cubic-bezier(0.35, 0, 0.25, 1) infinite;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner .right {
  right: 0;
}

#fuse-splash-screen .spinner-wrapper .spinner .inner .right .half-circle {
  right: 0;
  border-left-color: transparent;
  animation: right-wobble 1.3125s cubic-bezier(0.35, 0, 0.25, 1) infinite;
  -webkit-animation: right-wobble 1.3125s cubic-bezier(0.35, 0, 0.25, 1)
    infinite;
}

@keyframes outer-rotate {
  0% {
    transform: rotate(0deg) scale(0.5);
  }
  100% {
    transform: rotate(360deg) scale(0.5);
  }
}

@keyframes left-wobble {
  0%,
  100% {
    transform: rotate(130deg);
  }
  50% {
    transform: rotate(-5deg);
  }
}

@keyframes right-wobble {
  0%,
  100% {
    transform: rotate(-130deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

@keyframes sporadic-rotate {
  12.5% {
    transform: rotate(135deg);
  }
  25% {
    transform: rotate(270deg);
  }
  37.5% {
    transform: rotate(405deg);
  }
  50% {
    transform: rotate(540deg);
  }
  62.5% {
    transform: rotate(675deg);
  }
  75% {
    transform: rotate(810deg);
  }
  87.5% {
    transform: rotate(945deg);
  }
  100% {
    transform: rotate(1080deg);
  }
}
