/**
 * Gravity Forms UX — submission & confirmation.
 *
 * Prevents the form container from "collapsing" during the brief window
 * between AJAX submit and the actual page redirect. Applies a loading
 * overlay while the request is in flight, and keeps a stable minimum
 * height for the final confirmation message.
 */

.gform_wrapper {
    position: relative;
    transition: min-height 200ms ease;
}

/* While submitting: keep the rendered height, fade fields, show a spinner overlay */
.gform_wrapper.lb-is-submitting .gform_body,
.gform_wrapper.lb-is-submitting .gform_footer,
.gform_wrapper.lb-is-submitting .gform_page_footer {
    opacity: 0.35;
    pointer-events: none;
    filter: blur(1px);
    transition: opacity 200ms ease, filter 200ms ease;
}

.gform_wrapper.lb-is-submitting::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(1px);
    z-index: 2;
    pointer-events: none;
}

.gform_wrapper.lb-is-submitting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-top-color: rgb(var(--color-gold));
    border-radius: 50%;
    animation: lb-gf-spin 0.75s linear infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes lb-gf-spin {
    to { transform: rotate(360deg); }
}

/* Hide the stock ajax spinner — our overlay is enough */
.gform_wrapper .gform_ajax_spinner {
    display: none !important;
}

/* Confirmation panel: centre content and give it a minimum height
   so the container doesn't snap to the natural (tiny) text height
   while we wait for the redirect. */
.gform_confirmation_wrapper,
.gform_confirmation_message {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Spinner glyph reused inside confirmation HTML */
.lb-gf-inline-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-top-color: rgb(var(--color-gold));
    border-radius: 50%;
    animation: lb-gf-spin 0.75s linear infinite;
}
