/* ==========================================================================
   Form

   Gravity Forms writes the form markup; everything below restyles it.

   A note on the selectors: Gravity Forms ships its own stylesheet and its
   rules are often two or three classes deep, so a plain `.gfield_label`
   would lose the tie. Rules here go through `.ssb-form .ssb-form__form .gform_wrapper`
   and name one more class on the target, which wins on specificity
   without a single !important. If you add a rule and it does not take,
   add a class to the selector rather than reaching for !important.
   ========================================================================== */

.ssb-form {

    /*
     * Everything that changes between the four backgrounds is a token, so
     * a variant is a short list of overrides rather than a second copy of
     * the rules. Every pairing below was measured: body text clears 4.5:1
     * and every border and button edge clears the 3:1 of WCAG 1.4.11.
     */

    /* Section text */
    --ssb-form-fg: var(--color-text);
    --ssb-form-muted: var(--color-muted, #666);
    --ssb-form-eyebrow: var(--color-primary);

    /*
     * Inputs and cards keep a white fill on every background. A field the
     * visitor types into should look the same everywhere, and white gives
     * the typed text the most contrast it can get.
     *
     * --color-on-surface, not --color-text. The fill is white whatever is
     * behind the form, so the text on it is the page's on-white color and
     * never the surrounding band's -- and a Section redefines
     * --color-text for everything inside it. This said --color-text, so
     * a form on a Secondary or Dark Section was handing the band's white
     * to the text inside a white field: a box you could type into and not
     * see what you had typed.
     *
     * It took None becoming selectable to surface it. Base and Subtle
     * each restate this token further down and were never affected;
     * None, Primary and Dark do not, and None is the one that leaves the
     * band showing through.
     *
     * The on-colors are declared at :root, so they are substituted there
     * and arrive here as the page's own text rather than the band's.
     */
    --ssb-form-surface: var(--color-light);
    --ssb-form-on-surface: var(--color-on-surface, var(--color-text));

    /* 4.5:1 on white, 4.0:1 on cream, and it sits against the white field
       fill on the dark variants — past 3:1 in all four cases. */
    --ssb-form-border: #767676;

    --ssb-form-focus: var(--color-primary);

    /*
     * The border stays this red on every background because it is drawn
     * against the white field, not against the section. The message sits
     * on the section, so its color moves with the variant.
     * Gravity Forms' own #dc3545 only reaches 4.0:1 on cream.
     */
    --ssb-form-error: #b3202f;
    --ssb-form-error-text: var(--ssb-form-error);

    --ssb-form-button-bg: var(--color-primary);
    --ssb-form-button-fg: var(--color-light);
    --ssb-form-button-focus: var(--color-text);

    --ssb-form-confirm-bg: var(--color-surface-subtle);
    --ssb-form-confirm-accent: var(--color-primary);

    /*
     * The confirmation card's own text color, paired with the background
     * on the line above rather than borrowed from the fields.
     *
     * It used to read --ssb-form-on-surface, which is the text that
     * belongs on the FIELD fill. On a light form those are the same
     * surface, so nothing ever showed. On a dark one they are not: the
     * fields go dark with white text while this card stays white, and
     * the card came out white on white -- a submitted form answering
     * with an empty box. Any child theme that darkens the fields, which
     * is the whole purpose of --ssb-form-on-surface, silently took the
     * confirmation message with it.
     *
     * An on-color rather than --color-text, for the reason the submit
     * button already carries: a Section redefines --color-text for its
     * entire subtree, so a form sitting in a colored Section would hand
     * the band's own white straight back. The on-colors are declared at
     * :root and resolve there.
     */
    --ssb-form-confirm-fg: var(--color-on-subtle, var(--color-text));

    --ssb-form-field-gap: var(--space-md);

    padding-block: var(--block-padding-top, 100px) var(--block-padding-bottom, 100px);
    background-color: var(--color-light);
    color: var(--ssb-form-fg);
}


/* Backgrounds
   ========================================================================== */

/*
 * Base paints the page's own surface rather than leaving the background
 * alone. On a white page that looks the same as None did; inside a tinted
 * Section it is the difference between a white card and no card at all.
 * This had no rule when it was called White, so it did nothing.
 */
/*
 * A form sitting in page content rather than owning a band.
 *
 * inc/gravity-forms.php wraps a bare Gravity Form in .ssb-form and
 * .ssb-form__form so this whole skin applies to it. Everything in the
 * skin is wanted; the band around it is not, so this takes the padding
 * and the background back off and leaves the rest.
 */
/*
 * Doubled: the band's padding is set on `.ssb-form` here and again
 * inside the narrow-screen query below, both at one class. A one-class
 * modifier ties with them and loses to whichever is written last, so
 * at phone width the padding came back.
 */
.ssb-form.ssb-form--inline {
    padding-block: 0;
    background-color: transparent;
}

/*
 * None leaves the background alone, which is what None means everywhere
 * else in this framework and is the whole difference between it and
 * Base.
 *
 * .ssb-form above paints --color-light on every form, so None has in
 * fact been a white band since it was added -- indistinguishable from
 * Base on a white page, and a white card on a tinted Section, which is
 * exactly where the two are supposed to differ. It also broke the
 * theme treatments written for a form sitting ON a colored band: they
 * make the inner panel transparent and the labels light, and the labels
 * then landed on this white rather than on the band.
 *
 * Equal weight to .ssb-form, so it has to stay below it.
 *
 * Nothing saved as None today is affected on a white page, which is
 * where almost all of them are: transparent over white looks like
 * white. The render default is Base, so a form that was never given a
 * background is not this rule's business either.
 */
.ssb-form.ssb-form--bg-none {
    background-color: transparent;
}


/*
 * An opaque variant states its own text color.
 *
 * --ssb-form-fg above is var(--color-text), which is right for None --
 * the form sits on whatever is behind it and should read the way that
 * surface reads. It is wrong for every variant that paints its own
 * background, because a Section redefines --color-text for everything
 * inside it: a form set to Base inside a Secondary section painted
 * itself white and then took the section's white text with it, so the
 * labels and the field edges came out white on white.
 *
 * The on-colors are declared at :root and resolved there, so they are
 * still the page's own text here rather than the band's.
 */
.ssb-form--bg-base {
    background-color: var(--color-surface);
    color: var(--color-on-surface);
    --ssb-form-fg: var(--color-on-surface);
    --ssb-form-on-surface: var(--color-on-surface);
}

.ssb-form--bg-subtle {
    background-color: var(--color-surface-subtle);
    color: var(--color-on-subtle);
    --ssb-form-fg: var(--color-on-subtle);
    --ssb-form-on-surface: var(--color-on-subtle);
}

.ssb-form--bg-primary {
    background-color: var(--color-primary);
}

.ssb-form--bg-dark {
    background-color: var(--color-dark);
}

/*
 * The two dark variants. White text reaches 6.0:1 on the red and 16.3:1
 * on the charcoal. The submit button flips to white with dark text,
 * because a red button on either of these backgrounds only manages
 * 2.7:1 against the section behind it and its edge disappears.
 */
.ssb-form--bg-primary,
.ssb-form--bg-dark {
    --ssb-form-fg: var(--color-light);

    /* 4.6:1 on the red, 12.3:1 on the charcoal. */
    --ssb-form-muted: #e6dede;

    --ssb-form-focus: var(--color-light);

    /*
     * White rather than a pale red: no red light enough to read on the
     * red background stays recognizable as red. The message is still
     * marked by wording, a red field border and the summary at the top,
     * so color is never the only signal — WCAG 1.4.1.
     */
    --ssb-form-error-text: var(--color-light);

    --ssb-form-button-bg: var(--color-light);

    /*
     * --color-on-surface, not --color-text. The button is white here, so
     * what goes on it is the page's on-white color -- and a Section
     * redefines --color-text for everything inside it, so this handed a
     * white label to a white button for any Primary or Dark form sitting
     * in a colored Section. Measured at 1.00:1.
     *
     * The on-colors are declared at :root and substituted there, so they
     * arrive as the page's own text rather than the band's.
     */
    --ssb-form-button-fg: var(--color-on-surface, var(--color-text));

    --ssb-form-button-focus: var(--color-light);

    --ssb-form-confirm-bg: var(--color-light);

    /* The card is white on both of these, so the page's on-white text
       goes on it -- not the white that everything else here flips to. */
    --ssb-form-confirm-fg: var(--color-on-surface, var(--color-text));
}

/* On the red, an accent color has nowhere to go: the gold below manages
   only 2.1:1 against it. */
.ssb-form--bg-primary {
    --ssb-form-eyebrow: var(--color-light);
}

/* On the charcoal the gold reaches 5.8:1 and reads as the accent it is. */
.ssb-form--bg-dark {
    --ssb-form-eyebrow: var(--color-highlight);
}


/* Width
   ========================================================================== */

.ssb-form__inner {
    width: 100%;
}

.ssb-form--narrow .ssb-form__inner {
    max-width: 680px;
    margin-inline: auto;
}


/* Header
   ========================================================================== */

.ssb-form__header {
    margin-bottom: var(--space-lg);
}

.ssb-form__eyebrow {
    margin: 0 0 var(--space-xs);
    color: var(--ssb-form-eyebrow);
}

.ssb-form__title {
    margin: 0;
    color: var(--ssb-form-fg);
}

.ssb-form__intro {
    margin-top: var(--space-sm);
    color: var(--ssb-form-fg);
}

.ssb-form__intro > :last-child {
    margin-bottom: 0;
}

/*
 * A link in the introduction inherits the section color on the dark
 * variants, where the usual link red would sink into the background.
 * It keeps its underline so it is not marked by color alone.
 */
.ssb-form--bg-primary .ssb-form__intro a,
.ssb-form--bg-dark .ssb-form__intro a {
    color: var(--color-light);
    text-decoration: underline;
}


/* Reset the wrapper
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper {
    margin: 0;
}

.ssb-form .ssb-form__form .gform_wrapper form {
    margin: 0;
}

/*
 * The spam honeypot. Gravity Forms hides this and it must stay hidden —
 * revealing it invites people to fill it in and have their submission
 * thrown away. Restated here so no later reset can uncover it.
 */
.ssb-form .ssb-form__form .gform_wrapper .gform_validation_container,
.ssb-form .ssb-form__form .gform_wrapper .gform_validation_container * {
    position: absolute !important;
    left: -9999px;
    display: none !important;
}


/* Field list
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper .gform_fields {
    row-gap: var(--ssb-form-field-gap);
}

.ssb-form .ssb-form__form .gform_wrapper .gfield > label,
.ssb-form .ssb-form__form .gform_wrapper .gfield .gfield_label {
    display: block;
    margin-bottom: var(--space-xs);
    font-family: var(--font-body);
    font-size: var(--font-size-sm, 1rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ssb-form-fg);
}

/*
 * Grouped fields (radios, checkboxes, name, address) sit in a fieldset.
 * The browser default draws a border round it and cuts a notch for the
 * legend, so it is reset here rather than left to Gravity Forms.
 */
.ssb-form .ssb-form__form .gform_wrapper .gfield fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

/*
 * A legend is not a label, so it needs the label's styling repeated.
 */
.ssb-form .ssb-form__form .gform_wrapper .gfield legend.gfield_label {
    float: none;
    width: auto;
    padding: 0;
}


/* Required
   --------------------------------------------------------------------------
   The asterisk is decorative: Gravity Forms already marks these inputs
   with the required attribute, which is what assistive technology reads.
   The legend at the top of the form explains the symbol for everyone else.
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper .gfield .gfield_required {
    margin-left: 4px;
    color: var(--ssb-form-error-text);
    font-weight: 700;
}

.ssb-form .ssb-form__form .gform_wrapper .gform_required_legend {
    margin: 0 0 var(--space-md);
    font-size: .875rem;
    color: var(--ssb-form-muted);
}


/* Text inputs
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper .gfield input[type="text"],
.ssb-form .ssb-form__form .gform_wrapper .gfield input[type="email"],
.ssb-form .ssb-form__form .gform_wrapper .gfield input[type="tel"],
.ssb-form .ssb-form__form .gform_wrapper .gfield input[type="url"],
.ssb-form .ssb-form__form .gform_wrapper .gfield input[type="number"],
.ssb-form .ssb-form__form .gform_wrapper .gfield input[type="password"],
.ssb-form .ssb-form__form .gform_wrapper .gfield input[type="date"],
.ssb-form .ssb-form__form .gform_wrapper .gfield select,
.ssb-form .ssb-form__form .gform_wrapper .gfield textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background-color: var(--ssb-form-surface);
    border: 1px solid var(--ssb-form-border);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.4;
    color: var(--ssb-form-on-surface);
    transition: border-color var(--transition-fast, .2s ease);
}

.ssb-form .ssb-form__form .gform_wrapper .gfield textarea {
    min-height: 160px;
    padding-block: 12px;
    resize: vertical;
}

/*
 * 16px minimum on the fields themselves, or iOS zooms the page in when
 * one is focused and the visitor has to pinch back out.
 */
.ssb-form .ssb-form__form .gform_wrapper .gfield input,
.ssb-form .ssb-form__form .gform_wrapper .gfield select,
.ssb-form .ssb-form__form .gform_wrapper .gfield textarea {
    font-size: max(1rem, 16px);
}

.ssb-form .ssb-form__form .gform_wrapper .gfield input:hover,
.ssb-form .ssb-form__form .gform_wrapper .gfield select:hover,
.ssb-form .ssb-form__form .gform_wrapper .gfield textarea:hover {
    border-color: var(--ssb-form-on-surface);
}

/*
 * A two-color ring so the focused field is obvious on white and on
 * cream, and stays visible in forced-colors mode.
 */
.ssb-form .ssb-form__form .gform_wrapper .gfield input:focus,
.ssb-form .ssb-form__form .gform_wrapper .gfield select:focus,
.ssb-form .ssb-form__form .gform_wrapper .gfield textarea:focus {
    border-color: var(--ssb-form-on-surface);
    outline: 2px solid var(--ssb-form-focus);
    outline-offset: 2px;
}

.ssb-form .ssb-form__form .gform_wrapper .gfield input::placeholder,
.ssb-form .ssb-form__form .gform_wrapper .gfield textarea::placeholder {
    color: var(--color-muted, #666);
    opacity: 1;
}


/* Radios and checkboxes
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper .gfield .gfield_radio,
.ssb-form .ssb-form__form .gform_wrapper .gfield .gfield_checkbox {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.ssb-form .ssb-form__form .gform_wrapper .gfield .gchoice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.ssb-form .ssb-form__form .gform_wrapper .gfield .gchoice input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    min-height: 0;
    margin: 2px 0 0;
    accent-color: var(--ssb-form-button-bg);
}

/*
 * These labels are the tap target, so they are padded out rather than
 * left as a 20px box next to the control.
 */
.ssb-form .ssb-form__form .gform_wrapper .gfield .gchoice label {
    margin: 0;
    padding-block: 2px;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
}


/* Descriptions
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper .gfield .gfield_description {
    margin-top: 6px;
    padding: 0;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--ssb-form-muted);
}


/* Errors
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper .gfield.gfield_error input,
.ssb-form .ssb-form__form .gform_wrapper .gfield.gfield_error select,
.ssb-form .ssb-form__form .gform_wrapper .gfield.gfield_error textarea {
    border-color: var(--ssb-form-error);
    border-width: 2px;
}

.ssb-form .ssb-form__form .gform_wrapper .gfield .gfield_validation_message,
.ssb-form .ssb-form__form .gform_wrapper .gfield .validation_message {
    margin-top: 6px;
    padding: 0;
    background: none;
    border: 0;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ssb-form-error-text);
}

/*
 * The summary at the top of the form after a failed submit. It lists
 * every problem with a link to the field, and it is the fastest way
 * through a failed form for anyone not using a mouse — turn on
 * "validation summary" in the form's settings so it appears.
 */
.ssb-form .ssb-form__form .gform_wrapper .gform_validation_errors {
    margin: 0 0 var(--space-lg);
    padding: var(--space-sm);
    background-color: var(--ssb-form-surface);
    border: 2px solid var(--ssb-form-error);
    border-radius: 0;
    box-shadow: none;
}

.ssb-form .ssb-form__form .gform_wrapper .gform_validation_errors > h2 {
    margin: 0 0 var(--space-xs);
    font-size: 1.125rem;
    color: var(--ssb-form-error);
}

.ssb-form .ssb-form__form .gform_wrapper .gform_validation_errors ol,
.ssb-form .ssb-form__form .gform_wrapper .gform_validation_errors ul {
    margin: 0;
    padding-left: 1.25em;
}

.ssb-form .ssb-form__form .gform_wrapper .gform_validation_errors a {
    color: var(--ssb-form-error);
}


/* Submit
   ========================================================================== */

.ssb-form .ssb-form__form .gform_wrapper .gform_footer {
    margin: var(--space-lg) 0 0;
    padding: 0;
}

/*
 * The page footer, on a multi-page form.
 *
 * Gravity Forms puts Previous and Next in .gform_page_footer on every
 * page but the last, where they move into .gform_footer beside the
 * submit. Only .gform_footer was styled, so every page before the last
 * ended in two browser-default buttons under a form that had been drawn
 * around them.
 *
 * A row rather than a block, because there are two of them and they
 * belong on one line until there is no room for one.
 */
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer {
    margin: var(--space-lg) 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm, 1rem);
}

.ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="submit"],
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="submit"],
.ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="button"],
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="button"],
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_button,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_button,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_next_button,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_next_button,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_previous_button,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_previous_button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: var(--button-padding-y, 14px) var(--button-padding-x, 28px);
    background-color: var(--ssb-form-button-bg);
    border: 0;
    border-radius: var(--button-radius, 0);
    font-family: var(--button-font-family, var(--font-body));
    font-size: var(--button-font-size, 1rem);

    /*
     * The same four the theme's .btn reads.
     *
     * Gravity prints this as an <input type="submit">, not a .btn, so a
     * theme that puts its buttons in caps on .btn never reaches it — and
     * both child themes do exactly that, which left every form on both
     * sites ending in a mixed-case button under a page of caps.
     *
     * 700 as the weight's fallback, which is what this rule said before
     * the token: a site that sets none of these is unchanged.
     */
    font-weight: var(--button-font-weight, 700);
    text-transform: var(--button-text-transform, none);
    letter-spacing: var(--button-letter-spacing, normal);

    line-height: 1.2;
    color: var(--ssb-form-button-fg);
    cursor: pointer;
    transition: opacity var(--transition-fast, .2s ease);
}

.ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="submit"]:hover,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="submit"]:hover,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_button:hover,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_button:hover,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_next_button:hover,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_next_button:hover {
    opacity: .9;
}

.ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="submit"]:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="submit"]:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="button"]:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="button"]:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_button:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_button:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_next_button:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_next_button:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_previous_button:focus-visible,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_previous_button:focus-visible {
    outline: 2px solid var(--ssb-form-button-focus);
    outline-offset: 3px;
}

/*
 * While an AJAX submit is in flight the button is disabled. Dimming it
 * is not enough on its own, so the cursor changes too.
 */
.ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="submit"]:disabled,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="submit"]:disabled,
.ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="button"]:disabled,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="button"]:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/*
 * Previous is the quieter of the pair.
 *
 * Going back is not the action the page is asking for, and two solid
 * buttons side by side say it is. Outlined, it is still plainly a
 * button and plainly the second one -- which is the same argument the
 * Buttons block makes for Solid beside Outline.
 *
 * Styled by class rather than by which footer it is in, because on the
 * last page Gravity Forms moves it into .gform_footer beside the submit.
 *
 * The border is currentColor, so its edge is exactly as legible as its
 * label -- whatever surface the form has landed on -- and the padding is
 * the shared padding less the border, so it stands the same height as
 * the button beside it.
 *
 * Six classes, and counted rather than guessed. The rule above is
 * written for both footers, so it carries five, and a four-class
 * override of it measured as no change at all -- Previous came out
 * solid crimson beside Next. Naming the footer and doubling the button
 * class clears it outright rather than by being written afterwards.
 */
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_previous_button.gform_previous_button,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_previous_button.gform_previous_button {
    background-color: transparent;
    color: var(--ssb-form-fg);
    border: 2px solid currentColor;
    padding:
        calc(var(--button-padding-y, 14px) - 2px)
        calc(var(--button-padding-x, 28px) - 2px);
}

/*
 * A tint of its own color, not an inversion. Inverting means choosing a
 * label color, and the only safe one is the surface behind it -- which
 * this rule cannot know, because the form skin is used on a light panel,
 * on a colored Section and in the site footer. A tint leaves the label
 * where it is and only fills in behind it.
 */
.ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_previous_button.gform_previous_button:hover,
.ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_previous_button.gform_previous_button:hover {
    background-color: color-mix(in srgb, currentColor 12%, transparent);
}


/* Confirmation
   ========================================================================== */

.ssb-form .ssb-form__form .gform_confirmation_message {
    padding: var(--space-md);
    background-color: var(--ssb-form-confirm-bg);
    border-left: 4px solid var(--ssb-form-confirm-accent);
    font-size: var(--font-size-md, 1.125rem);
    line-height: 1.6;
    color: var(--ssb-form-confirm-fg);
}


/* Editor placeholder
   ========================================================================== */

.ssb-form-placeholder {
    padding: var(--space-lg);
    background-color: var(--color-surface-subtle);
    border: 1px dashed var(--color-border, #ddd);
    text-align: center;
}

.ssb-form-placeholder p {
    margin: 0;
}


/* Mobile
   ========================================================================== */

@media (max-width: 768px) {

    .ssb-form {
        padding-block:
            var(--block-padding-top-mobile, 60px)
            var(--block-padding-bottom-mobile, 60px);
    }

    /*
     * Gravity Forms puts fields side by side on a grid. One column reads
     * better on a phone and keeps every label with its own field.
     */
    .ssb-form .ssb-form__form .gform_wrapper .gform_fields .gfield {
        grid-column: 1 / -1;
    }

    .ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="submit"],
    .ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="submit"],
    .ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="button"],
    .ssb-form .ssb-form__form .gform_wrapper .gform_page_footer input[type="button"],
    .ssb-form .ssb-form__form .gform_wrapper .gform_footer .gform_button,
    .ssb-form .ssb-form__form .gform_wrapper .gform_page_footer .gform_button {
        width: 100%;
    }

}


/* Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .ssb-form .ssb-form__form .gform_wrapper .gfield input,
    .ssb-form .ssb-form__form .gform_wrapper .gfield select,
    .ssb-form .ssb-form__form .gform_wrapper .gfield textarea,
    .ssb-form .ssb-form__form .gform_wrapper .gform_footer input[type="submit"] {
        transition: none;
    }

}


/* Forced colors
   --------------------------------------------------------------------------
   In Windows high contrast mode the system palette replaces ours. The
   borders and focus ring are redeclared with system colors so fields
   and focus stay visible.
   ========================================================================== */

@media (forced-colors: active) {

    .ssb-form .ssb-form__form .gform_wrapper .gfield input,
    .ssb-form .ssb-form__form .gform_wrapper .gfield select,
    .ssb-form .ssb-form__form .gform_wrapper .gfield textarea {
        border: 1px solid ButtonBorder;
    }

    .ssb-form .ssb-form__form .gform_wrapper .gfield input:focus,
    .ssb-form .ssb-form__form .gform_wrapper .gfield select:focus,
    .ssb-form .ssb-form__form .gform_wrapper .gfield textarea:focus {
        outline: 2px solid Highlight;
    }

}
