/* Source: https://tobiasahlin.com/spinkit/ */
:root {
  --sk-size: 3.25em;
  --sk-color: #0c420d;
}

.sk-fold {
  position: relative;
  width: var(--sk-size);
  height: var(--sk-size);
  transform: rotateZ(45deg);
}
.sk-fold-cube {
  position: relative;
  float: left;
  width: 50%;
  height: 50%;
  transform: scale(1.1);
}

.sk-fold-cube::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: "";
  transform-origin: 100% 100%;
  animation: sk-fold 2.4s infinite linear both;
  background-color: var(--sk-color);
}
.sk-fold-cube:nth-child(2) {
  transform: scale(1.1) rotateZ(90deg);
}
.sk-fold-cube:nth-child(4) {
  transform: scale(1.1) rotateZ(180deg);
}
.sk-fold-cube:nth-child(3) {
  transform: scale(1.1) rotateZ(270deg);
}
.sk-fold-cube:nth-child(2)::before {
  animation-delay: 0.3s;
}
.sk-fold-cube:nth-child(4)::before {
  animation-delay: 0.6s;
}
.sk-fold-cube:nth-child(3)::before {
  animation-delay: 0.9s;
}

@keyframes sk-fold {
  0%,
  10% {
    transform: perspective(140px) rotateX(-180deg);
    opacity: 0;
  }
  25%,
  75% {
    transform: perspective(140px) rotateX(0deg);
    opacity: 1;
  }
  90%,
  100% {
    transform: perspective(140px) rotateY(180deg);
    opacity: 0;
  }
}

/* ========== Custom code ========================================= */

.wa-throbber {
  position: fixed;
  z-index: 1001;
  top: calc(50% - var(--sk-size) / 2);
  left: calc(50% - var(--sk-size) / 2);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wa-overlay {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(255, 255, 255, 0.5);
}
