@import '../variables.less';

.wm-switch-box {
  width: 96px;
  height: 48px;
  background: @color-white;

  .switch {
    display: flex;
    width: 96px;
    height: 48px;
    line-height: 48px;
    align-items: center;

    &::before {
      content: ' ';
      position: absolute;
      width: 96px;
      height: 48px;
      border-radius: 24px;
      background-color: @color-grey-eb;
    }

    &::after {
      content: ' ';
      margin-left: 5px;
      position: absolute;
      width: 40px;
      height: 40px;
      border-radius: 20px;
      background-color: @color-white;
      transform: translateX(0px);
      transition: transform 150ms linear;
    }

    &-checked {
      border-radius: 24px;
      border-color: @color-brand;
      background-color: @color-brand;

      &::before {
        transform: scale(0);
      }

      &::after {
        transform: translateX(48px);
        transition: transform 150ms linear;
      }
    }
  }

  .disabled {
    &::after {
      background-color: #f7f7f7;
    }
  }

  .checked-disabled {
    opacity: 0.3;
  }
}
