@import "../style/var.less";

:root {
  --var-loading-default-width: 100px;
}

@keyframes loading {
  0%{
    transform: rotate(0deg)
  }
  50% {
    transform: rotate(180deg);
  }
  100%{
    transform: rotate(360deg);
  }
}

.yh-loading {
  // position: absolute;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  // z-index: 2;
  .mask {
    background: rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .yh-loading-content {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 26px;
    &>div {
      position: absolute;
      display: inline-block;
      border-radius: 50%;
      background: transparent;
      &:nth-child(1) {
        width: 14px;
        height: 14px;
        border-top: 2px solid @color-danger;
        border-left: 2px solid @color-danger;
        top: 6px;
        left: 6px;
        animation: loading 1.2s ease-in infinite;
      }
      &:nth-child(2) {
        width: 18px;
        height: 18px;
        border-top: 2px solid @color-success;
        border-left: 2px solid @color-success;
        top: 4px;
        left: 4px;
        animation: loading 1.4s ease-in infinite;
      }
      &:nth-child(3) {
        width: 22px;
        height: 22px;
        border-top: 2px solid @color-warning;
        border-left: 2px solid @color-warning;
        top: 2px;
        left: 2px;
        animation: loading 1.6s ease-in infinite;
      }
      &:nth-child(4) {
        width: 26px;
        height: 26px;
        border-top: 2px solid @color-primary;
        border-left: 2px solid @color-primary;
        animation: loading 1.8s ease-in infinite;
        top: 0;
        left: 0;
      }
    }
  }
  .yh-loading-text {
    margin: 10px;
    // position: absolute;
    // top: 26px;
  }
}


