.custom-input {
    --unchecked: #27272a;
    --checked: #1379f0;
    --stroke: 1px;
    --inset: 3px;
    --size: 20px;
    --gap: 10px;

    position: relative;

    &.disabled-option {
        opacity: 0.6;
        cursor: not-allowed !important;
        background-color: transparent !important;
    }

    &:before,
    &:after {
        content: "";
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }

    &:before {
        left: 0;
        height: var(--size);
        width: var(--size);
        box-shadow: inset 0 0 0 var(--stroke) var(--unchecked);
        border-radius: 3px;
    }

    &:after {
        height: 0;
        width: 0;
        left: calc(var(--size) / 2);
        border-radius: 1px;
        transition: 200ms ease-out;
        background-color: var(--unchecked);
    }

    label {
        cursor: pointer;
        padding: 0.5rem 0 0.5rem calc(var(--size) + var(--gap));
        user-select: none;
    }

    &:has(input:checked):before {
        box-shadow: inset 0 0 0 var(--stroke) var(--checked);
    }

    &:has(input:checked):after {
        left: calc(var(--inset) + var(--stroke));
        height: calc(var(--size) - ((var(--inset) + var(--stroke)) * 2));
        width: calc(var(--size) - ((var(--inset) + var(--stroke)) * 2));
        background-color: var(--checked);
    }

    &:has(input:checked.indeterminate):after {
        height: 20% !important;
    }

    input {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
}

@media (max-width: 425px) {
    .custom-input {
        --size: 16px;
        --gap: 8px;
        --size: 10px;

        &:before {
            border-radius: 1.5px;
        }

        &:after {
            border-radius: 0.75px;
        }
    }
}
