/* PACCS Global Loader - Modern Glassmorphism UI */
#global-ajax-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Above everything */
    transition: opacity 0.3s ease;
    flex-direction: column;
    gap: 20px;
}

#global-ajax-loader.active {
    display: flex;
}

.paccs-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #3b82f6;
    /* Accent Blue */
    border-radius: 50%;
    animation: paccs-spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.5));
}

.loader-text {
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes paccs-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-text {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Card-level localized loader */
.loader-wrapper {
    position: relative;
    min-height: 100px;
}

.paccs-card-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
    transition: all 0.3s ease;
}

.paccs-card-loader.active {
    display: flex;
}

.paccs-card-loader .spinner-sm {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: paccs-spin 0.8s linear infinite;
}

/* Ensure no scroll shift when loader active */
body.loader-active {
    overflow: hidden;
}