/* Extracted from page_loader */

/* ── Top progress bar ─────────────────────────────────────────── */
#pl-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary, #6c5ce7) 0%, #a78bfa 100%);
    z-index: 99999;
    border-radius: 0 2px 2px 0;
    transition: width 0.25s ease, opacity 0.35s ease;
    opacity: 0;
    pointer-events: none;
}
#pl-bar.pl-running {
    opacity: 1;
}

/* ── Full-page dimmed spinner ─────────────────────────────────── */
#pl-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.18s ease, transform 0.22s ease, visibility 0.18s ease;
}
#pl-overlay.pl-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transform: scale(1);
}
#pl-overlay .pl-ring {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(108, 92, 231, 0.16);
    border-top-color: var(--primary, #6c5ce7);
    border-radius: 50%;
    animation: pl-spin 0.75s linear infinite;
    box-shadow: 0 0 0 10px rgba(108, 92, 231, 0.08);
}
#pl-overlay .pl-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary, #6c5ce7);
    letter-spacing: 0.01em;
}

html.pl-is-active,
html.pl-is-active body {
    cursor: progress;
}

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