@import '../global-sass-files/variables';
@import '../global-sass-files/fonts';
@import '../global-sass-files/grid';

// Switcher
.switcher {
  padding: 0px 10px;
  .switch {
    position: relative;
    display: inline-block;
    width: 69px;
    height: 23px;
    overflow: hidden;
    input {
      display:none;
    }
    &-slider {
      width: 67px;
      height: 21px;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #f4f4f4;
      border: 1px solid #dcdcdc;
      -webkit-transition: .4s;
      transition: .4s;
      cursor: pointer;
    }
    &-slider:before {
      content: "";
      position: absolute;
      height: 19px;
      width: 19px;
      text-align: center;
      color: #373737;
      font-size: 12px;
      line-height: 14px;
      font-family: $primary-font-regular;
      line-height: 19px;
      background-color: $white-color;
      border: 1px solid #dcdcdc;
      -webkit-transition: .4s;
      transition: .4s;
    }
    &-status {
      font-family: $primary-font-regular;
      line-height: 19px;
      font-size: 12px;
      position: absolute;
      cursor: pointer;
      -webkit-transition: .4s;
      transition: .4s;
      &-show {
        color: $white-color;
        left: -30px;
        top: 1px;
        visibility: hidden;
      }
      &-hide {
        color: #373737;
        right: 15px;
        top: 1px;
      }
    }
  }
  .switch-active {
    .switch-status-hide {
      visibility: hidden;
      right: -40px;
    }
    .switch-status-show {
      visibility: visible;
      left: 11px;
    }
  }
  input + .switch-slider:after {
    content: "";
    height: 21px;
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding-right: 15px;
    color: #373737;
    font-size: 12px;
    line-height: 20px;
    font-family: $primary-font-regular;
    padding-left: 26px;
    line-height: 18px;
    -webkit-transition: .75s;
    transition: .75s;
  }
  input:checked + .switch-slider:after {
    content: "";
    padding-left: 15px;
    text-align: left;
    background: $content-green-color;
    width: 67px;
    height: 21px;
    border-radius: 21px;
    color: $white-color;
  }
  input:checked + .switch-slider:before {
    -webkit-transform: translateX(46px);
    -ms-transform: translateX(46px);
    transform: translateX(46px);
  }

  /* Rounded sliders */
  .switch-slider.switch-round {
    border-radius: 11px;
  }
  .switch-slider.switch-round:before {
    width: 19px;
    border-radius: 19px;
  }
  &-title, &-status {
    display: block;
    color: #4e4d4d;
    font-size: 12px;
    line-height: 14px;
    font-family: $primary-font-regular;
  }
  &-title {
    margin-bottom: 10px;
    min-height: 14px;
    font-weight: bold;
  }
  &-status {
    margin-bottom: 5px;
  }
}
