@import '../variables/default.scss';
@import '../mixins/index.scss';

$ink-switch-size: 64px !default;

.ink-switch {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: 2em;
  height: 1em;
  font-size: $ink-switch-size;
  background-color: $ink-color-white;
  border: $ink-one-px solid rgba(0, 0, 0, 0.1);
  border-radius: 1em;
  cursor: pointer;
  transition: background-color 0.3s;

  &--disabled {
    opacity: $ink-opacity-disabled;
  }

  &--on {
    background-color: $ink-color-brand;

    .ink-switch__node {
      transform: translate3d(1em, 0, 0);
    }
  }

  &__node {
    position: absolute;
    top: 0;
    left: 0;
    /* prettier-ignore */
    width: calc(1em - 2PX);
    /* prettier-ignore */
    height: calc(1em - 2PX);
    background-color: $ink-color-white;
    border-radius: 100%;
    box-shadow: 0 6px 2px 0 rgb(0 0 0 / 5%), 0 4px 4px 0 rgb(0 0 0 / 10%), 0 6px 6px 0 rgb(0 0 0 / 5%);
    transition: transform 0.3s $ink-ease-in-quad;
  }
}
