/* Reusable light blocking preloaders (modal / fullscreen). */

@keyframes ui-preloader-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .35; }
    40% { transform: translateY(-3px); opacity: 1; }
}

.ui-preloader-dot {
    width: .375rem;
    height: .375rem;
    border-radius: 9999px;
    background: #94a3b8;
    animation: ui-preloader-bounce 1.1s ease-in-out infinite;
}

.ui-preloader-dot:nth-child(2) { animation-delay: .15s; }
.ui-preloader-dot:nth-child(3) { animation-delay: .3s; }

/* Alias used by assistant thinking row */
.assistant-thinking-dot {
    width: .375rem;
    height: .375rem;
    border-radius: 9999px;
    background: #94a3b8;
    animation: ui-preloader-bounce 1.1s ease-in-out infinite;
}

.assistant-thinking-dot:nth-child(2) { animation-delay: .15s; }
.assistant-thinking-dot:nth-child(3) { animation-delay: .3s; }

.ui-preloader {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: auto;
}

.ui-preloader[aria-hidden="true"] {
    display: none;
}

.ui-preloader--fullscreen {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(248, 250, 252, 0.82);
}

.ui-preloader--fullscreen[aria-hidden="true"] {
    display: none;
}

.ui-preloader__label {
    margin: 0;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    color: #334155;
    text-align: center;
}

.ui-preloader__detail {
    margin: 0;
    max-width: 18rem;
    font-size: .75rem;
    line-height: 1rem;
    color: #64748b;
    text-align: center;
}

.ui-preloader-host {
    position: relative;
}

.ui-preloader-host.is-preloading {
    pointer-events: none;
}

.ui-preloader-host.is-preloading > .ui-preloader {
    pointer-events: auto;
}
