/* Full-page overlay while a form is submitting */
.form-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.form-loader.is-visible {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.form-loader__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 28, 40, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.form-loader__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.15rem;
    min-width: min(100%, 280px);
    max-width: 360px;
    padding: 2rem 2.25rem;
    border-radius: 16px;
    background: #ffffff;
    box-shadow:
        0 24px 48px rgba(15, 33, 56, 0.22),
        0 0 0 1px rgba(31, 78, 102, 0.08);
    text-align: center;
}

.form-loader__spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(31, 78, 102, 0.14);
    border-top-color: #1f4e66;
    border-right-color: #34d3ff;
    animation: form-loader-spin 0.75s linear infinite;
}

.form-loader__brand-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #fcd102;
    box-shadow: 0 0 0 4px rgba(252, 209, 2, 0.25);
}

.form-loader__spinner-wrap {
    position: relative;
    width: 52px;
    height: 52px;
}

.form-loader__text {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Barlow', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    color: #1f2a37;
}

.form-loader__hint {
    margin: -0.35rem 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

html.form-loader-active,
html.form-loader-active body {
    overflow: hidden;
}

html.form-loader-active body {
    touch-action: none;
    user-select: none;
}

@keyframes form-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .form-loader {
        transition: none;
    }

    .form-loader__spinner {
        animation-duration: 1.2s;
    }
}
