/* Wait / rate-limit popup */

.wait-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4, 1rem);
}

.wait-modal[hidden] {
    display: none !important;
}

.wait-modal__backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, #0b0f19 55%, transparent);
    backdrop-filter: blur(4px);
}

.wait-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 22rem);
    padding: 1.5rem 1.35rem 1.25rem;
    border-radius: var(--r-lg, 1rem);
    border: 1px solid var(--c-border, #e2e8f0);
    background: var(--c-surface, #fff);
    box-shadow: var(--shadow-3, 0 18px 40px rgba(15, 23, 42, 0.18));
    text-align: center;
}

.wait-modal__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 0.85rem;
    color: var(--c-accent, #4f46e5);
}

.spinner--lg {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
}

.wait-modal__title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text, #0f172a);
}

.wait-modal__body {
    margin: 0 0 1rem;
    color: var(--c-text-2, #475569);
    font-size: 0.95rem;
    line-height: 1.45;
}

.wait-modal__bar {
    height: 0.35rem;
    margin: 0 0 1.1rem;
    border-radius: 999px;
    background: var(--c-surface-2, #f1f5f9);
    overflow: hidden;
}

.wait-modal__fill {
    height: 100%;
    width: 100%;
    border-radius: inherit;
    background: var(--c-accent, #4f46e5);
    transform-origin: left center;
    transform: scaleX(1);
    transition: transform 0.2s linear;
}

.wait-modal__close {
    width: 100%;
}

body.wait-modal-open {
    overflow: hidden;
}
