@import '../../assets/sass/global.scss';

// Colors
$toggle-colour-disabled: $disabled-fill-color;
$toggle-colour: $color-blue-gtc;
$toggle-colour-focus: $primary-color-hover-px;

$focus-color: $primary-color-hover-px;

//--------------------------------------------------------------------------------------------
//-------------------------------------- Toggle-wrap -----------------------------------------
.gtc-rc-toggle-wrap {
  display: flex;
  justify-content: start;
}
//------------------------------- Toggle-Label directions ------------------------------------
.gtc-rc-top-label-wrap {
  flex-direction: column-reverse;
}
.gtc-rc-right-label-wrap {
  flex-direction: row;
  align-items: start;
}
.gtc-rc-bottom-label-wrap {
  flex-direction: column;
}
.gtc-rc-left-label-wrap {
  flex-direction: row-reverse;
  align-items: center;
}
//--------------------------------------------------------------------------------------------
//---------------------------------------- Label ---------------------------------------------

.gtc-rc-switch-label-div {
  margin: 5px;
  font-weight: 410;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.54px;
}
//--------------------------------------------------------------------------------------------
//--------------------------------------- Toggle ---------------------------------------------

.gtc-rc-toggle-switch {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  //-webkit-user-select: none;
  //-moz-user-select: none;
  //-ms-user-select: none;
  text-align: left;
  &-checkbox {
    display: none;
  }
  &-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    border: 0 solid $toggle-colour-disabled;
    border-radius: 20px;
    margin: 0;
    &:focus {
      outline: none;
      > span {
        box-shadow: 0 0 2px 5px $focus-color;
      }
    }
    > span:focus {
      outline: none;
    }
  }
  &-inner {                         //BALL
    display: block;
    width: 200%;
    margin-left: -100%;
    transition: margin 0.3s ease-in 0s;
    &:before,
    &:after {
      display: block;
      float: left;
      width: 50%;
      height: 34px;
      padding: 0;
      line-height: 34px;
      font-size: 13px;
      color: $text-color-white;
      font-weight: bold;
      box-sizing: border-box;
    }
    &:before {
      content: attr(data-yes);
      text-transform: capitalize;
      padding-left: 15px;
      background-color: $toggle-colour;
      color: $text-color-white;
    }
    &:focus{
      background-color: $toggle-colour-focus;
    }
  }
  &-disabled {
    background-color: $toggle-colour-disabled;
    cursor: not-allowed;
    &:before {
      background-color: $toggle-colour-disabled;
      cursor: not-allowed;
    }
  }
  &-inner:after {
    content: attr(data-no);
    text-transform: capitalize;
    padding-right: 15px;
    background-color: $toggle-colour-disabled;
    color: $text-color-white;
    text-align: right;
  }
  &-switch {
    display: block;
    width: 30px;
    height: 30px;
    margin: 5px;
    background: $text-color-white;
    position: absolute;
    top: -3px;
    bottom: 0;
    border: 0 solid $toggle-colour-disabled;
    border-radius: 20px;
    transition: all 0.35s ease-in 0s;
  }

  &-checkbox:checked + &-label {
    .gtc-rc-toggle-switch-inner {
      margin-left: 0;
    }
    .gtc-rc-toggle-switch-switch {
      right: -3px !important;
    }
  }

  &.gtc-rc-small-switch {
    width: 60px;
    height: 30px;

    .gtc-rc-toggle-switch-inner {
      &:after,
      &:before {
        height: 28px;
        line-height: 28px;
      }
    }
    .gtc-rc-toggle-switch-switch {
      width: 24px;
      height: 24px;
      right: 29px;
      margin: 5px;
    }
  }

  &.gtc-rc-medium-switch {
    width: 80px;
    height: 30px;
    
    .gtc-rc-toggle-switch-inner {
      &:after,
      &:before {
        height: 28px;
        line-height: 28px;
      }
    }
    .gtc-rc-toggle-switch-switch {
      width: 24px;
      height: 24px;
      right: 49px;
      margin: 5px;
    }
  }

  &.gtc-rc-large-switch {
    width: 100px;
    height: 30px;
    .gtc-rc-toggle-switch-inner {
      &:after,
      &:before {
        height: 28px;
        line-height: 28px;
      }
    }
    .gtc-rc-toggle-switch-switch {
      width: 24px;
      height: 24px;
      right: 69px;
      margin: 5px;
    }
  }

  &.gtc-rc-xlarge-switch {
    width: 130px;       //<<<<<<<
    height: 30px;
    .gtc-rc-toggle-switch-inner {
      &:after,
      &:before {
        height: 28px;
        line-height: 28px;
      }
    }
    .gtc-rc-toggle-switch-switch {
      width: 24px;
      height: 24px;
      right: 99px; //calc(100% - 31px);            //<<<<<<<<<<<
      margin: 5px;
    }
  }

  &.gtc-rc-xxlarge-switch {
    width: 150px;       //<<<<<<<
    height: 30px;
    .gtc-rc-toggle-switch-inner {
      &:after,
      &:before {
        height: 28px;
        line-height: 28px;
      }
    }
    .gtc-rc-toggle-switch-switch {
      width: 24px;
      height: 24px;
      right: 119px; //calc(100% - 31px);            //<<<<<<<<<<<
      margin: 5px;
    }
  }

  &.gtc-rc-dynamic-switch {
    //width: 150px;       //<<<<<<<
    height: 30px;
    .gtc-rc-toggle-switch-inner {
      &:after,
      &:before {
        height: 28px;
        line-height: 28px;
      }
    }
    .gtc-rc-toggle-switch-switch {
      width: 24px;
      height: 24px;
      right: calc(100% - 31px);            //<<<<<<<<<<<
      margin: 5px;
    }
  }
  
/*   @media screen and (max-width: 991px) {
    transform: scale(0.9);
  }
  @media screen and (max-width: 767px) {
    transform: scale(0.825);
  }
  @media screen and (max-width: 575px) {
    transform: scale(0.75);
  } */
}
