$width: 46px;
$border-radius: 13px;
$height: 25px;
$font-size: 11px;
$translate-px: 15px;
$text-translate-px: 16px;
$grey: #c8c8c8;

.oui-slide-toogle-wrapper {
  position: relative;
  display: inline-block;
  width: $width;
  height: $height;
  &:focus {
    outline: none;
  }
  input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  &.oui-checked {
    opacity: 1 !important;
  }
  .oui-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
    &:focus {
      outline: none;
    }
  }
  input + .oui-slider:before {
    content: 'OFF';
    position: absolute;
    color: #333333;
    font-size: $font-size;
    top: -1px;
    left: -1px;
    background-color: $grey;
    transition: 0.4s;
    width: 30px;
    text-align: center;
    height: 25px;
    line-height: 25px;
  }
  input:checked + .oui-slider:before {
    content: 'ON';
    color: #ffffff;
  }
  input:checked + .oui-slider:before {
    -webkit-transform: translateX($text-translate-px);
    transform: translateX($text-translate-px);
  }
  /* Rounded sliders */
  .oui-slider.round {
    border-radius: 34px;
    border: 1px solid $grey;
  }
  .oui-slider.round:before {
    border-radius: 34px;
  }
}
.oui-slide-toggle {
  &.oui-disabled {
    opacity: 0.5;
  }
  &.oui-disabled .oui-slider {
    cursor: default;
  }
  &:focus {
    outline: none;
  }
}
