.wui-switch {
  position: relative;
  display: inline-block;
  /* border: 1px solid transparent; */
  min-width: 35px;
  border-radius: 10px;
  @apply bg-neutral-400 h-5;
  vertical-align: middle;
  transition: all 0.2s;
  user-select: none;
  cursor: pointer;

  &--primary {
    &--checked {
      @apply bg-primary-500;
    }
    &:hover {
      @apply bg-primary-700;
    }
    &--disabled&--checked {
      @apply bg-primary-300;

      &:hover {
        @apply bg-primary-400;
      }
    }
  }

  &--success {
    &--checked {
      @apply bg-success-500;
    }
    &:hover {
      @apply bg-success-700;
    }
    &--disabled&--checked {
      @apply bg-success-300;

      &:hover {
        @apply bg-success-400;
      }
    }
  }

  &--warning {
    &--checked {
      @apply bg-warning-500;
    }
    &:hover {
      @apply bg-warning-700;
    }
    &--disabled&--checked {
      @apply bg-warning-300;

      &:hover {
        @apply bg-warning-400;
      }
    }
  }

  &--danger {
    &--checked {
      @apply bg-danger-500;
    }
    &:hover {
      @apply bg-danger-700;
    }
    &--disabled&--checked {
      @apply bg-danger-300;

      &:hover {
        @apply bg-danger-400;
      }
    }
  }

  &--neutral {
    &--checked {
      @apply bg-neutral-500;
    }
    &:hover {
      @apply bg-neutral-700;
    }
    &--disabled&--checked {
      @apply bg-neutral-300;

      &:hover {
        @apply bg-neutral-400;
      }
    }
  }

  &--checked {
    & .wui-switch-circle {
      @apply left-full -ml-4.25;
    }
    &:active {
      & .wui-switch-circle {
        @apply !ml-0;
      }
    }
    &:focus-within {
      @apply shadow;
      /* box-shadow: 0 0 0 3px fade(@bg-color, 20%) !important; */
    }
  }
  &:focus-within {
      @apply shadow;
      /* box-shadow: 0 0 0 3px fade(@bg-color, 20%), 0 0 0 1px @bg-color; */
  }

  &--disabled {
    cursor: not-allowed !important;
    @apply !bg-neutral-300;

    & .wui-switch-circle {
      box-shadow: none;
    }

    &:hover {
      @apply !bg-neutral-500;
    }
  }

  &:active {
    & .wui-switch-circle {
      @apply w-4;
    }
  }

  /* &:hover {
    background-color: @color-neutral;
  } */

  &-circle {
    display: block;
    position: absolute;
    left: 2px;
    top: 2px;
    border-radius: 10px;
    background-color: #fff;
    transition: all 0.3s;
    cursor: inherit;
    @apply h-4 shadow-sm w-4;
  }

  .wui-switch-input {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    cursor: inherit;
    opacity: 0;
  }

  &-wrapper {
    display: flex;
  }

  &-label {
    cursor: pointer;
    transition: all 0.2s ease-out;
    white-space: pre-wrap;
    line-height: 1.3;
    display: flex;
    align-items: center;
    font-weight: 400;
    position: relative;
    vertical-align: middle;
    font-size: 14px;

    &-group {
      padding-left: 8px;
    }

    &--sub {
      @apply text-neutral-700;
      padding-top: 2px;
      line-height: 1.2;
    }

    &::before {
      transition: all 0.2s ease-out;
      position: absolute;
      width: 0;
      height: 2px;
      border-radius: 50px;
      @apply bg-neutral-700;
      content: '';
    }

    &--disabled {
      cursor: not-allowed;
      @apply text-neutral-700;
    }
  }
}
