/*
 * Gravity Forms overrides (orbital theme) — no !important.
 *
 * GF prints a per-form inline <style> in the BODY that sets the --gf-* design
 * tokens on:
 *     #gform_wrapper_<id>[data-form-index="0"].gform-theme   -> (1 id, 2 classes)
 * That inline block appears AFTER our enqueued stylesheet in the source, so
 * merely MATCHING its specificity would still lose on source order. Instead we
 * EXCEED it: a page-level id ancestor (#main-content) + the three theme classes
 * every orbital wrapper carries = (1 id, 3 classes). Higher specificity wins
 * regardless of load order.
 */

/* Size + center every form. */
#main-content .gform_wrapper {
    width: 80%;
    max-width: 800px;
    margin-inline: auto;
}

/* Re-theme the orbital primary colour family to the brand red. */
#main-content .gform-theme.gform-theme--framework.gform-theme--orbital {
    --gf-color-primary: var(--red-500, #d32f2f);
    --gf-color-primary-rgb: 211, 47, 47;
    --gf-color-primary-contrast: var(--white, #ffffff);
    --gf-color-primary-contrast-rgb: 255, 255, 255;
    --gf-color-primary-darker: var(--red-700, #65161b);
    --gf-color-primary-lighter: var(--red-300, #cb7c81);
}

/*
 * Brand the submit button. GF's orbital button rule is class-only
 * (roughly (0,4,1)); prefixing with the #main-content id gives us (1,3,2),
 * which beats it without !important.
 */
#main-content .gform_wrapper .gform_footer input[type="submit"],
#main-content .gform_wrapper .gform-footer input[type="submit"],
#main-content .gform_wrapper .gform_page_footer input[type="submit"],
#main-content .gform_wrapper .gform_button {
    height: 59px;
    padding: 4px 14px;
    font-size: 14px;
    font-weight: var(--button-font-weight, 500);
    font-style: normal;
    line-height: 1.7;
    color: var(--button-text-color, #ffffff);
    background-color: var(--button-background-color, var(--red-500, #d32f2f));
    border: 1px solid var(--button-border-color, var(--red-500, #d32f2f));
    border-radius: 0;
    text-transform: uppercase;
    text-decoration: none;
    font-family: var(--primary-body-font, "Poppins", sans-serif);
    box-shadow: none;
}
