/* =============================================================================
   spa-navigation.css – Loading States für SPA-Navigation
   =============================================================================
   Filepath: css/spa-navigation.css
   
   Description:
     CSS für SPA-Navigation Loading-States und Animationen
   
   Dependencies: theme.css (für Farbvariablen)
   
   Author.....: D.Goetze
   Version....: 1.0.0
   Created....: 2026-06-07
   Last Change: 2026-06-07  D.Goetze - Initial version
   ============================================================================= */

/* =============================================================================
   Loading State
   ============================================================================= */

#main-content.spa-loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Loading Spinner (optional) */
#main-content.spa-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border: 4px solid var(--color-border, #ccc);
    border-top-color: var(--color-accent, #007bff);
    border-radius: 50%;
    animation: spa-spinner 0.8s linear infinite;
    z-index: 1000;
}

@keyframes spa-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* =============================================================================
   Smooth Transitions
   ============================================================================= */

#main-content {
    transition: opacity 0.15s ease;
}

/* Fade-In Animation nach Content-Load */
@keyframes spa-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#main-content > * {
    animation: spa-fade-in 0.2s ease;
}

/* =============================================================================
   Navigation Active States (optional)
   ============================================================================= */

.sidebar-nav a.active {
    font-weight: bold;
    background-color: var(--color-background-2, #f0f0f0);
}
