/* ================================
   Spinner Overlay
================================ */

/* Base overlay (hidden by default) */
#loading-spinner {
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    background-color: var(--overlay-bg);
    z-index: 1000;
}

/* Force hidden unless .active is present */
#loading-spinner:not(.active) {
    display: none !important;
}

/* Visible state */
#loading-spinner.active {
    display: flex !important;
}

/* ================================
   Spinner Content
================================ */

.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner img {
    max-width: 200px;
    height: auto;
    animation: spin 1.5s linear infinite;
}

.spinner-text {
    font-size: 16px;
    margin-top: 20px;
    color: var(--spinner-text);
}

/* ================================
   Animations
================================ */

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
