/* Transition Overlay Styles */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    /* Default light */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    visibility: visible;
    opacity: 1;
}

/* Dark mode support */
#transition-overlay.dark-mode-overlay {
    background-color: #111827;
    /* Matches theme-dark.min.css bg */
}

/* Spinner Animation */
.transition-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #377dff;
    /* Primary color */
    animation: transition-spin 1s ease-in-out infinite;
}

#transition-overlay.dark-mode-overlay .transition-spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: #377dff;
}

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

/* Utility to trigger transitions from JS */
.transition-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

.transition-visible {
    opacity: 1 !important;
    visibility: visible !important;
}