$spin-prefix-cls: "hfish-spin";
$default-color: #111222;
$default-size: 40px;
$btn-size: 14px;
$font-size-default: 12px;
$default-border-size: 4px;
$normal-border-size: 1px;

.#{$spin-prefix-cls} {
  position: absolute;
  text-align: center;
  vertical-align: middle;
  display: none;
  width: 100%;
  height: 100%;
  color: rgba($default-color, 0.7);
  max-height: 400px;
  opacity: 0;
  z-index: 4;
  &-spinning {
    position: static;
    display: inline-block;
    opacity: 1;
  }
  &-nested-loading {
    position: relative;
    > div > .#{$spin-prefix-cls} {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 4;
      display: block;
      width: 100%;
      height: 100%;
      max-height: 400px;
    }
  }
  &-cir {
    position: absolute;
    left: 50%;
    top: 50%;
    width: $default-size;
    height: $default-size;
    border-radius: 50%;
    box-shadow: inset 0 0 0 $normal-border-size rgba($default-color, 0.1);
    margin-left: -$default-size/2;
    margin-top: -$default-size/2;
    -webkit-animation: myRotate 10s linear infinite;
  }
  &-line-mask {
    position: absolute;
    left: 50%;
    top: 50%;
    width: $default-size/2;
    height: $default-size;
    margin-left: -$default-size/2;
    margin-top: -$default-size/2;
    overflow: hidden;
    -webkit-transform-origin: $default-size / 2 $default-size / 2;
    -moz-transform-origin: $default-size / 2 $default-size / 2;
    -ms-transform-origin: $default-size / 2 $default-size / 2;
    -o-transform-origin: $default-size / 2 $default-size / 2;
    transform-origin: $default-size / 2 $default-size / 2;
    -webkit-mask-image: -webkit-linear-gradient(
      top,
      #fff,
      rgba($default-color, 0)
    );
    -webkit-animation: rotate 1.2s infinite linear;
    -moz-animation: rotate 1.2s infinite linear;
    -o-animation: rotate 1.2s infinite linear;
    animation: rotate 1.2s infinite linear;
    animation: myRotate 2s linear infinite;
    .#{$spin-prefix-cls}-line {
      width: $default-size;
      height: $default-size;
      border-radius: 50%;
      box-shadow: inset 0 0 0 $normal-border-size rgba($default-color, 0.7);
      display: inline-block;
    }
  }
  &-text {
    position: absolute;
    top: 50%;
    width: 100%;
    padding-top: ($default-size - $font-size-default)/2 + 8px;
    line-height: 1.5715;
    text-shadow: 0 1px 2px #fff;
    font-size: $font-size-default;
  }
  &-container {
    position: relative;
    transition: opacity 0.3s;
  }
  &-blur {
    clear: both;
    overflow: hidden;
    opacity: 0.5;
    user-select: none;
    pointer-events: none;
  }
}
@-webkit-keyframes myRotate {
  0% {
    -webkit-transform: rotate(0deg);
  }

  50% {
    -webkit-transform: rotate(180deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes myRotate {
  0% {
    -webkit-transform: rotate(0deg);
  }

  50% {
    -webkit-transform: rotate(180deg);
  }

  100% {
    -webkit-transform: rotate(360deg);
  }
}
