/**
 * 语言选择器样式文件
 * 用于顶部导航栏的语言切换功能
 */

/* 语言选择器容器 */
.language-selector {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: 15px;
}

/* 语言选择按钮 */
.language-button {
    background-color: transparent;
    color: #333;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    min-width: 50px;
}

.language-button:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.language-button.active {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
}

/* 下拉箭头 */
.dropdown-arrow {
    transition: transform 0.3s ease;
}

.language-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* 语言弹出框 */
.language-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
}

.language-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

/* 语言列表容器 */
.language-items {
    padding: 8px 0;
    max-height: 300px;
    overflow-y: auto;
}

/* 单个语言项 */
.lang-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
}

.lang-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-item img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* 滚动条样式 */
.language-items::-webkit-scrollbar {
    width: 6px;
}

.language-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.language-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.language-items::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 10px;
    }
    
    .language-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .language-popup {
        right: -10px;
        min-width: 160px;
    }
    
    .lang-item {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .lang-item img {
        width: 20px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .language-button {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .language-popup {
        min-width: 140px;
    }
}
