/* Donation Form Styling - Targets forms #1, #2, and #3 */
/* Version: 1.3.9 - Fixed Other/Enter Amount height with higher specificity */

#gform_wrapper_1[data-form-index="0"],
#gform_wrapper_2[data-form-index="0"],
#gform_wrapper_3[data-form-index="0"] {
    margin: 0 auto;
}

/* Force grid layout on all screen sizes */
@media screen {
    html body #gform_wrapper_1 .gfield_radio,
    html body #gform_wrapper_2 .gfield_radio,
    html body #gform_wrapper_3 .gfield_radio {
        display: grid !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    html body #gform_wrapper_1 .gchoice,
    html body #gform_wrapper_2 .gchoice,
    html body #gform_wrapper_3 .gchoice {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }
    
    html body #gform_wrapper_1 .gchoice label,
    html body #gform_wrapper_2 .gchoice label,
    html body #gform_wrapper_3 .gchoice label {
        display: flex !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Hide the fieldset legend but keep it accessible */
#gform_wrapper_1 .gfield--type-radio .gfield_label,
#gform_wrapper_2 .gfield--type-radio .gfield_label,
#gform_wrapper_3 .gfield--type-radio .gfield_label {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
}

/* Container for radio buttons - use CSS Grid with 12 columns for even distribution */
#gform_wrapper_1 .gfield_radio,
#gform_wrapper_2 .gfield_radio,
#gform_wrapper_3 .gfield_radio,
html body #gform_wrapper_1 .gfield_radio,
html body #gform_wrapper_2 .gfield_radio,
html body #gform_wrapper_3 .gfield_radio {
    display: grid !important;
    grid-template-columns: repeat(12, 1fr) !important;
    gap: 12px !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    list-style: none !important;
}

/* First row - 4 choices, each spanning 3 columns (1-4) */
#gform_wrapper_1 .gchoice:nth-child(1),
#gform_wrapper_2 .gchoice:nth-child(1),
#gform_wrapper_3 .gchoice:nth-child(1) {
    grid-column: 1 / 4 !important;
}

#gform_wrapper_1 .gchoice:nth-child(2),
#gform_wrapper_2 .gchoice:nth-child(2),
#gform_wrapper_3 .gchoice:nth-child(2) {
    grid-column: 4 / 7 !important;
}

#gform_wrapper_1 .gchoice:nth-child(3),
#gform_wrapper_2 .gchoice:nth-child(3),
#gform_wrapper_3 .gchoice:nth-child(3) {
    grid-column: 7 / 10 !important;
}

#gform_wrapper_1 .gchoice:nth-child(4),
#gform_wrapper_2 .gchoice:nth-child(4),
#gform_wrapper_3 .gchoice:nth-child(4) {
    grid-column: 10 / 13 !important;
}

/* Second row - 3 choices, each spanning 4 columns for full width (5-7) */
#gform_wrapper_1 .gchoice:nth-child(5),
#gform_wrapper_2 .gchoice:nth-child(5),
#gform_wrapper_3 .gchoice:nth-child(5) {
    grid-column: 1 / 5 !important;
}

#gform_wrapper_1 .gchoice:nth-child(6),
#gform_wrapper_2 .gchoice:nth-child(6),
#gform_wrapper_3 .gchoice:nth-child(6) {
    grid-column: 5 / 9 !important;
}

#gform_wrapper_1 .gchoice:nth-child(7),
#gform_wrapper_2 .gchoice:nth-child(7),
#gform_wrapper_3 .gchoice:nth-child(7) {
    grid-column: 9 / 13 !important;
}

/* Third row - Other button (choice 8) spanning full width */
#gform_wrapper_1 .gchoice:nth-child(8),
#gform_wrapper_2 .gchoice:nth-child(8),
#gform_wrapper_3 .gchoice:nth-child(8) {
    grid-column: 1 / 13 !important;
    display: block !important;
    position: relative !important;
}

/* All choices use block display */
#gform_wrapper_1 .gchoice,
#gform_wrapper_2 .gchoice,
#gform_wrapper_3 .gchoice,
html body #gform_wrapper_1 .gchoice,
html body #gform_wrapper_2 .gchoice,
html body #gform_wrapper_3 .gchoice {
    position: relative !important;
    margin: 0 !important;
    display: block !important;
    padding: 0 !important;
}

/* Hide the actual radio input completely */
#gform_wrapper_1 .gfield-choice-input,
#gform_wrapper_2 .gfield-choice-input,
#gform_wrapper_3 .gfield-choice-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    margin: -1px !important;
    padding: 0 !important;
}

/* Style the labels as buttons */
#gform_wrapper_1 .gchoice label,
#gform_wrapper_2 .gchoice label,
#gform_wrapper_3 .gchoice label,
html body #gform_wrapper_1 .gchoice label,
html body #gform_wrapper_2 .gchoice label,
html body #gform_wrapper_3 .gchoice label {
    display: flex !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 8px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 24px !important;
    background: var(--wp--preset--color--base) !important;
    color: #2c3e50 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    margin-left: 0 !important;
}

/* Hover state */
#gform_wrapper_1 .gchoice label:hover,
#gform_wrapper_2 .gchoice label:hover,
#gform_wrapper_3 .gchoice label:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Selected state */
#gform_wrapper_1 .gfield-choice-input:checked + label,
#gform_wrapper_2 .gfield-choice-input:checked + label,
#gform_wrapper_3 .gfield-choice-input:checked + label,
html body #gform_wrapper_1 .gfield-choice-input:checked + label,
html body #gform_wrapper_2 .gfield-choice-input:checked + label,
html body #gform_wrapper_3 .gfield-choice-input:checked + label {
    background: var(--wp--preset--color--accent-4) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Other option - place in third row */
#gform_wrapper_1 .gchoice:last-child,
#gform_wrapper_2 .gchoice:last-child,
#gform_wrapper_3 .gchoice:last-child {
    position: relative !important;
    display: block !important;
}

#gform_wrapper_1 .gchoice:last-child label,
#gform_wrapper_2 .gchoice:last-child label,
#gform_wrapper_3 .gchoice:last-child label {
    width: 100% !important;
    margin: 0 !important;
}

/* Hide any line breaks in the Other option */
#gform_wrapper_1 .gchoice:last-child br,
#gform_wrapper_2 .gchoice:last-child br,
#gform_wrapper_3 .gchoice:last-child br {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
}

/* Hide the original "Other" input field completely - we replace it with our own */
#gform_wrapper_1 .gchoice_other_control,
#gform_wrapper_2 .gchoice_other_control,
#gform_wrapper_3 .gchoice_other_control {
    display: none !important;
}

/* When "Other" is selected, hide the label */
#gform_wrapper_1 .gchoice:last-child.other-active label,
#gform_wrapper_2 .gchoice:last-child.other-active label,
#gform_wrapper_3 .gchoice:last-child.other-active label {
    display: none !important;
}

/* Custom seamless input field that replaces the Other button */
/* Hidden by default - only shown when parent has .other-active class */
.donation-other-input-wrapper {
    display: none !important;
    width: 100%;
    position: relative;
}

/* Only show when Other is actively selected */
.gchoice.other-active .donation-other-input-wrapper {
    display: flex !important;
    align-items: center !important;
}

/* Dollar sign prefix */
.donation-other-input-wrapper::before {
    content: '$';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    z-index: 1;
    pointer-events: none;
}

.donation-other-input {
    width: 100% !important;
    padding: 27px 8px 27px 40px !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    text-align: center !important;
    background: var(--wp--preset--color--accent-4) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3) !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

.donation-other-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 400 !important;
}

.donation-other-input:focus {
    box-shadow: 0 4px 16px rgba(0, 122, 204, 0.5) !important;
}

#gform_wrapper_1 .gchoice:last-child .gfield-choice-input:checked + label,
#gform_wrapper_2 .gchoice:last-child .gfield-choice-input:checked + label,
#gform_wrapper_3 .gchoice:last-child .gfield-choice-input:checked + label,
html body #gform_wrapper_1 .gchoice:last-child .gfield-choice-input:checked + label,
html body #gform_wrapper_2 .gchoice:last-child .gfield-choice-input:checked + label,
html body #gform_wrapper_3 .gchoice:last-child .gfield-choice-input:checked + label {
    background: var(--wp--preset--color--accent-4) !important;
    color: #fff !important;
}

/* Submit button styling */
#gform_wrapper_1 .gform_button,
#gform_wrapper_2 .gform_button,
#gform_wrapper_3 .gform_button {
    background: var(--wp--preset--color--accent-2) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 20px 40px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-family: var(--wp--preset--font-family--oilvare-base-rough) !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: auto !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    position: relative !important;
    overflow: hidden !important;
}

#gform_wrapper_1 .gform_button:hover,
#gform_wrapper_2 .gform_button:hover,
#gform_wrapper_3 .gform_button:hover {
    opacity: 0.9 !important;
    transform: translateY(-2px) !important;
}

#gform_wrapper_1 .gform_button:active,
#gform_wrapper_2 .gform_button:active,
#gform_wrapper_3 .gform_button:active {
    transform: translateY(0) !important;
}

/* Add arrow to submit button */
#gform_wrapper_1 .gform_button:after,
#gform_wrapper_2 .gform_button:after,
#gform_wrapper_3 .gform_button:after {
    content: '→' !important;
    margin-left: 12px !important;
    font-size: 24px !important;
    transition: transform 0.2s ease !important;
}

#gform_wrapper_1 .gform_button:hover:after,
#gform_wrapper_2 .gform_button:hover:after,
#gform_wrapper_3 .gform_button:hover:after {
    transform: translateX(4px) !important;
}

/* Footer alignment */
#gform_wrapper_1 .gform_footer,
#gform_wrapper_2 .gform_footer,
#gform_wrapper_3 .gform_footer {
    display: flex !important;
    justify-content: center !important;
    margin-top: 24px !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* Keep 12-column grid on tablet for same layout as desktop */
    body #gform_wrapper_1 .gfield_radio,
    body #gform_wrapper_2 .gfield_radio,
    body #gform_wrapper_3 .gfield_radio,
    #gform_wrapper_1.gform-theme--framework .gfield_radio,
    #gform_wrapper_2.gform-theme--framework .gfield_radio,
    #gform_wrapper_3.gform-theme--framework .gfield_radio {
        display: grid !important;
        grid-template-columns: repeat(12, 1fr) !important;
        gap: 10px !important;
    }
    
    /* First row - 4 buttons */
    body #gform_wrapper_1 .gchoice:nth-child(1),
    body #gform_wrapper_2 .gchoice:nth-child(1),
    body #gform_wrapper_3 .gchoice:nth-child(1) {
        grid-column: 1 / 4 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(2),
    body #gform_wrapper_2 .gchoice:nth-child(2),
    body #gform_wrapper_3 .gchoice:nth-child(2) {
        grid-column: 4 / 7 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(3),
    body #gform_wrapper_2 .gchoice:nth-child(3),
    body #gform_wrapper_3 .gchoice:nth-child(3) {
        grid-column: 7 / 10 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(4),
    body #gform_wrapper_2 .gchoice:nth-child(4),
    body #gform_wrapper_3 .gchoice:nth-child(4) {
        grid-column: 10 / 13 !important;
    }
    
    /* Second row - 3 buttons */
    body #gform_wrapper_1 .gchoice:nth-child(5),
    body #gform_wrapper_2 .gchoice:nth-child(5),
    body #gform_wrapper_3 .gchoice:nth-child(5) {
        grid-column: 1 / 5 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(6),
    body #gform_wrapper_2 .gchoice:nth-child(6),
    body #gform_wrapper_3 .gchoice:nth-child(6) {
        grid-column: 5 / 9 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(7),
    body #gform_wrapper_2 .gchoice:nth-child(7),
    body #gform_wrapper_3 .gchoice:nth-child(7) {
        grid-column: 9 / 13 !important;
    }
    
    /* Third row - Other button full width */
    body #gform_wrapper_1 .gchoice:nth-child(8),
    body #gform_wrapper_2 .gchoice:nth-child(8),
    body #gform_wrapper_3 .gchoice:nth-child(8) {
        grid-column: 1 / 13 !important;
        display: block !important;
    }
    
    body #gform_wrapper_1 .gchoice label,
    body #gform_wrapper_2 .gchoice label,
    body #gform_wrapper_3 .gchoice label,
    #gform_wrapper_1.gform-theme--framework .gchoice label,
    #gform_wrapper_2.gform-theme--framework .gchoice label,
    #gform_wrapper_3.gform-theme--framework .gchoice label {
        display: flex !important;
        padding: 16px 8px !important;
        font-size: 18px !important;
        min-height: auto !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .donation-other-input {
        padding: 23px 8px 23px 36px !important;
        font-size: 18px !important;
    }
    
    .donation-other-input-wrapper::before {
        font-size: 18px !important;
    }
    
    body #gform_wrapper_1 .gform_button,
    body #gform_wrapper_2 .gform_button,
    body #gform_wrapper_3 .gform_button {
        padding: 18px 32px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    /* Keep 12-column grid on mobile for same layout */
    body #gform_wrapper_1 .gfield_radio,
    body #gform_wrapper_2 .gfield_radio,
    body #gform_wrapper_3 .gfield_radio,
    #gform_wrapper_1.gform-theme--framework .gfield_radio,
    #gform_wrapper_2.gform-theme--framework .gfield_radio,
    #gform_wrapper_3.gform-theme--framework .gfield_radio,
    html body #gform_wrapper_1 .gfield_radio,
    html body #gform_wrapper_2 .gfield_radio,
    html body #gform_wrapper_3 .gfield_radio {
        display: grid !important;
        grid-template-columns: repeat(12, 1fr) !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }
    
    /* First row - 4 buttons */
    body #gform_wrapper_1 .gchoice:nth-child(1),
    body #gform_wrapper_2 .gchoice:nth-child(1),
    body #gform_wrapper_3 .gchoice:nth-child(1),
    html body #gform_wrapper_1 .gchoice:nth-child(1),
    html body #gform_wrapper_2 .gchoice:nth-child(1),
    html body #gform_wrapper_3 .gchoice:nth-child(1) {
        grid-column: 1 / 4 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(2),
    body #gform_wrapper_2 .gchoice:nth-child(2),
    body #gform_wrapper_3 .gchoice:nth-child(2),
    html body #gform_wrapper_1 .gchoice:nth-child(2),
    html body #gform_wrapper_2 .gchoice:nth-child(2),
    html body #gform_wrapper_3 .gchoice:nth-child(2) {
        grid-column: 4 / 7 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(3),
    body #gform_wrapper_2 .gchoice:nth-child(3),
    body #gform_wrapper_3 .gchoice:nth-child(3),
    html body #gform_wrapper_1 .gchoice:nth-child(3),
    html body #gform_wrapper_2 .gchoice:nth-child(3),
    html body #gform_wrapper_3 .gchoice:nth-child(3) {
        grid-column: 7 / 10 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(4),
    body #gform_wrapper_2 .gchoice:nth-child(4),
    body #gform_wrapper_3 .gchoice:nth-child(4),
    html body #gform_wrapper_1 .gchoice:nth-child(4),
    html body #gform_wrapper_2 .gchoice:nth-child(4),
    html body #gform_wrapper_3 .gchoice:nth-child(4) {
        grid-column: 10 / 13 !important;
    }
    
    /* Second row - 3 buttons */
    body #gform_wrapper_1 .gchoice:nth-child(5),
    body #gform_wrapper_2 .gchoice:nth-child(5),
    body #gform_wrapper_3 .gchoice:nth-child(5),
    html body #gform_wrapper_1 .gchoice:nth-child(5),
    html body #gform_wrapper_2 .gchoice:nth-child(5),
    html body #gform_wrapper_3 .gchoice:nth-child(5) {
        grid-column: 1 / 5 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(6),
    body #gform_wrapper_2 .gchoice:nth-child(6),
    body #gform_wrapper_3 .gchoice:nth-child(6),
    html body #gform_wrapper_1 .gchoice:nth-child(6),
    html body #gform_wrapper_2 .gchoice:nth-child(6),
    html body #gform_wrapper_3 .gchoice:nth-child(6) {
        grid-column: 5 / 9 !important;
    }
    body #gform_wrapper_1 .gchoice:nth-child(7),
    body #gform_wrapper_2 .gchoice:nth-child(7),
    body #gform_wrapper_3 .gchoice:nth-child(7),
    html body #gform_wrapper_1 .gchoice:nth-child(7),
    html body #gform_wrapper_2 .gchoice:nth-child(7),
    html body #gform_wrapper_3 .gchoice:nth-child(7) {
        grid-column: 9 / 13 !important;
    }
    
    /* Third row - Other button in 2-column layout with input always visible */
    body #gform_wrapper_1 .gchoice:nth-child(8),
    body #gform_wrapper_2 .gchoice:nth-child(8),
    body #gform_wrapper_3 .gchoice:nth-child(8),
    html body #gform_wrapper_1 .gchoice:nth-child(8),
    html body #gform_wrapper_2 .gchoice:nth-child(8),
    html body #gform_wrapper_3 .gchoice:nth-child(8),
    body #gform_wrapper_1 .gchoice:last-child,
    body #gform_wrapper_2 .gchoice:last-child,
    body #gform_wrapper_3 .gchoice:last-child,
    html body #gform_wrapper_1 .gchoice:last-child,
    html body #gform_wrapper_2 .gchoice:last-child,
    html body #gform_wrapper_3 .gchoice:last-child {
        grid-column: 1 / 13 !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    
    body #gform_wrapper_1 .gchoice,
    body #gform_wrapper_2 .gchoice,
    body #gform_wrapper_3 .gchoice,
    #gform_wrapper_1.gform-theme--framework .gchoice,
    #gform_wrapper_2.gform-theme--framework .gchoice,
    #gform_wrapper_3.gform-theme--framework .gchoice,
    html body #gform_wrapper_1 .gchoice,
    html body #gform_wrapper_2 .gchoice,
    html body #gform_wrapper_3 .gchoice {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }
    
    body #gform_wrapper_1 .gchoice label,
    body #gform_wrapper_2 .gchoice label,
    body #gform_wrapper_3 .gchoice label,
    #gform_wrapper_1.gform-theme--framework .gchoice label,
    #gform_wrapper_2.gform-theme--framework .gchoice label,
    #gform_wrapper_3.gform-theme--framework .gchoice label,
    html body #gform_wrapper_1 .gchoice label,
    html body #gform_wrapper_2 .gchoice label,
    html body #gform_wrapper_3 .gchoice label {
        display: flex !important;
        padding: 14px 6px !important;
        font-size: 16px !important;
        min-height: auto !important;
        background: var(--wp--preset--color--base) !important;
        border-radius: 12px !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Mobile: Other choice label stays visible in first column */
    body #gform_wrapper_1 .gchoice:last-child label,
    body #gform_wrapper_2 .gchoice:last-child label,
    body #gform_wrapper_3 .gchoice:last-child label,
    html body #gform_wrapper_1 .gchoice:last-child label,
    html body #gform_wrapper_2 .gchoice:last-child label,
    html body #gform_wrapper_3 .gchoice:last-child label {
        display: flex !important;
    }
    
    /* Mobile: Hide label when Other is active (selected) */
    body #gform_wrapper_1 .gchoice:last-child.other-active label,
    body #gform_wrapper_2 .gchoice:last-child.other-active label,
    body #gform_wrapper_3 .gchoice:last-child.other-active label,
    html body #gform_wrapper_1 .gchoice:last-child.other-active label,
    html body #gform_wrapper_2 .gchoice:last-child.other-active label,
    html body #gform_wrapper_3 .gchoice:last-child.other-active label {
        display: none !important;
    }
    
    /* Mobile: Always show the input wrapper */
    body #gform_wrapper_1 .gchoice:last-child .donation-other-input-wrapper,
    body #gform_wrapper_2 .gchoice:last-child .donation-other-input-wrapper,
    body #gform_wrapper_3 .gchoice:last-child .donation-other-input-wrapper,
    html body #gform_wrapper_1 .gchoice:last-child .donation-other-input-wrapper,
    html body #gform_wrapper_2 .gchoice:last-child .donation-other-input-wrapper,
    html body #gform_wrapper_3 .gchoice:last-child .donation-other-input-wrapper {
        display: flex !important;
        align-items: center !important;
    }
    
    /* Mobile: When Other is active, make the input span full width */
    body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input-wrapper,
    body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input-wrapper,
    body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input-wrapper,
    html body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input-wrapper,
    html body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input-wrapper,
    html body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input-wrapper {
        grid-column: 1 / 3 !important;
    }
    
    /* Mobile: Input styling - not selected state */
    body #gform_wrapper_1 .gchoice:last-child .donation-other-input,
    body #gform_wrapper_2 .gchoice:last-child .donation-other-input,
    body #gform_wrapper_3 .gchoice:last-child .donation-other-input,
    html body #gform_wrapper_1 .gchoice:last-child .donation-other-input,
    html body #gform_wrapper_2 .gchoice:last-child .donation-other-input,
    html body #gform_wrapper_3 .gchoice:last-child .donation-other-input {
        padding: 14px 6px 14px 32px !important;
        font-size: 16px !important;
        background: var(--wp--preset--color--base) !important;
        color: #2c3e50 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Mobile: Dollar sign color for unselected state */
    body #gform_wrapper_1 .gchoice:last-child .donation-other-input-wrapper::before,
    body #gform_wrapper_2 .gchoice:last-child .donation-other-input-wrapper::before,
    body #gform_wrapper_3 .gchoice:last-child .donation-other-input-wrapper::before,
    html body #gform_wrapper_1 .gchoice:last-child .donation-other-input-wrapper::before,
    html body #gform_wrapper_2 .gchoice:last-child .donation-other-input-wrapper::before,
    html body #gform_wrapper_3 .gchoice:last-child .donation-other-input-wrapper::before {
        font-size: 16px !important;
        left: 12px !important;
        color: #2c3e50 !important;
    }
    
    /* Mobile: When Other is active (selected), style the input differently */
    body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input,
    body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input,
    body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input,
    html body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input,
    html body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input,
    html body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input {
        background: var(--wp--preset--color--accent-4) !important;
        color: #fff !important;
        box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3) !important;
    }
    
    /* Mobile: Dollar sign color for selected state */
    body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input-wrapper::before,
    body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input-wrapper::before,
    body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input-wrapper::before,
    html body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input-wrapper::before,
    html body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input-wrapper::before,
    html body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input-wrapper::before {
        color: #fff !important;
    }
    
    /* Mobile: Placeholder color for unselected input */
    body #gform_wrapper_1 .gchoice:last-child .donation-other-input::placeholder,
    body #gform_wrapper_2 .gchoice:last-child .donation-other-input::placeholder,
    body #gform_wrapper_3 .gchoice:last-child .donation-other-input::placeholder,
    html body #gform_wrapper_1 .gchoice:last-child .donation-other-input::placeholder,
    html body #gform_wrapper_2 .gchoice:last-child .donation-other-input::placeholder,
    html body #gform_wrapper_3 .gchoice:last-child .donation-other-input::placeholder {
        color: rgba(44, 62, 80, 0.5) !important;
    }
    
    /* Mobile: Placeholder color for selected input */
    body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input::placeholder,
    body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input::placeholder,
    body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input::placeholder,
    html body #gform_wrapper_1 .gchoice:last-child.other-active .donation-other-input::placeholder,
    html body #gform_wrapper_2 .gchoice:last-child.other-active .donation-other-input::placeholder,
    html body #gform_wrapper_3 .gchoice:last-child.other-active .donation-other-input::placeholder {
        color: rgba(255, 255, 255, 0.7) !important;
    }
}

/* Focus states for accessibility */
#gform_wrapper_1 .gfield-choice-input:focus + label,
#gform_wrapper_2 .gfield-choice-input:focus + label,
#gform_wrapper_3 .gfield-choice-input:focus + label {
    outline: 3px solid #007acc !important;
    outline-offset: 2px !important;
}

/* Force override of Gravity Forms framework styles */
#gform_wrapper_1 .gform-theme--framework .gfield--type-choice .gchoice,
#gform_wrapper_2 .gform-theme--framework .gfield--type-choice .gchoice,
#gform_wrapper_3 .gform-theme--framework .gfield--type-choice .gchoice {
    display: block !important;
}

/* Override any remaining Gravity Forms styling */
#gform_wrapper_1 .gfield_radio .gchoice,
#gform_wrapper_2 .gfield_radio .gchoice,
#gform_wrapper_3 .gfield_radio .gchoice {
    margin: 0 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    display: block !important;
}

#gform_wrapper_1 .gfield,
#gform_wrapper_2 .gfield,
#gform_wrapper_3 .gfield {
    margin-bottom: 0 !important;
    border: none !important;
    background: none !important;
}

/* Ensure proper spacing for the whole form */
#gform_wrapper_1 .gform_body,
#gform_wrapper_2 .gform_body,
#gform_wrapper_3 .gform_body {
    margin-bottom: 0 !important;
}

/* Remove any default list styling */
#gform_wrapper_1 .gfield_radio,
#gform_wrapper_2 .gfield_radio,
#gform_wrapper_3 .gfield_radio {
    list-style: none !important;
    padding: 0 !important;
}

/* Make sure no radio button styling leaks through */
#gform_wrapper_1 input[type="radio"],
#gform_wrapper_2 input[type="radio"],
#gform_wrapper_3 input[type="radio"] {
    display: none !important;
    visibility: hidden !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* ============================================
   MOBILE: Always-visible Other input field
   ============================================ */
@media (max-width: 480px) {
    /* Force the Other choice (last-child) to be a 2-column grid */
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    
    /* Make Other label and input wrapper same height */
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child label,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child label,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child label,
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child .donation-other-input-wrapper,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child .donation-other-input-wrapper,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child .donation-other-input-wrapper {
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        box-sizing: border-box !important;
        padding: 0 !important;
    }
    
    /* Label needs centered content */
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child label,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child label,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child label {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Always show the input wrapper on mobile */
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child .donation-other-input-wrapper,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child .donation-other-input-wrapper,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child .donation-other-input-wrapper {
        display: flex !important;
        align-items: center !important;
    }
    
    /* Style the input to match the height */
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child .donation-other-input,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child .donation-other-input,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child .donation-other-input {
        height: 50px !important;
        padding: 0 6px 0 32px !important;
        font-size: 16px !important;
        background: var(--wp--preset--color--base, #fff) !important;
        color: #2c3e50 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        border-radius: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Dollar sign styling for mobile */
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child .donation-other-input-wrapper::before,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child .donation-other-input-wrapper::before,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child .donation-other-input-wrapper::before {
        font-size: 16px !important;
        left: 12px !important;
        color: #2c3e50 !important;
    }
    
    /* When Other is selected (has other-active class) */
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child.other-active,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child.other-active,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child.other-active {
        grid-template-columns: 1fr !important;
    }
    
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child.other-active label,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child.other-active label,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child.other-active label {
        display: none !important;
    }
    
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child.other-active .donation-other-input,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child.other-active .donation-other-input,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child.other-active .donation-other-input {
        background: var(--wp--preset--color--accent-4, #007acc) !important;
        color: #fff !important;
        box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3) !important;
    }
    
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child.other-active .donation-other-input-wrapper::before,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child.other-active .donation-other-input-wrapper::before,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child.other-active .donation-other-input-wrapper::before {
        color: #fff !important;
    }
    
    html body #gform_wrapper_1 .gfield_radio .gchoice:last-child.other-active .donation-other-input::placeholder,
    html body #gform_wrapper_2 .gfield_radio .gchoice:last-child.other-active .donation-other-input::placeholder,
    html body #gform_wrapper_3 .gfield_radio .gchoice:last-child.other-active .donation-other-input::placeholder {
        color: rgba(255, 255, 255, 0.7) !important;
    }
}
