/* ── Full-page loader ────────────────────────────────────────────────────────
   The overlay element is created and toggled by wwwroot/js/loader.js. Linked from _Layout and the
   stand-alone pre-auth pages (Login, _ResetLayout), so it only relies on the tenant's --primary /
   --primary-rgb custom properties (with today's blue as the fallback) and nothing from site.css.
   ─────────────────────────────────────────────────────────────────────────── */

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 2000; /* above Bootstrap modals (1055) and toasts (1090) */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    cursor: progress;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

.page-loader.is-visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.page-loader__box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.6rem;
    background: #fff;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
}

.page-loader__spinner {
    width: 1.75rem;
    height: 1.75rem;
    border: 3px solid rgba(var(--primary-rgb, 59, 130, 246), 0.2);
    border-top-color: var(--primary, #3b82f6);
    border-radius: 50%;
    animation: page-loader-spin 0.75s linear infinite;
}

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