/* Footer Styles */
footer {
    background-color: #151516;
    color: white;
    padding: 8px;
    text-align: center;
    font-size: var(--fs-xs, 12px); /* Fallback: Footer laeuft auch auf token-losen Standalone-Seiten (login/landing/accept_invite) */
    z-index: 999;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-inner {
    justify-self: center;
    white-space: nowrap;
}

.footer-right {
    justify-self: end;
}

footer a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    margin: 0 8px;
}

/* Mobil: 14px-Textlinks (Impressum/Datenschutz) bekommen eine echte
   Trefffläche; Optik bleibt, nur die Hitbox wächst. */
@media (max-width: 640px) {
    footer a {
        display: inline-block;
        padding: 10px 6px;
        margin: 0 2px;
    }
}

footer a:hover {
    color: var(--secondary-color);
}

/* Footer Responsive (mobil) – gestapelt + kleinerer Mitteltext, damit die
   lange Copyright-/Versionszeile auf dem Handy nicht zu groß wirkt/überläuft. */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }
    .footer-left, .footer-inner, .footer-right {
        justify-self: center;
    }
    .footer-left { order: 2; }
    .footer-inner {
        order: 1;
        white-space: normal;
        line-height: 1.6;
    }
    .footer-right { order: 3; }
}

@media (max-width: 600px) {
    footer { padding: 12px 15px; font-size: 11px; }
    .footer-inner {
        font-size: 10px;
        line-height: 1.8;
        max-width: 100%;
        word-break: break-word;
    }
    footer a { display: inline-block; margin: 2px 4px; font-size: 11px; }
}

@media (max-width: 400px) {
    footer { padding: 10px 12px; font-size: 10px; }
    .footer-inner { font-size: 9px; }
    footer a { font-size: 10px; margin: 2px 3px; }
}