/**
 * @file
 */

/** Accuracy is not crucial for this. Impression of progress does. */
@keyframes ajaxinfullscreenbar {
  0% {
    width: 0%;
  }
  40% {
    width: 40%;
  }
  80% {
    width: 80%;
  }
  100% {
    width: 100%;
  }
}

.ajaxin {
  max-width: 100%;
  max-height: 100%;
}

.ajaxin-wrapper {
  margin: auto;
}

.ajaxin-wrapper--fs {
  position: fixed;
  z-index: 9998;
  top: 0;
  left: 0;
  display: block;
  overflow: visible;
  width: 100%;
  height: 4px;
  transition: background-color 0.2s, opacity 0.2s ease-in 0.1s;
  background: #fff;
}

.ajaxin-wrapper--fs .ajaxin-wrapper__progress {
  width: 0;
  height: 100%;
  animation: ajaxinfullscreenbar 3s infinite ease-in;
}

.is-ajaxin--done .ajaxin-wrapper--fs .ajaxin-wrapper__progress {
  width: 100%;
}

.ajaxin-wrapper.ajaxin-wrapper--fs .ajaxin {
  position: fixed;
  z-index: 99999;
  top: 30px;
  right: 30px;
  left: auto;
}

.is-blue .sk,
.is-blue.is-trans .sk::before,
.is-blue.is-bg,
.is-ajaxin--done .ajaxin-wrapper--fs.is-blue {
  background: #00aedb;
}

.is-lime .sk,
.is-lime.is-trans .sk::before,
.is-lime.is-bg,
.is-ajaxin--done .ajaxin-wrapper--fs.is-lime {
  background: #8ec127;
}

.is-orange .sk,
.is-orange.is-trans .sk::before,
.is-orange.is-bg,
.is-ajaxin--done .ajaxin-wrapper--fs.is-orange {
  background: #ef5400;
}

.is-purple .sk,
.is-purple.is-trans .sk::before,
.is-purple.is-bg,
.is-ajaxin--done .ajaxin-wrapper--fs.is-purple {
  background: #662d91;
}

.is-red .sk,
.is-red.is-trans .sk::before,
.is-red.is-bg,
.is-ajaxin--done .ajaxin-wrapper--fs.is-red {
  background: #d41243;
}

.is-trans .sk {
  background: none;
}

.ajaxin.ajaxin--wordpress .sk {
  background: #fff;
}

/** Overrides core. */
.ajax-progress-throbber.ajax-progress--ajaxin .throbber,
.ui-dialog .ajax-progress-throbber.ajax-progress--ajaxin {
  background: none;
}

.ui-dialog .ajax-progress-throbber.ajax-progress--ajaxin {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
}

.media .ajaxin-wrapper,
.b-bg ~ .ajaxin-wrapper {
  position: absolute;
  z-index: 97;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.media .ajaxin-wrapper .ajaxin.is-bg,
.b-bg ~ .ajaxin-wrapper .ajaxin.is-bg {
  margin-top: -15px;
  margin-left: -15px;
}

.is-b-loaded > .b-loader,
.b-error ~ .ajaxin-wrapper.b-loader {
  display: none;
}
