.civap-login-loader {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  background: #fff;
  opacity: 1;
  transition: opacity 450ms ease;
}

.civap-login-loader[hidden] { display: none; }
.civap-login-loader.is-leaving { opacity: 0; pointer-events: none; }

.civap-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(350px, calc(100vw - 48px));
}

.civap-loader svg { display: block; width: 100%; height: auto; }

.civap-loader .letter {
  font-family: "Arial", sans-serif;
  font-size: 65px;
  font-weight: 950;
  fill: transparent;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: civap-draw-letter 4s ease-in-out infinite;
}

.civap-loader .letter-c { animation-delay: 0s; }
.civap-loader .letter-i { animation-delay: 0.5s; }
.civap-loader .letter-v { animation-delay: 1s; }
.civap-loader .letter-a { animation-delay: 1.5s; }
.civap-loader .letter-p { animation-delay: 2s; }

@keyframes civap-draw-letter {
  0% { stroke-dashoffset: 400; opacity: 0; }
  10% { opacity: 1; }
  48% { stroke-dashoffset: 0; }
  72% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -400; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .civap-login-loader { transition: none; }
  .civap-loader .letter { animation: none; stroke-dashoffset: 0; opacity: 1; }
}
