@import "../colors";
@import "../variables";
@import "../mixins";

.Checkbox {
    @include input-control;
}

/* stylelint-disable max-nesting-depth, no-descending-specificity */
.Checkbox-faker {
    &::after {
        background: $color_action_main;
        content: "";
        height: 2px;
        left: 50%;
        opacity: 0;
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
        visibility: hidden;
        width: 10px;
    }

    .Checkbox-input-semiselected + & {
        border-color: $color_action_main;
        color: $color_action_main;
    }

    .Checkbox-input-semiselected + &,
    .Checkbox-input-semiselected:checked + & {
        .Checkbox-icon {
            opacity: 0;
            visibility: hidden;
        }

        &::after {
            opacity: 1;
            visibility: visible;
        }
    }
}
/* stylelint-enable max-nesting-depth, no-descending-specificity */
