/* --- Wrapper: Positionierung --- */
#system-alerts-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 1.5rem; /* Abstand zur Navbar (vgl. style.css) */
    position: relative;
    z-index: 950; /* Unter Navbar (1000), aber über Content */
    pointer-events: none;
}

/* --- Container: IDENTISCHE MAßE WIE NAVBAR/FOOTER --- */
#system-alerts-list {
    /* Die exakte Formel aus deiner style.css (.navbar-inner) */
    width: min(90vw, 1600px) !important;
    margin: 0 auto;
    
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto; /* Alerts klickbar machen */
    
    /* Animation beim Aufklappen */
    max-height: 0;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#system-alerts-list.has-content {
    max-height: 600px;
    opacity: 1;
    margin-bottom: 1.5rem; /* Abstand zum Main-Content */
}

/* --- Alert Card: Dark Azure Glass Design --- */
.sys-alert {
    /* Hintergrund: Exakt wie dein Footer (.footer-inner) */
    background: linear-gradient(180deg, rgba(14, 17, 22, 0.95), rgba(8, 10, 14, 0.98));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    /* Border: Exakt wie dein Footer */
    border: 1px solid rgba(79, 140, 255, 0.15);
    border-left-width: 4px; /* Dickerer linker Rand für Status */
    
    /* Radius: Passend zu deinen anderen Elementen */
    border-radius: 12px;
    
    padding: 1rem 1.5rem;
    color: #e6e9ef; /* var(--text) */
    font-family: system-ui, -apple-system, sans-serif; /* var(--font) */
    font-size: 0.95rem;
    line-height: 1.5;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* Schatten wie .page-container */
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    
    position: relative;
    overflow: hidden;
}

/* Glow Effekt (Subtil) */
.sys-alert::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(79, 140, 255, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

/* --- Typen-Farben (Passend zu Dark Theme) --- */

/* Note: Azure (Dein Branding) */
.sys-alert.type-note { 
    border-left-color: #4f8cff; /* var(--accent) */
}

/* Warning: Orange/Gold */
.sys-alert.type-warning { 
    border-left-color: #d29922; 
}

/* Error: Red */
.sys-alert.type-error { 
    border-left-color: #f85149; 
    background: linear-gradient(180deg, rgba(40, 10, 10, 0.95), rgba(20, 5, 5, 0.98)); /* Leichter Rot-Stich im Schwarz */
}

/* Success: Green */
.sys-alert.type-success { 
    border-left-color: #238636; 
}

/* --- Content & Button --- */
.sys-alert-content {
    flex-grow: 1;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Close Button (X) */
.sys-close {
    background: transparent;
    border: none;
    color: #9aa4b2; /* var(--muted) */
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sys-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* --- PROGRESS BAR (Nur für Timer-Alerts) --- */

/* Der Hintergrund-Pfad (Track) */
.sys-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px; /* Fein und edel */
    background: rgba(255, 255, 255, 0.05);
    z-index: 10;
    pointer-events: none;
}

/* Der füllende Balken (Azure) */
.sys-progress-fill {
    height: 100%;
    background: #4f8cff; /* Dein Azure Blau */
    width: 100%;
    transform-origin: left;
    
    /* Animation wird im PHP per Inline-Style (Duration) gesteuert */
    animation-name: progressLinear;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

/* Pro-Feature: Timer pausieren beim Drüberfahren mit der Maus */
.sys-alert:hover .sys-progress-fill {
    animation-play-state: paused;
}

/* Die Animation: Von 100% auf 0% */
@keyframes progressLinear {
    from { width: 100%; }
    to { width: 0%; }
}

/* Animationen */
@keyframes fadeOutSlide {
    to { 
        opacity: 0; 
        transform: translateY(-10px); 
        height: 0; 
        margin: 0; 
        padding: 0; 
        border: 0; 
    }
}
