@import '../../../assets/font/iconfont.css';

* {
  margin: 0;
  list-style: none;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.module-login {
  @include flex($direction: column);
  flex: 1;
  position: relative;
  height: 100%;
  padding: 0 16px;
  overflow: hidden;

  @include light-theme() {
    background-color: #f4f4f4;
  }

  @include dark-theme() {
    background-color: $color-gray-80;
  }

  &-header {
    @include flex($align: center);
    width: 100%;
    height: 36px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-app-region: drag;

    &-title {
      flex: 1;
    }

    .iconfont {
      margin-right: -6px;
      font-size: 20px;
      color: $color-gray-65;
      -webkit-app-region: no-drag;
      cursor: pointer;
      z-index: 1;

      &:hover {
        color: $color-gray-45;
      }
    }
  }

  &-welcome {
    // font-weight: bold;

    @include light-theme() {
      color: #070707;
    }

    @include dark-theme() {
      color: $color-gray-05;
    }

    &-highlight {
      color: $themeColor;
    }
  }

  &-tip {
    font-size: 12px;
    font-weight: 500;

    @include light-theme() {
      color: #474444;
    }

    @include dark-theme() {
      color: $color-gray-15;
    }
  }

  &-form {
    width: 100%;
    margin-top: 62px;
    padding: 0;

    & > li {
      @include flex($direction: column);
      margin-top: 12px;
      padding: 6px 8px;
      border-radius: 4px;
      border: 1px solid transparent;

      @include light-theme() {
        box-shadow: 0 4px 6px #d9d9d9;
        background-color: $color-white;
      }

      @include dark-theme() {
        box-shadow: 0 4px 6px $color-gray-60;
        background-color: $color-gray-25;
      }

      &.err {
        border: 1px solid red;
      }

      & > label {
        font-size: 12px;
        color: #070707;
        font-weight: bold;
      }

      & > input {
        width: 100%;
        margin-top: 4px;
        border: none;
        outline: none;

        @include light-theme() {
          color: #a8a4a4;
          background-color: $color-white;
        }

        @include dark-theme() {
          color: $color-gray-65;
          background-color: $color-gray-25;
        }

        &::placeholder {
          @include light-theme() {
            color: #dfdbdb;
          }

          @include dark-theme() {
            color: $color-gray-45;
          }
        }
      }
    }
  }

  &-footer {
    width: 100%;
    margin-top: 24px;
    @include flex($justify: space-between, $align: center);

    &__tip {
      font-size: 12px;
      font-weight: 500;

      @include light-theme() {
        color: #474444;
      }

      @include dark-theme() {
        color: $color-gray-15;
      }

      & > span {
        color: $themeColor;
        cursor: pointer;
      }
    }

    &__button {
      position: relative;
      width: 68px;
      height: 28px;
      line-height: 28px;
      border: none;
      outline: none;
      border-radius: 4px;
      cursor: pointer;
      overflow: hidden;

      @include light-theme() {
        color: $color-white;
        box-shadow: 0 2px 4px #9e9c9c;
        background-color: $themeColor;
      }

      @include dark-theme() {
        color: $color-white;
        box-shadow: 0 2px 4px $color-gray-45;
        background-color: $themeColor;
      }

      &:hover {
        background-color: #4ba1e2;
      }

      &::after {
        content: '';
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        pointer-events: none;
        //设置径向渐变
        background-image: radial-gradient(
          circle,
          #cccccc 10%,
          transparent 10.01%
        );
        background-repeat: no-repeat;
        background-position: 50%;
        transform: scale(10, 10);
        opacity: 0;
        transition: transform 0.3s, opacity 0.5s;
      }

      &:active::after {
        transform: scale(0, 0);
        opacity: 0.3;
        //设置初始状态
        transition: 0s;
      }

      &:disabled {
        cursor: not-allowed;
        opacity: 0.6;

        &::after {
          transition: none;
        }

        &:hover {
          background-color: $themeColor;
        }

        &:active::after {
          transform: none;
        }
      }
    }
  }
}
