@mixin customRadio {
    opacity: 0;
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    & + label {
        margin-right: 15px;
        font-size: 1.4rem;
        padding: 4px 0 4px 30px;
        max-width: 100%;
        min-height: 20px;
        text-transform: none;
        cursor: pointer;
        &:before {
            border-radius: 100%;
            margin: 0;
            position: absolute;
            left: 0;
            top: 1px;
            transition: all 250ms ease-in-out;
            border: 1px solid $gray4;
            width: 16px;
            height: 16px;
            content: "";
            display: inline-block;
            top: 50%;
            transform: translateY(-50%);
        }
        &:after {
            content: "";
            display: inline-block;
            top: 5px;
            left: 4px;
            background: $darkgray;
            width: 8px;
            height: 8px;
            border-radius: 100%;
            position: absolute;
            transform: scale(0);
            opacity: 0;
            transition: all 250ms ease-in-out;
            top: 50%;
            transform: translateY(-50%);
        }
        &:hover {
            &:before {
                border-color: $gray8;
            }
        }
    }
    &:checked + label:after {
        opacity: 1;
        transform: scale(1) translateY(-50%);
    }
}

@mixin customCheckbox {
    opacity: 0;
    display: inline-block;
    float: left;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;

    & + label {
        float: left;
        display: block;
        min-height: $height-checkbox + 5;
        padding: 0 0 4px $width-checkbox + 10;
        width: auto;
        max-width: 100%;
        text-transform: none;

        &:after {
            cursor: pointer;
            content: "";
            display: inline-block;
            width: $width-checkbox;
            height: $height-checkbox;
            border: 1px solid $grayfilet;
            border-radius: 0;
            margin: 0;
            position: absolute;
            left: 0;
            top: 0;
            background: transparent;
            transform: none;
            opacity: inherit;
            transition: none;
        }

        &:before {
            content: "";
            border: none;
            position: absolute;
            height: $height-checkbox + $padding-checkbox;
            width: $width-checkbox + $padding-checkbox;
            background: $gray8;
            left: $padding-checkbox / 2;
            top: $padding-checkbox / 2;
            transition: all 250ms ease-in-out;
            opacity: 0;
            transform: scale(0.1);
            border-radius: 0;
        }

        &:hover {
            &:after {
                border-color: $gray8;
            }
        }
    }

    &:checked + label:before,
    &:disabled + label:before {
        opacity: 1;
        transform: scale(0.5);
    }
}