/* Charge.com homepage Form 1 only.
 * Gravity Forms 3.x sets .gform-has-spinner during submission.
 * The legacy child-theme handler also disables this button on submit.
 * Either state exposes the progress indicator without JavaScript events.
 */
body.home #gform_wrapper_1 #gform_submit_button_1:is(.gform-has-spinner, :disabled) {
    background: #777 !important;
    border-color: #777 !important;
    opacity: 1 !important;
    color: #fff !important;
    cursor: progress !important;
    pointer-events: none;
    font-size: 0 !important;
}

/* Replace the legacy button label only while actively submitting. */
body.home #gform_wrapper_1 #gform_submit_button_1:is(.gform-has-spinner, :disabled)::before {
    content: "Submitting, please wait…";
    display: inline-block !important;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 20px;
    vertical-align: middle;
    color: #fff !important;
    background: none !important;
}

/* Dedicated spinner; not dependent on Gravity Forms JavaScript hooks. */
body.home #gform_wrapper_1 #gform_submit_button_1:is(.gform-has-spinner, :disabled)::after {
    content: "";
    display: inline-block !important;
    position: static !important;
    box-sizing: border-box;
    width: 18px !important;
    height: 18px !important;
    margin: 0 0 0 9px !important;
    padding: 0 !important;
    border: 3px solid rgba(255,255,255,.35) !important;
    border-top-color: #fff !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    vertical-align: middle;
    opacity: 1 !important;
    animation: charge-form1-spin .65s linear infinite !important;
}

/* Hide the default loader only for this button to avoid double spinners. */
body.home #gform_wrapper_1 #gform_submit_button_1 .gform-loader {
    display: none !important;
}

@keyframes charge-form1-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    body.home #gform_wrapper_1 #gform_submit_button_1:is(.gform-has-spinner, :disabled)::after {
        animation: none !important;
        border-top-color: #fff !important;
    }
}
