.loading {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 9999;
  &-mask {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
  }
}

.es-loading {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30vh;
  top: 0;
  margin: auto;
  transition-delay: .5s;
  -moz-transition-delay: .5s;
  -webkit-transition-delay: .5s;
  -o-transition-delay: .5s;
  &.primary {
    .spot {
      background-color: $primary-color;
    }
  }
  &.warning {
    .spot {
      background-color: #FFA51F;
    }
  }
  &.default {
    .spot {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      width: 100%;
      height: 100%;
      margin: auto;
      display: inline-block;
      border-radius: 50%;
      opacity: .5;
      -webkit-animation: ball-scale-multiple 1s linear infinite;
      animation: ball-scale-multiple 1s linear infinite;
      -webkit-animation-fill-mode: both;
      animation-fill-mode: both;
      &:nth-child(2) {
        width: 71.43%;
        height: 71.43%;
        opacity: .6;
        -webkit-animation-delay: .2s;
        animation-delay: .2s;
      }
      &:nth-child(3) {
        width: 42.86%;
        height: 42.86%;
        opacity: 1;
        -webkit-animation-delay: .4s;
        animation-delay: .4s;
      }
    }
  }
}

.loading-content {
  position: relative;
}
.switch-code-container {
  .es-switch-loading {
    position: fixed;
    bottom: vw(60);
    top: auto;
    right: vw(15);
    left: auto;
    z-index: 2;
    text-align: center;
    &.default .spot {
      -webkit-animation: none;
      &:nth-child(1) {
        opacity: 0.3;
        width: 100%;
        height: 100%;
      }
      &:nth-child(2) {
        opacity: 0.5;
        width: 79%;
        height: 79%;
      }
      &:nth-child(3) {
        width: 45px;
        height: 45px;
      }
    }
    .code-img {
      position: relative;
      top: 27px;
      z-index: 1;
      width: 25px;
      height: 25px;
    }
    .loading-close-icon {
      position: absolute;
      right: vw(3);
      top: vw(-3);
      font-size: vw(18);
      color: #FFA51F;
    }
  }
  .code-popup-body {
    width: vw(280);
    height: vw(320);
    text-align: center;
    border-radius: vw(8);
    .title {
      color: #FFA51F;
      margin-top: vw(40);
      margin-bottom: vw(15);
    }
    .code-img {
      width: vw(220);
      height: vw(220);
    }
    .icon-close {
      position: absolute;
      right: vw(10);
      top: vw(10);
      color: #999;
    }
  }
}

.van-tabbar--iphonex {
  &+.find-page {
    .es-switch-loading {
      bottom: vw(94);
    }
  }
}

@-webkit-keyframes ball-scale-multiple {
  0% {
    -webkit-transform: scale(.3);
    transform: scale(.3);
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

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

@keyframes ball-scale-multiple {
  0% {
    -webkit-transform: scale(.3);
    transform: scale(.3);
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

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