.afcas-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  color: white;
  background-color: #871c1c;
}

.afcas-loading > img {
  width: 120px;
  height: auto;
  object-fit: scale-down;
}

.afcas-loading-cubes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 30px;
  height: 30px;
  margin: 2rem auto;
}

.afcas-loading-cubes > span {
  background-color: white;
  animation: afcas-cube-scale 1.3s infinite ease-in-out;
}

.afcas-loading-cubes > :nth-child(1),
.afcas-loading-cubes > :nth-child(5),
.afcas-loading-cubes > :nth-child(9) {
  animation-delay: 0.2s;
}

.afcas-loading-cubes > :nth-child(2),
.afcas-loading-cubes > :nth-child(6) {
  animation-delay: 0.3s;
}

.afcas-loading-cubes > :nth-child(3) {
  animation-delay: 0.4s;
}

.afcas-loading-cubes > :nth-child(4),
.afcas-loading-cubes > :nth-child(8) {
  animation-delay: 0.1s;
}

.afcas-loading-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes afcas-cube-scale {
  0%,
  70%,
  100% {
    transform: scale3d(1, 1, 1);
  }
  35% {
    transform: scale3d(0, 0, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .afcas-loading-cubes > span {
    animation: none;
  }
}
