// checkbox radio


.form-ui {
    position: relative;
    display: inline-block;
    vertical-align: top;
    margin: 0;
    line-height: 20px;
    font-weight: 400;
    cursor: pointer;
}

.form-ui-control{
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    outline: 0 none;
}

.form-ui-txt{
    position: relative;
    display: inline-block;
    vertical-align: top;
    padding: 2px 0 0 30px;
    &:before{
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 22px;
        height: 22px;
    }
    &:after{
        content: '';
        position: absolute;
    }
}




// radio
input[type="radio"] {
    & + .form-ui{
        .form-ui-txt{
            &:before{
                border: 1px solid #cfcfcf;
                border-radius: 50%;
            }
            &:after{
                top: 7px;
                left: 7px;
                width: 8px;
                height: 8px;
                border-radius: 50%;
            }
        }
    }

    &:disabled {
        & + .form-ui{
            .form-ui-txt{
                &:before{
                    background: #f2f2f2;
                    opacity: .6;
                }
                &:after{
                    opacity: .6;
                }
            }
        }
    }
}
// /radio




// checkbox
input[type="checkbox"] {
    & + .form-ui {
        display: flex;
        column-gap: 12px;

        .form-ui-txt {
            padding: 3px 0;
            font-size: 14px;
            font-weight: 600;
            line-height: 18px;

            &:before,
            &:after {
                content: none;
            }
        }

        .form-ui-icon {
            width: 24px;
            height: 24px;

            &--off {
                display: block;
            }

            &--on {
                display: none;
            }
        }
    }

    &:disabled + .form-ui .form-ui-icon {
        opacity: .6;
    }

    &:checked + .form-ui .form-ui-icon {
        &--off {
            display: none;
        }

        &--on {
            display: block;
        }
    }
}
// /checkbox
