﻿.footer {
    padding: var(--footer-padding, 24px 24px);
    color: var(--footer-color, var(--muted));
    border-top: 1px solid var(--footer-border, var(--border));
    background: var(--footer-bg, var(--bg));
    line-height: normal;
    white-space: normal;
}

.footer a {
    color: inherit;
    text-decoration: none;
    transition: color .3s;
}

.footer a:hover {
    color: var(--footer-link-hover, var(--brand));
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    width: min(1200px,100% - 2rem);
    margin-inline: auto;
}

.footer .lang-switcher {
    transform: translateY(-1px);
}

@media (max-width: 520px) {
    .footer {
        padding: var(--footer-padding, 24px 0);
    }
    .footer-tag {
        display: none;
    }
}

.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

    .lang-button:hover {
        background: rgba(0, 0, 0, 0.04);
        color: var(--text);
    }

[data-theme="dark"] .lang-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18);
    border-color: rgba(0, 113, 227, 0.6);
}

.lang-icon {
    width: 16px;
    height: 16px;
    opacity: .85;
}

.lang-caret {
    width: 14px;
    height: 14px;
    opacity: .7;
}

.lang-dropdown {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    min-width: 180px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

[data-theme="dark"] .lang-dropdown {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background-color .12s ease, color .12s ease;
    z-index: 2147483647;
}

    .lang-option:hover {
        background: rgba(0, 0, 0, 0.04);
    }

[data-theme="dark"] .lang-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-option:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18);
}

.lang-option.active {
    background: var(--brand);
    color: #fff;
}

.lang-flag {
    font-size: 18px;
    line-height: 1;
}

.lang-code {
    margin-left: auto;
    opacity: .7;
    font-size: 12px;
    letter-spacing: .02em;
}