/* --- BASIS-STYLING UND FIXIERUNG (IMMER AKTIV) --- */
#custom-fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    font-size: 13px;

    /* WICHTIG: Ein z-index von 10 sorgt dafür, dass der Footer im normalen Layout 
       oben aufsitzt, aber von der Bilder-Vollansicht (Lightbox) geschluckt wird. */
    z-index: 10 !important; 

    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Abstandhalter für Bilder am Seitenende */
#files-container {
    padding-bottom: 60px !important; 
}

/* Gleichmäßiger Abstand für Text und Links */
#custom-fixed-footer span, 
#custom-fixed-footer a {
    padding: 0 5px; 
    display: inline-block;
}

/* --- 1. FALLBACK / STANDARD (DUNKLER MODUS) --- */
/* Falls kein Modus erkannt wird oder das Menü dunkel dominiert */
#custom-fixed-footer {
    background-color: rgba(20, 20, 20, 0.95) !important;
    border-top: 1px solid #333 !important;
    color: #aaa !important;
}
#custom-fixed-footer a {
    color: #fff !important;
    text-decoration: underline;
}

/* --- 2. ERZWUNGENER HELLMODUS (WENN CONTENT HELL IST) --- */
/* Diese Selektoren prüfen alle gängigen Methoden, wie Files Gallery den Hellmodus markiert */
html[data-theme="light"] #custom-fixed-footer,
body.view-light #custom-fixed-footer,
body[data-theme="light"] #custom-fixed-footer,
.theme-light #custom-fixed-footer {
    background-color: rgba(245, 245, 245, 0.95) !important;
    border-top: 1px solid #e0e0e0 !important;
    color: #555 !important;
}

html[data-theme="light"] #custom-fixed-footer a,
body.view-light #custom-fixed-footer a,
body[data-theme="light"] #custom-fixed-footer a,
.theme-light #custom-fixed-footer a {
    color: #111 !important;
    text-decoration: underline;
}
