/* Footer and language toggle (extracted from the partials; colours come from tokens.css). */

.app-footer {
    margin-top: auto;
    padding: 1.5rem 1rem;
    background: var(--bg-raised);
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Wider footer for exam list page to match container */
.exam-list-page .footer-content {
    max-width: 1380px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-left,
.footer-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-right {
    align-items: flex-end;
    text-align: right;
}

.footer-institution {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--danger);
    text-decoration: underline;
}

.footer-separator {
    color: var(--muted);
    user-select: none;
}

.footer-version {
    font-size: 0.75rem;
    color: var(--muted);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-switch-link {
    background: color-mix(in srgb, var(--danger) 8%, transparent);
    color: var(--danger);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    display: inline-block;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.role-switch-link:hover {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    transform: translateY(-1px);
}

/* Ensure body takes full height for footer positioning */
body {
    min-height: 100vh; /* fallback before dvh, taste-skill-ignore */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.container, .login-container {
    flex: 1;
}

/* Login page specific adjustments */
.login-container {
    padding-bottom: 3rem;
    min-height: calc(100vh - 120px);
    min-height: calc(100dvh - 120px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .footer-institution {
        justify-content: center;
    }

    .footer-legal,
    .footer-role {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .app-footer {
        padding: 1.25rem 0.75rem;
    }

    .footer-institution {
        flex-direction: column;
        gap: 0.25rem;
    }

    .footer-separator:first-of-type {
        display: none;
    }
}

.language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
}
.language-toggle .lang-form {
    display: inline;
    margin: 0;
    padding: 0;
}
.language-toggle .lang-option {
    font-size: 0.8rem;
    line-height: 1;
}
.language-toggle .lang-option-active {
    font-weight: 700;
    color: var(--ink);
}
.language-toggle .lang-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--muted);
    text-decoration: none;
    font-family: inherit;
}
.language-toggle .lang-link:hover {
    color: var(--danger);
    text-decoration: underline;
}
.language-toggle .lang-sep {
    color: var(--muted);
    user-select: none;
}
