.loading-relative{
  position: relative !important;
}
.loading-disable-scroll{
  overflow: hidden !important;
}

.loading-container {
  position: absolute;
  z-index: $z-index-loading;
  margin: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  // 页面loading
  &.loading-type-page{
    background-color: hsla(0,0%,100%,0.9);
  }

  // 弹窗式loading
  &.loading-type-modal{
    background-color: hsla(0,0%,100%,0);
  }

  // 全屏状态
  &.loading-fullscreen{
    position: fixed;
  }

  &.fade{ opacity: 0; z-index:-1;}
  &.active{ opacity: 1; z-index: $z-index-loading;}

  &.in {
    -webkit-animation: backdrop-fadeIn .3s;
    animation: backdrop-fadeIn .3s;
  }

  &.out {
    -webkit-animation: backdrop-fadeOut .3s;
    animation: backdrop-fadeOut .3s;
  }

}

// == loading图标
.loading-spinner {
  top: 50%;
  position: absolute;
  text-align: center;

  // 页面式loading
  .loading-type-page &{
    width: 100%;
  }

  // 弹窗式loading
  .loading-type-modal &{
    left: 50%;
    padding: 20px;
    min-width: 60px;
    min-height: 60px;
    border-radius: 5px;
    background-color: $white;
    color: $gray-666;
    text-overflow: ellipsis;
    font-size: 14px;
  }

  .circular {
    height: 42px;
    width: 42px;
    animation: loading-rotate 2s linear infinite;
  }

  .path{
    animation: loading-dash 1.5s ease-in-out infinite;
    stroke-dasharray: 90,150;
    stroke-dashoffset: 0;
    stroke-width: 2;
    stroke: $gray;
    stroke-linecap: round;
  }

  .loading-text{
    color: $dark;
    font-size:14px;
    margin-top:5px;
  }
}

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

@keyframes loading-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -40px;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -120px;
  }
}

@keyframes backdrop-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes backdrop-fadeOut{
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}