@mixin coveo-generic-loading-animation {
  .coveo-loading-container {
    @include transform(translate3d(0, 0, 0));
    @include transform(rotatex(0));
    .coveo-loading-dot {
      background-color: rgba(20, 20, 20, 0.9);
      background: rgba(20, 20, 20, 0.9);
      border-radius: 5px;
      box-shadow: inset 0 0 5px #000, 0 1px 1px rgba(255, 255, 255, 0.1);
      display: inline-block;
      width: 8px;
      height: 8px;
      margin: 0 4px;
      border-radius: 50%;
      opacity: 0;
      box-shadow: 0 0 2px black;
      @include animation(loadingFade 1s infinite);
    }
    .coveo-loading-dot:nth-child(1) {
      -webkit-animation-delay: 100ms;
      -moz-animation-delay: 100ms;
      animation-delay: 100ms;
    }
    .coveo-loading-dot:nth-child(2) {
      -webkit-animation-delay: 200ms;
      -moz-animation-delay: 200ms;
      animation-delay: 200ms;
    }
    .coveo-loading-dot:nth-child(3) {
      -webkit-animation-delay: 300ms;
      -moz-animation-delay: 300ms;
      animation-delay: 300ms;
    }
    .coveo-loading-dot:nth-child(4) {
      -webkit-animation-delay: 400ms;
      -moz-animation-delay: 400ms;
      animation-delay: 400ms;
    }
  }
}

@mixin coveo-first-loading-animation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  padding-top: 100px;
  background: #f7f7f7;
  @include coveo-generic-loading-animation;
  .coveo-loading-container {
    margin-top: 15px;
  }
}

.coveo-loading-spinner {
  margin: 3em auto;
  font-size: 10px;
  position: relative;
  text-indent: -9999em;
  border: 0.7em solid rgba(128, 128, 128, 0.2);
  border-left-color: rgb(128, 128, 128);
  -webkit-animation: coveo-loading-spinner-animation 1.1s infinite linear;
  animation: coveo-loading-spinner-animation 1.1s infinite linear;
}

.coveo-loading-spinner-container {
  width: 100%;
}

.coveo-loading-spinner,
.coveo-loading-spinner:after {
  border-radius: 50%;
  width: 3em;
  height: 3em;
}

@-webkit-keyframes coveo-loading-spinner-animation {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes coveo-loading-spinner-animation {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
