/* ========================================
   GLOBAL NAVIGATION SPINNER
   Shows a loading overlay when navigating
   between pages via <a> link clicks.
   ======================================== */

.clc-nav-spinner-overlay {
    position: fixed;
    top: 0;
    left: 16.25rem; /* Start from the right edge of the sidebar */
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s ease-in;
}

/* Handle responsive behavior - when sidebar is hidden on smaller screens */
@media (max-width: 1199.98px) {
    .clc-nav-spinner-overlay {
        left: 0; /* Full width on smaller screens where sidebar is typically hidden */
    }
}

.clc-nav-spinner-overlay.active {
    display: flex;
    opacity: 1;
}

.clc-nav-spinner-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.clc-nav-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.clc-nav-spinner {
    width: 56px;
    height: 56px;
    position: relative;
}

.clc-nav-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: clc-nav-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.clc-nav-spinner-ring:nth-child(1) {
    border-top-color: #6a11cb;
    animation-delay: -0.45s;
}

.clc-nav-spinner-ring:nth-child(2) {
    border-right-color: #2575fc;
    animation-delay: -0.3s;
}

.clc-nav-spinner-ring:nth-child(3) {
    border-bottom-color: #ffab00;
    animation-delay: -0.15s;
}

.clc-nav-spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #6a11cb;
    animation: clc-nav-pulse 1.5s ease-in-out infinite;
}

@keyframes clc-nav-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes clc-nav-pulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.clc-nav-spinner-text {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #566a7f;
    font-weight: 500;
}

.clc-nav-spinner-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}

.clc-nav-spinner-dots span {
    width: 4px;
    height: 4px;
    background: #6a11cb;
    border-radius: 50%;
    animation: clc-nav-dots 1.4s infinite ease-in-out both;
}

.clc-nav-spinner-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.clc-nav-spinner-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.clc-nav-spinner-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes clc-nav-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
