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

// Checkbox
.custom-control {
  position: relative;
  display: block;
  padding-left: 15px;
  min-height: 16px;
  .form-check-input,
  .custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
    &:focus~ {
      .custom-control-label::before {
        box-shadow: none;
      }
    }
  }
  &.custom-checkbox {
    margin-bottom: 10px;
    .custom-control-label {
      padding-left: 5px;
      text-align: left;
      font-size: 12px;
      line-height: 12px;
      font-family: $primary-font-regular;
      color: rgb(36,47,58);
      display: block;
      margin-bottom: 5px;
      &::before, &:after {
        position: absolute;
        top: -1px;
        left: -1px;
        display: block;
        width: 15px;
        height: 15px;
        border-radius: 0;
        content: "";
        cursor: pointer;
      } 
      &:before {
        background: url("../../img/icons/checkbox-buttons-stripe.png") no-repeat;
        background-position: -8px -16px;
      }
    }
    &.white {
      min-height: 0;
      .custom-control-label {
        line-height: 17px;
        margin-left: 5px;
        color: $white-color;
        &:before {
          background: url("../../img/icons/checkbox-buttons-stripe-white.png") no-repeat;
          background-position: 0px -3px;
          width: 20px;
          height: 20px;
        }
      }
    }
    &.blue {
      min-height: 0;
      .custom-control-label {
        line-height: 17px;
        margin-left: 3px;
        &:before {
          background: url("../../img/icons/checkbox-buttons-stripe-blue.png") no-repeat;
          background-position: -1px -4px;
          width: 20px;
          height: 20px;
        }
      }
    }
    &.light-blue {
      min-height: 0;
      .custom-control-label {
        line-height: 17px;
        margin-left: 3px;
        &:before {
          background: url("../../img/icons/checkbox-buttons-stripe-light-blue.png") no-repeat;
          background-position: -1px -4px;
          width: 20px;
          height: 20px;
        }
      }
    }
    &.green {
      .custom-control-label {
        &:before {
          background: url("../../img/icons/checkbox-buttons-stripe-green.png") no-repeat;
          background-position: -1px -4px;
          width: 16px;
          height: 16px;
        }
      }
    }
    input[type=checkbox]:checked~.custom-control-label::after {
      background: url("../../img/icons/checkbox-buttons-stripe.png") no-repeat;
      background-position: -8px -72px;
    }
    input[type=checkbox]:checked~.custom-control-label::before {
      background: none;
    }
    &.white {
      input[type=checkbox]:checked~.custom-control-label::after {
        background: url("../../img/icons/checkbox-buttons-stripe-white.png") no-repeat;
        background-position: 0px -83px;
        width: 20px;
        height: 20px;
      }
    }
    &.blue {
      input[type=checkbox]:checked~.custom-control-label::after {
        background: url("../../img/icons/checkbox-buttons-stripe-blue.png") no-repeat;
        background-position: -1px -92px;
        width: 20px;
        height: 20px;
      }
    }
    &.light-blue {
      input[type=checkbox]:checked~.custom-control-label::after {
        background: url("../../img/icons/checkbox-buttons-stripe-light-blue.png") no-repeat;
        background-position: -1px -92px;
        width: 20px;
        height: 20px;
      }
    }
    &.green {
      input[type=checkbox]:checked~.custom-control-label::after {
        background: url("../../img/icons/checkbox-buttons-stripe-green.png") no-repeat;
        background-position: -1px -99px;
        width: 16px;
        height: 16px;
      }
    }
  }
}