/* Global Loading Spinner - Shared Across All Websites */
/* Modern, CSS-only spinner with greyed-out overlay */

/* Overlay backdrop */
.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.global-loading-overlay.show {
    display: flex;
    opacity: 1;
}

/* Spinner container */
.global-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Modern circular spinner */
.global-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: global-spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Site-specific spinner colors */
.global-loading-overlay.joelinks .global-spinner {
    border-top-color: #5e5bed;
    border-right-color: #5e5bed;
    border-bottom-color: rgba(94, 91, 237, 0.3);
}

.global-loading-overlay.schoolsearch .global-spinner {
    border-top-color: #4f46e5;
    border-right-color: #4f46e5;
    border-bottom-color: rgba(79, 70, 229, 0.3);
}

.global-loading-overlay.zoomamerica .global-spinner {
    border-top-color: #5e5bed;
    border-right-color: #5e5bed;
    border-bottom-color: rgba(94, 91, 237, 0.3);
}

.global-loading-overlay.docsearch .global-spinner {
    border-top-color: #4f46e5;
    border-right-color: #4f46e5;
    border-bottom-color: rgba(79, 70, 229, 0.3);
}

/* Loading text */
.global-spinner-text {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Spin animation */
@keyframes global-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .global-spinner {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }

    .global-spinner-text {
        font-size: 0.875rem;
    }
}

/* Prevent body scroll when spinner is active */
body.spinner-active {
    overflow: hidden;
}
