add_action( 'wp_head', function () { ?>
<style>
/* custom radio styling for contact form 7 checkbox */
span.wpcf7-list-item {
display: inline-block;
margin: 0;
}
.wpcf7 .wpcf7-list-item {
display: block;
margin-bottom: 10px;
}
.wpcf7-radio label {
position: relative;
cursor: pointer;
}
.wpcf7-radio input[type="checkbox"] {
/*position: relative;*/
position: absolute;
visibility: hidden;
width: 30px;
height: 30px;
top: 0;
left: 0;
}
.wpcf7-radio input[type="radio"] + span:before {
display: block;
position: absolute;
content: '';
border-radius: 100%;
height: 30px;
width: 30px;
top: 0px;
left: 0px;
border: 2px solid #d9002a;
}
.wpcf7-radio input[type="radio"] + span:after {
display: block;
position: absolute;
content: '';
border-radius: 100%;
height: 12px;
width: 12px;
top: 9px;
left: 9px;
visibility: hidden;
}
.wpcf7-radio input[type="radio"]:checked + span:before {
background: transparent;
}
.wpcf7-radio input[type="radio"]:checked + span:after {
visibility: visible;
}
.wpcf7-list-item-label {
margin-left: 40px;
display: inline-block;
}
.wpcf7-form .wpcf7-radio input[type=radio] {
position: relative;
visibility: hidden;
}
.wpcf7-form .wpcf7-radio input[type=radio]:checked + span:after {
background: #222;
visibility: visible;
}
.wpcf7-checkbox label {
position: relative;
cursor: pointer;
}
.wpcf7-checkbox input[type="checkbox"] {
/*position: relative;*/
position: absolute;
visibility: hidden;
width: 30px;
height: 30px;
top: 0;
left: 0;
}
.wpcf7-checkbox input[type="checkbox"] + span:before {
display: block;
position: absolute;
content: "";
border-radius: 0;
height: 30px;
width: 30px;
top: 0px;
left: 0px;
border: 2px solid #d9002a;
}
.wpcf7-checkbox input[type="checkbox"] + span:after {
display: block;
position: absolute;
content: "\2713";
color: #000;
height: 30px;
width: 30px;
top: 0;
left: 0;
visibility: hidden;
font-size: 18px;
text-align: center;
line-height: 30px;
font-weight: 600;
}
.wpcf7-checkbox input[type="checkbox"]:checked + span:before {
background: transparent;
}
.wpcf7-checkbox input[type="checkbox"]:checked + span:after {
visibility: visible;
}
</style>
<?php } );