/**
 * 语言切换器样式 - 导航栏集成模式
 */

/* 语言切换器容器 - 放在导航栏右侧 */
.lang-switcher-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
    position: relative;
}

.lang-switcher {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 1000;
}

.lang-switcher:hover {
    box-shadow: none;
    transform: none;
}

/* 语言切换按钮 */
.lang-switcher-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    cursor: pointer;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-switcher-btn:hover {
    color: #0066cc;
    border-color: #0066cc;
}

.lang-text {
    font-weight: 500;
}

.lang-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.lang-switcher-btn:hover .lang-arrow,
.lang-dropdown.show + .lang-switcher-btn .lang-arrow {
    transform: rotate(180deg);
}

/* 下拉菜单 */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 160px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
    z-index: 1001;
    pointer-events: none;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 下拉菜单选项 */
.lang-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #333;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.lang-option:first-child {
    border-radius: 8px 8px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 8px 8px;
}

.lang-option:only-child {
    border-radius: 8px;
}

.lang-option:hover {
    background: #f0f5ff;
    color: #0066cc;
}

.lang-option.active {
    background: #e6f0ff;
    color: #0066cc;
    font-weight: 600;
}

.lang-option.active:hover {
    background: #d9e8ff;
}

/* 语言图标 - 预留，如需使用国旗图标可启用 */
.lang-icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
    display: none; /* 默认隐藏，新格式不需要国旗 */
}

/* 分隔线 */
.lang-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 2px 0;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .lang-switcher-container {
        margin-left: 15px;
    }
    
    .lang-switcher-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .lang-dropdown {
        min-width: 160px;
    }
    
    .lang-option {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* 小屏幕适配 */
@media screen and (max-width: 480px) {
    .lang-switcher-container {
        margin-left: 10px;
    }
    
    .lang-switcher-btn {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .lang-dropdown {
        min-width: 150px;
    }
    
    .lang-option {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* 打印时隐藏语言切换器 */
@media print {
    .lang-switcher {
        display: none;
    }
}
