
input[type=radio],
input[type=checkbox] {
    visibility: hidden;
    position: absolute;
    margin-top: 5px;
}

input[type=radio] + span:before,
input[type=checkbox] + span:before {
    content: " ";
    display: inline-block;
    vertical-align: baseline;
    height: 12px;
    width: 12px;
    margin-right: 5px;
    border: 1px solid #777;
}

input[type=radio]:checked + span:before,
input[type=checkbox]:checked + span:before {
    background: #007bff;
    border-color: #007bff;
}

input[type=radio] + span:before {
    border-radius: 50%;
}

input[type=checkbox] + span:before {
    border-radius: 2px;
}