/* Keep WPForms' native submit and next-page controls together on the first page. */
.bns-fta-optional-page .bns-fta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

/* WPForms' clearfix pseudo-elements must not become empty flex items. */
.bns-fta-optional-page .bns-fta-actions::before,
.bns-fta-optional-page .bns-fta-actions::after {
    content: none;
}

/* Keep the live status accessible outside the busy form without affecting its layout. */
.bns-fta-loading-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Activated by the head script only; without JavaScript the form stays visible. */
form.wpforms-form.bns-fta-loading {
    position: relative;
    min-block-size: 12rem;
    visibility: hidden;
}

form.wpforms-form.bns-fta-loading * {
    visibility: hidden !important;
}

form.wpforms-form.bns-fta-loading::before {
    content: '';
    position: absolute;
    inset-block-start: 4rem;
    inset-inline-start: calc(50% - 1.5rem);
    box-sizing: border-box;
    width: 3rem;
    height: 3rem;
    border: 3px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    color: var(--wpforms-button-background-color, var(--e-global-color-accent, #bfd400));
    visibility: visible;
    animation: bns-fta-spin 0.8s linear infinite;
}

@keyframes bns-fta-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    form.wpforms-form.bns-fta-loading::before {
        animation: none;
    }
}

.bns-fta-optional-page .bns-fta-submit-inline { margin: 0 !important; padding: 0 !important; }
.bns-fta-optional-page .bns-fta-heading { margin-bottom: 1rem; }
/* Retain descriptions in form JSON for the chatbot; operational instructions stay visible. */
.bns-fta-placeholder-form .wpforms-field:not(.wpforms-field-number-slider):not(.wpforms-field-captcha):not(.wpforms-field-file-upload):not(.wpforms-field-html):not(.wpforms-field-content):not(.wpforms-field-divider):not(.wpforms-field-pagebreak):not(.wpforms-field-layout):not(.wpforms-field-repeater):not(.wpforms-field-entry-preview) > .wpforms-field-description {
    display: none !important;
}
