@use '../../_global/styles/mixins' as *;
@use '../../_global/styles/vars' as *;

input[type="checkbox"].form-control {
  width: 20px;
  padding: 0;
}

input[type="checkbox"], input[type="radio"] {
  --input-size: 20px;
  position: relative;
  display: inline-block;
  vertical-align: top;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--swatches-neutrals-white);
  border: 1px solid var(--swatches-primary-500);
  width: var(--input-size);
  height: var(--input-size);
  border-radius: var(--border-radius-xs);
  background-size: 20px;
  background-position: center;
  background-repeat: no-repeat;
  transition: 0.25s ease;
  margin: 0 9px 0 0;
  @include focus-visible;

  &:checked {
    background-image: url("../../assets/img/check.svg");
    background-color: var(--swatches-primary-500);
  }

  &.half-checked {
    background-image: url("../../assets/img/half-check.svg");
    background-color: var(--swatches-secondary-500);
  }

  ~ label {
    display: inline-block;
    vertical-align: top;
    //max-width: calc(100% - 40px);
    margin-top: 0;
    margin-bottom: 0;
    font-size: var(--font-size-copy);
    line-height: 1.2;

    @media(max-width: 767px) {
      margin-top: 2px;
    }
  }
}

input[type="radio"] {
  --input-size: 22px;
  border-radius: 50%;
  margin: -1px 8px 0 -1px;
}
