/* Checkbox */

.ckbox {
  font-weight: normal;
  position: relative;
  display: block;
  line-height: 1;

  span {
    padding-inline-start: 15px;

    &:empty {
      float: $float-start;
    }

    &:before,
    &:after {
      line-height: 18px;
      position: absolute;
    }

    &:before {
      content: "";
      width: 16px;
      height: 16px;
      background-color: rgb($white) ;
      border: 1px solid #{$form-border};
      inset-block-start: 1px;
      inset-inline-start: 0;
      border-radius: 3px;
    }

    &:after {
      inset-block-start: 1px;
      inset-inline-start: 0;
      width: 16px;
      height: 16px;
      content: "";
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");
      background-size: 65%;
      background-repeat: no-repeat;
      background-position: 55% 45%;
      background-color: #{$primary};
      line-height: 17px;
      display: none;
      border-radius: 3px;
    }

    &:empty {
      padding-inline-start: 0;
      width: 3px;
    }
  }

  input[type="checkbox"] {
    opacity: 0;
    margin: 0;

    &:checked + span:after {
      display: block;
    }

    &[disabled] + span {
      opacity: 0.75;

      &:before,
      &:after {
        opacity: 0.75;
      }
    }
  }
}

.ckbox-inline {
  display: inline-block;
}
.custom-control-label-md {
  padding: 2px 10px;
  font-size: 14px;
}
.custom-control-label-lg {
  padding: 0.25rem 1.25rem;
  font-size: 1rem;
}
.custom-switch {
  padding-inline-start: 0 !important;
}
