.switch {
  padding-left: 64px;
  overflow: hidden;
  position: relative;

  > input {
    appearance: none;
    position: absolute;
    width: inherit;
    height: inherit;
    opacity: 0;
    left: 0;
    top: 0;
  }

  > label {
    position: relative;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
  }

  > label:before {
    cursor: pointer;
    display: inline-block;
    border-radius: 25px;
    height: 25px;
    width: 58px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 25px;
    text-align: center;
    background: #aaa;
    transition: 0.2s background-color ease-out;
    margin-left: -64px;
    margin-right: 6px;
  }

  > input:checked + label:before {
    background: $brand-info;
  }

  > input:disabled + label:before {
    cursor: not-allowed;
    background: mix(#aaa, #fff, 30%);
  }
  > input:checked:disabled + label:before {
    background: mix($brand-primary, #fff, 30%);
  }

  > label:before {
    content: attr(data-off);
    padding-left: 20px;
    padding-right: 0;
  }

  > input:checked + label:before {
    content: attr(data-on);
    padding-right: 20px;
    padding-left: 0;
  }

  > label:after {
    cursor: pointer;
    content: "";
    margin: 1px;
    border-radius: 19px;
    width: 19px;
    height: 19px;
    display: block;
    background: #fff;
    position: absolute;
    top: 2px;
    left: -62px;
    z-index: 2;
    transition: 0.2s left ease-out;
  }

  > input:checked + label:after {
    left: -29px;
  }

}
