/* vim: set ts=2 sw=2 sts=2 et: */

/**
 * Copyright (c) 2001-present X-Cart Holdings LLC. All rights reserved.
 * See https://www.x-cart.com/license-agreement.html for license details.
 */

.reloading {
  position: relative;
}

.reloading:before {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  content: "";
  display: block;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.9);
  animation: appear 0.3s ease-in-out;
}

.reloading.reloading-spinner:after {
  content: '';
  box-sizing: border-box;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 100px;
  height: 100px;
  z-index: 1002;
  border-radius: 50%;
  border: 2px solid #F3F3F3;
  border-top-color: #4A90E2;
  animation: spinner .6s linear infinite;
}

.reloading.reloading-animated:after {
  position: absolute;
  width: 10px;
  height: 10px;
  content: "";
  display: block;
  left: 0;
  right: 0;
  top: 0;
  margin: auto;
  opacity: 0.99;
  z-index: 1002;
  bottom: 0;
  border-radius: 100%;
  box-shadow: 10px 10px #253238, -10px 10px #F29221, -10px -10px #253238, 10px -10px #F29221;
  animation: spin ease infinite 2s;
}

.reloading .reloading-message {
  position: absolute;
}

.themetweaker-panel-wrapper .reloading-animated:after {
  transform: scale(0.8);
}

@keyframes spin {
  0%,
  100% {
    box-shadow: 10px 10px #253238, -10px 10px #F29221, -10px -10px #253238, 10px -10px #F29221;
  }
  25% {
    box-shadow: -10px 10px #F29221, -10px -10px #253238, 10px -10px #F29221, 10px 10px #253238;
  }
  50% {
    box-shadow: -10px -10px #253238, 10px -10px #F29221, 10px 10px #253238, -10px 10px #F29221;
  }
  75% {
    box-shadow: 10px -10px #F29221, 10px 10px #253238, -10px 10px #F29221, -10px -10px #253238;
  }
}

@keyframes appear {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

.reloading.reloading-circles .reloading-element {
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: 1003;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.reloading.reloading-circles .reloading-element::before, .reloading-element::after {
  content: "";
  position: absolute;
  z-index: 1003;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  top: calc(50% - 15px);
  left: calc(50% - 15px);
  animation-duration: 3s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.reloading.reloading-circles .reloading-element::before {
  border-style: solid;
  border-width: 3px 3px 0 0;
  border-color: #4A90E2 transparent transparent;
  transform: scale(0.3) rotate(0deg);
  opacity: 0.5;
  animation-name: foregroundCircle;
}

.reloading.reloading-circles .reloading-element::after {
  background: #eee;
  opacity: 0.5;
  transform: scale(0);
  animation-name: backgroundCircle;
}

/* TODO: REWRITE */
.wait-block {
  position: absolute;
  border: 1px solid #777;
  background: #fff none;
  padding: 9px;
  width: 30%;
  top: 50%;
  left: 50%;
  margin-top: -16px;
  margin-left: -15%;
  text-align: center;
}

.wait-block div {
  padding: 0;
  margin: 0;
  height: 11px;
  background: transparent url(../images/progress.gif) repeat-x left top;
}

.wait-block-overlay {
  position: absolute;
  cursor: wait;
  margin: 0px;
  padding: 0px;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

@-webkit-keyframes foregroundCircle {
  0% {
    transform: scale(0.3) rotate(0deg);
  }
  12.5% {
    transform: scale(0.3) rotate(180deg);
  }
  25%, 50% {
    opacity: 1;
  }
  50% {
    transform: scale(1) rotate(720deg);
  }
  100% {
    transform: scale(0.3) rotate(1800deg);
    opacity: 0.5;
  }
}

@keyframes foregroundCircle {
  0% {
    transform: scale(0.3) rotate(0deg);
  }
  12.5% {
    transform: scale(0.3) rotate(180deg);
  }
  25%, 50% {
    opacity: 1;
  }
  50% {
    transform: scale(1) rotate(720deg);
  }
  100% {
    transform: scale(0.3) rotate(1800deg);
    opacity: 0.5;
  }
}

@-webkit-keyframes backgroundCircle {
  12.5% {
    transform: scale(0.3);
  }
  90%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes backgroundCircle {
  12.5% {
    transform: scale(0.3);
  }
  90%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}
