.custom_form_element {
    align-items: center;
    display: inline-flex;
    margin-bottom: 0.3rem;
    width: 100%;
}

.form-group > .custom_form_element:last-of-type {
    margin-bottom: 0;
}

.custom_form_element > label {
    margin-bottom: 0;
}

.custom_form_element > input,
.custom_form_element > label {
    cursor: pointer;
}

input.custom_radio,
input.custom_checkbox {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 1rem;
    min-width: 1rem;
    height: 1rem;
    margin: 0;
}

input.custom_radio.labeled,
input.custom_checkbox.labeled {
    margin-right: 0.3em;
}

input.custom_checkbox:before {
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    background: #fff;
    border: 0.1rem solid #ddd;
}

input.custom_checkbox:checked:before,
input.custom_checkbox:hover:before {
    border: 0.1rem solid #000;
}

input.custom_checkbox:checked:before {
    background: #000;
}

input.custom_checkbox.primary:checked:before,
input.custom_checkbox.primary:hover:before {
    border: 0.1rem solid #34495e;
}

input.custom_checkbox.primary:checked:before {
    background: #34495e;
}

input.custom_checkbox:checked:after {
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
    font-size: 0.5em;
    content: "\f00c";
    color: #fff;
    position: absolute;
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
}

input.custom_checkbox:disabled:before,
input.custom_checkbox:disabled:checked:before,
input.custom_checkbox:disabled:hover:before {
    border: 0.1rem solid #eee;
}

input.custom_checkbox:disabled:checked:before {
    background: #eee;
}

input.custom_radio:before {
    font-family: "Font Awesome 5 Pro";
    font-weight: 300;
    font-size: 1rem;
    content: "\f111";
    color: #34495e;
}

input.custom_radio:checked:before,
input.custom_radio:hover:before {
    font-weight: 500;
}

input.custom_radio.primary:checked:before {
    content: "\f192";
    font-weight: 900;
}

input.custom_radio:disabled:before,
input.custom_radio:disabled:checked:before,
input.custom_radio:disabled:hover:before {
    color: #eee;
}