.form-check-input {
  --#{$prefix}form-check-bg: #{$form-check-input-bg};
  background-color: var(--#{$prefix}form-check-bg);
  border: $form-check-input-border;

  &:focus {
    border-color: $form-check-input-focus-border;
    box-shadow: $form-check-input-focus-box-shadow;
  }

  &:checked {
    background-color: $form-check-input-checked-bg-color;
    border-color: $form-check-input-checked-border-color;
    
    &[type="checkbox"] {
      @if $enable-gradients {
        --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)}, var(--#{$prefix}gradient);
      } @else {
        --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)};
      }
    }
    
    &[type="radio"] {
      @if $enable-gradients {
        --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)}, var(--#{$prefix}gradient);
      } @else {
        --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)};
      }
    }
  }

  &[type="checkbox"]:indeterminate {
    background-color: $form-check-input-indeterminate-bg-color;
    border-color: $form-check-input-indeterminate-border-color;
  }

  &:disabled {
    opacity: $form-check-input-disabled-opacity;
  }
}

.form-check-label {
  color: $form-check-label-color;
}

// Switch styles
.form-switch .form-check-input {
  --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image)};

  &:focus {
    --#{$prefix}form-switch-bg: #{escape-svg($form-switch-focus-bg-image)};
  }

  &:checked {
    @if $enable-gradients {
      --#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)}, var(--#{$prefix}gradient);
    } @else {
      --#{$prefix}form-switch-bg: #{escape-svg($form-switch-checked-bg-image)};
    }
  }
}

// Dark mode
@if $enable-dark-mode {
  @include color-mode(dark) {
    .form-switch .form-check-input:not(:checked):not(:focus) {
      --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image-dark)};
    }
  }
}