/* ============================================================
   language.css — 语言选择组件样式
   ============================================================ */

/* language.css —— 放在 .lang-selector 相关样式之前 */
.lang-selector .uk-dropdown {
    display: none;          /* 兜底：即使 uikit.css 未生效也不展开 */
}
.lang-selector .uk-dropdown.uk-open {
    display: block;         /* UIkit 显示时用 uk-open 类覆盖 */
}

/* ============================================================
   7. 桌面端多语言下拉
   ============================================================ */
.lang-selector {
    position: relative;
    display: inline-block;
}
.lang-selector .lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50px;
    padding: 6px 12px;
    color: var(--brand-gray);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    height: 38px;
    font-family: inherit;
}
.lang-selector .lang-btn:hover {
    color: var(--brand-red);
    background: rgba(225, 0, 15, 0.04);
}
.lang-selector .lang-btn svg.globe-icon {
    width: 18px; height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lang-selector .lang-btn .lang-label {
    line-height: 1;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-selector .uk-dropdown {
    min-width: 260px;
    max-height: 480px;
    overflow-y: auto;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
    background: #fff;
}
.lang-selector .uk-dropdown::-webkit-scrollbar { width: 6px; }
.lang-selector .uk-dropdown::-webkit-scrollbar-track { background: transparent; }
.lang-selector .uk-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}
.lang-selector .uk-dropdown .lang-group-label {
    padding: 10px 18px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #999;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 1;
}
.lang-selector .uk-dropdown .lang-group-label:first-child {
    padding-top: 12px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.lang-selector .uk-dropdown .lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--brand-gray);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}
.lang-selector .uk-dropdown .lang-item:hover {
    background: rgba(225, 0, 15, 0.04);
    color: var(--brand-red);
    text-decoration: none;
}
.lang-selector .uk-dropdown .lang-item.active {
    color: var(--brand-red);
    font-weight: 600;
    background: rgba(225, 0, 15, 0.05);
}
.lang-selector .uk-dropdown .lang-item .lang-flag {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.lang-selector .uk-dropdown .lang-item .lang-name { flex: 1; }
.lang-selector .uk-dropdown .lang-item .check-icon {
    width: 16px; height: 16px;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0;
    stroke: var(--brand-red);
}
.lang-selector .uk-dropdown .lang-item.active .check-icon { opacity: 1; }

/* ============================================================
   8. 移动端语言按钮
   ============================================================ */
.mobile-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50px;
    padding: 0 10px;
    height: 40px;
    color: var(--brand-gray);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    font-family: inherit;
}
.mobile-lang-btn:hover,
.mobile-lang-btn:focus {
    color: var(--brand-red);
    background: rgba(225, 0, 15, 0.04);
    text-decoration: none;
    outline: none;
}
.mobile-lang-btn svg {
    width: 20px; height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}
.mobile-lang-btn .mobile-lang-short {
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   9. 移动端语言模态框
   ============================================================ */
.lang-modal-body {
    max-height: 75vh;
    overflow-y: auto;
    padding: 24px 24px 28px;
}
.lang-modal-body::-webkit-scrollbar { width: 6px; }
.lang-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}
.lang-modal-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #999;
    margin: 18px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.lang-modal-group-title:first-of-type { margin-top: 8px; }
.lang-modal-list { list-style: none; padding: 0; margin: 0; }
.lang-modal-list li a {
    display: flex;
    align-items: center;
    padding: 11px 0;
    color: var(--brand-gray);
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: color 0.15s, padding-left 0.15s;
}
.lang-modal-list li a:hover { color: var(--brand-red); padding-left: 6px; }
.lang-modal-list li a.active { color: var(--brand-red); font-weight: 600; }
.lang-modal-list li a .lang-flag { margin-right: 10px; font-size: 1.05rem; }