// @import "./variables.scss";
.#{$namespace}switch {
  position: relative;
  vertical-align: middle;
  width: $switch-width;
  height: $switch-height;
  display: inline-block;
  cursor: pointer;
  input {
    visibility: hidden;
  }
  input[type=checkbox]:checked + label {
    background: $switch-panel-open-background;
    &::after {
      left: $switch-button-open-left;
    }
  }
  label {
    position: absolute;
    top: 0;
    left: 0;
    width: $switch-panel-width;
    height: $switch-panel-height;
    background: $switch-panel-close-background;
    box-shadow: $switch-panel-box-shadow;
    border-radius: $switch-panel-border-radius;
    cursor: pointer;
    transition: all .2s ease;

    &::after {
      position: absolute;
      content: "";
      top: 1px;
      left: 1px;
      width: $switch-button-width;
      height: $switch-button-height;
      border-radius: $switch-button-border-radius;
      box-shadow: $switch-button-box-shadow;
      background: $switch-button-background;
      transition: all .2s;
    }
  }
  
  &.#{$namespace}switch-disabled {
    cursor: not-allowed;
    * {
      cursor: not-allowed !important;
    }
    input[disabled] + label {
      background-color: $switch-button-disabled-close-background;
    }
    input[disabled]:checked + label {
      background: $switch-button-disabled-open-background;
    }    
  }
}