/**
 * 语言切换器样式
 * 用于中英文切换（导航文字样式，逻辑沿用 i18n.js 的 data-lang / .active）
 */

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0;
    border: 0;
}

.language-switcher button {
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #5f5a55;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0;
    transition: color 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    line-height: 1.2;
}

.language-switcher::before {
    content: "\f1ab";
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    color: #5f5a55;
    font-size: 14px;
    line-height: 1;
}

.language-switcher button:hover,
.language-switcher button:focus-visible {
    color: #E8425A;
}

.language-switcher button.active {
    display: none;
}

.language-switcher button:focus { outline: none; }
.language-switcher button:focus-visible {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* 国旗图标样式（可选，已不使用 emoji 国旗） */
.language-switcher .flag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .language-switcher { gap: 8px; padding: 0; }
    .language-switcher button {
        min-width: 0;
        padding: 0;
        font-size: 13px;
    }

}

/* 极小屏幕只显示缩写（中 / EN） */
@media (max-width: 480px) {
    .language-switcher button .lang-full { display: none; }
    .language-switcher button .lang-short { display: inline; }
}

@media (min-width: 481px) {
    .language-switcher button .lang-short { display: none; }
    .language-switcher button .lang-full { display: inline; }
}

/* Header 中的语言切换器定位 */
.header .language-switcher { margin-left: auto; }
.header-content-wrapper .language-switcher { margin-left: 20px; }
