@import './var.less';
@import './animations/fade.less';

.@{prefix}-loading {
  color: #999;
  &__icon {
    font-size: 16px;
    display: inline-block;
    margin: 0 auto;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    position: relative;
    border: 1px solid currentColor;
    border-radius: 50%;
    animation: VLoading ease 1s infinite;

    &::after {
      content: "";
      position: absolute;
      display: block;
      top: 0;
      left: 50%;
      margin-top: -0.125em;
      margin-left: -0.125em;
      width: 0.25em;
      height: 0.25em;
      background-color: currentColor;
      border-radius: 50%;
    }
  }

  &_normal,
  &_normal &__inner {
    display: inline-block;
  }

  &_normal &__txt-tips {
    margin-left: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    vertical-align: middle;
  }

  &_float {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10002;
    transform: translate(-50%, -50%);
  }

  &_float &__inner {
    padding: 20px 12px;
    min-width: 100px;
    min-height: 100px;
    background-color: rgba(0, 0, 0, 0.65);
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  &_float &__icon {
    display: block;
    font-size: 24px;
    color: #fff;
  }

  &_float &__txt-tips {
    display: block;
    text-align: center;
    color: var(--text-white);
    font-size: 14px;
  }
}

@keyframes VLoading {
  0% {
    transform: rotate3d(0, 0, 1, 0deg);
  }

  100% {
    transform: rotate3d(0, 0, 1, 360deg);
  }
}

.loading-fade-enter-active {
  animation: VFadeIn linear 150ms;
}

.loading-fade-leave-active {
  animation: VFadeOut linear 150ms;
}


