/**
 * Gravity Forms UI Enhancements
 * Makes radio button containers fully clickable
 */

/* Make the entire choice container clickable */
.gform_wrapper .gfield_radio .gchoice,
.gform_wrapper .gfield_checkbox .gchoice {
    cursor: pointer;
    position: relative;
}

/* Expand the label to fill the entire container */
.gform_wrapper .gfield_radio .gchoice label,
.gform_wrapper .gfield_checkbox .gchoice label {
    cursor: pointer;
    display: block;
    width: 100%;
    height: 100%;
    padding: 10px;
    margin: 0;
}

/* Make sure the input is still accessible but the label covers everything */
.gform_wrapper .gfield_radio .gchoice input[type="radio"],
.gform_wrapper .gfield_checkbox .gchoice input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 1;
}

/* Style the visible radio button indicator */
.gform_wrapper .gfield_radio .gchoice label::before,
.gform_wrapper .gfield_checkbox .gchoice label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 2px solid #ccc;
    border-radius: 50%;
    vertical-align: middle;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.ui-datepicker-month, .ui-datepicker-year, .ui-datepicker-title {
    color: #ffffff !important;
}

/* Checkbox gets square */
.gform_wrapper .gfield_checkbox .gchoice label::before {
    border-radius: 3px;
}

/* Checked state */
.gform_wrapper .gfield_radio .gchoice input[type="radio"]:checked + label::before {
    border-color: #0073aa;
    background-color: #0073aa;
    box-shadow: inset 0 0 0 3px #fff;
}

.gform_wrapper .gfield_checkbox .gchoice input[type="checkbox"]:checked + label::before {
    border-color: #0073aa;
    background-color: #0073aa;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="white"><path d="M0 11l2-2 5 5L18 3l2 2L7 18z"/></svg>');
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hover effect */
.gform_wrapper .gfield_radio .gchoice:hover,
.gform_wrapper .gfield_checkbox .gchoice:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Focus state for accessibility */
.gform_wrapper .gfield_radio .gchoice input[type="radio"]:focus + label::before,
.gform_wrapper .gfield_checkbox .gchoice input[type="checkbox"]:focus + label::before {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* If your theme uses custom styled radio buttons with specific classes */
.gform_wrapper .gfield--type-radio .gchoice,
.gform_wrapper .gfield--type-checkbox .gchoice {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* For card-style layouts */
.gform_wrapper .gfield_radio .gchoice,
.gform_wrapper .gfield_checkbox .gchoice {
    min-height: 40px;
    display: flex;
    align-items: center;
}

