/**
 * Created by hehuizhong on 2018/1/16.
 */
// .loading {
//   color: $brand-primary;
//   text-align: center;
//   vertical-align: middle;

//   &-dot {
//     position: relative;
//     display: block;
//     width: $font-size-base;
//     height: $font-size-base;
//     background-color: $brand-primary;
//     border-radius: 50%;
//     animation: ani-loading-bounce 1s 0s ease-in-out infinite;
//   }

//   &-lg &-dot {
//     width: $font-size-lg;
//     height: $font-size-lg;
//   }

//   &-sm &-dot {
//     width: $font-size-sm;
//     height: $font-size-sm;
//   }

//   &-fix {
//     position: absolute;
//     top: 0;
//     left: 0;
//     z-index: $zindex-loading;
//     width: 100%;
//     height: 100%;
//     background-color: rgba(255, 255, 255, .9);
//   }

//   &-fullscreen {
//     z-index: $zindex-loading-fullscreen;

//     &-wrapper {
//       position: fixed;
//       top: 0;
//       right: 0;
//       bottom: 0;
//       left: 0;
//     }
//   }

//   &-fix &-main {
//     position: absolute;
//     top: 50%;
//     left: 50%;
//     transform: translate(-50%, -50%);
//   }

//   &-text,
//   &-show-text &-dot {
//     display: none;
//   }

//   &-show-text &-text {
//     display: block;
//   }
// }

// @keyframes ani-loading-bounce {
//   0% {
//     transform: scale(0);
//   }

//   100% {
//     opacity: 0;
//     transform: scale(1);
//   }
// }

.#{$loading-prefix-cls} {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: $zindex-loading;
  margin: 0;
  font-size: 20px;
  color: $brand-primary;
  text-align: center;
  vertical-align: middle;
  background-color: hsla(0, 0%, 100%, .9);
  transition: opacity .3s;
  &--fix {
    position: fixed;
    z-index: $zindex-loading-fullscreen;
    font-size: 24px;
    color: #fff;
    background-color: rgba(0, 0, 0, .8);
  }
  &__main {
    position: absolute;
    top: 50%;
    width: 100%;
    text-align: center;
    transform: translateY(-50%);
  }
  .#{$icon-prefix}-loading {
    animation: loading-rotate 1s linear infinite;
  }
  &__relative {
    position: relative;
  }
  &__bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: $zindex-loading-bar;
    width: 100%;
    height: 2px;
    &__inner {
      // width: 100%;
      height: 2px;
      transition: width $transition-time linear;
      &--success {
        background: $brand-primary;
      }
      &--error {
        background: $brand-danger;
      }
    }
  }
}

@keyframes loading-rotate {
  100% {
    transform: rotate(360deg);
  }
}
