body {
font-family: Arial, sans-serif;
padding: 20px;
background-color: #f0f0f0;
display: flex; justify-content: center; align-items: center; min-height: 100vh;
}
.form-group {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.custom-radio {
display: block;
position: relative;
padding-left: 30px;
margin-bottom: 12px;
cursor: pointer;
font-size: 16px;
user-select: none;
color: #333;
}
/* Hide the browser's default radio button */
.custom-radio input[type="radio"] {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom radio button */
.radio-style {
position: absolute;
top: 0;
left: 0;
height: 20px;
width: 20px;
background-color: #eee;
border: 1px solid #ccc;
border-radius: 50%;
transition: background-color 0.2s ease;
}
/* On mouse-over, add a grey background color */
.custom-radio:hover input ~ .radio-style {
background-color: #ddd;
}
/* When the radio button is checked, add a blue background */
.custom-radio input:checked ~ .radio-style {
background-color: #2196F3;
border-color: #2196F3;
}
/* Create the indicator (the dot/circle - hidden when not checked) */
.radio-style:after {
content: "";
position: absolute;
display: none;
}
/* Show the indicator (dot/circle) when checked */
.custom-radio input:checked ~ .radio-style:after {
display: block;
}
/* Style the indicator (dot/circle) */
.custom-radio .radio-style:after {
top: 6px;
left: 6px;
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
}