/* cube from https://codepen.io/spevv/pen/sdxoC */
/* text from https://codepen.io/pixelmimic/pen/kCxBu */
.loading-mask {
  background: #333;
  height: 100vh;
  left: 0;
  opacity: 0.7;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 2110;
}

.loader {
  left: 50%;
  margin: -51px 0 0 -100px;
  position: fixed;
  top: 50%;
  width: 250px;
  z-index: 2115;
}

/* cubes */

.spinner {
  margin: 25px auto;
  width: 53px;
  height: 53px;
  position: relative;
}

.cube1,
.cube2,
.cube3,
.cube4 {
  background-color: #fff;
  width: 10px;
  height: 10px;
  position: absolute;
  top: 0;
  left: 0;
  -webkit-animation: cubemove 1.8s infinite ease-in-out;
  animation: cubemove 1.8s infinite ease-in-out;
}

.cube2 {
  -webkit-animation-delay: -0.1s;
  animation-delay: -0.1s;
}

.cube3 {
  -webkit-animation-delay: -0.2s;
  animation-delay: -0.2s;
}

.cube4 {
  -webkit-animation-delay: -0.3s;
  animation-delay: -0.3s;
}

@-webkit-keyframes cubemove {
  25% {
    -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5);
  }

  50% {
    -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg);
  }

  75% {
    -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
  }

  100% {
    -webkit-transform: rotate(-360deg);
  }
}

@keyframes cubemove {
  25% {
    transform: translateX(42px) rotate(-90deg) scale(0.5);
    -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5);
  }

  50% {
    transform: translateX(42px) translateY(42px) rotate(-179deg);
    -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg);
  }

  50.1% {
    transform: translateX(42px) translateY(42px) rotate(-180deg);
    -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg);
  }

  75% {
    transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
    -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
  }

  100% {
    transform: rotate(-360deg);
    -webkit-transform: rotate(-360deg);
  }
}

/* text */
#text,
.loading_text_area {
  color: #fff;
  font: 25px "Open Sans";
  font-weight: 600;
  text-align: center;
}

#text span,
.loading_text_area span {
  margin-top: 20px;
  -webkit-animation: color 1.5s linear infinite;
  -moz-animation: color 1.5s linear infinite;
  -ms-animation: color 1.5s linear infinite;
  -o-animation: color 1.5s linear infinite;
  animation: color 1.5s linear infinite;
}

#text span:nth-child(1),
.loading_text_area span:nth-child(1) {
  -webkit-animation-delay: 0s;
  -moz-animation-delay: 0s;
  -ms-animation-delay: 0s;
  -o-animation-delay: 0s;
  animation-delay: 0s;
}

#text span:nth-child(2),
.loading_text_area span:nth-child(2) {
  -webkit-animation-delay: 0.25s;
  -moz-animation-delay: 0.25s;
  -ms-animation-delay: 0.25s;
  -o-animation-delay: 0.25s;
  animation-delay: 0.25s;
}

#text span:nth-child(3),
.loading_text_area span:nth-child(3) {
  -webkit-animation-delay: 0.45s;
  -moz-animation-delay: 0.45s;
  -ms-animation-delay: 0.45s;
  -o-animation-delay: 0.45s;
  animation-delay: 0.45s;
}

#text span:nth-child(4),
.loading_text_area span:nth-child(4) {
  -webkit-animation-delay: 0.55s;
  -moz-animation-delay: 0.55s;
  -ms-animation-delay: 0.55s;
  -o-animation-delay: 0.55s;
  animation-delay: 0.55s;
}

#text span:nth-child(5),
.loading_text_area span:nth-child(5) {
  -webkit-animation-delay: 0.65s;
  -moz-animation-delay: 0.65s;
  -ms-animation-delay: 0.65s;
  -o-animation-delay: 0.65s;
  animation-delay: 0.65s;
}

#text span:nth-child(6),
.loading_text_area span:nth-child(6) {
  -webkit-animation-delay: 0.75s;
  -moz-animation-delay: 0.75s;
  -ms-animation-delay: 0.75s;
  -o-animation-delay: 0.75s;
  animation-delay: 0.75s;
}

#text span:nth-child(7),
.loading_text_area span:nth-child(7) {
  -webkit-animation-delay: 0.85s;
  -moz-animation-delay: 0.85s;
  -ms-animation-delay: 0.85s;
  -o-animation-delay: 0.85s;
  animation-delay: 0.85s;
}

#text span:nth-child(8),
.loading_text_area span:nth-child(8) {
  -webkit-animation-delay: 0.95s;
  -moz-animation-delay: 0.95s;
  -ms-animation-delay: 0.95s;
  -o-animation-delay: 0.95s;
  animation-delay: 0.95s;
}

#text span:nth-child(9),
.loading_text_area span:nth-child(9) {
  -webkit-animation-delay: 1.05s;
  -moz-animation-delay: 1.05s;
  -ms-animation-delay: 1.05s;
  -o-animation-delay: 1.05s;
  animation-delay: 1.05s;
}

#text span:nth-child(10),
.loading_text_area span:nth-child(10) {
  -webkit-animation-delay: 1.15s;
  -moz-animation-delay: 1.15s;
  -ms-animation-delay: 1.15s;
  -o-animation-delay: 1.15s;
  animation-delay: 1.15s;
}

@-webkit-keyframes color {
  0% {
    color: #fff;
  }

  50% {
    color: transparent;
  }

  100% {
    color: #fff;
  }
}
