/* Language Switcher Styles - 紧凑下拉框样式 */
.language-switcher {
    display: inline-block;
    position: relative;
}

.language-switcher .lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 120px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.language-switcher .lang-select:hover {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.language-switcher .lang-select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Header中的语言切换器 - 右上角位置 */
.minimal-header .action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.minimal-header .language-switcher {
    margin-left: auto; /* 自动推到最右边 */
    margin-right: 0;
}

/* 登录/注册页面的语言切换器 */
.login-container .logo-section,
.register-container .logo-section {
    position: relative;
}

.login-container .logo-section > div:first-child,
.register-container .logo-section > div:first-child {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .language-switcher .lang-select {
        font-size: 12px;
        padding: 5px 20px 5px 8px;
        min-width: 50px; /* 移动端更窄，显示简写 */
        width: 50px; /* 固定宽度 */
        text-align: center;
        background-position: right 6px center;
        background-size: 10px;
    }
    
    /* 移动端显示简写：通过data-display属性 */
    .language-switcher .lang-select[data-display] {
        font-size: 11px;
        font-weight: 600;
    }
    
    /* 移动端隐藏下拉箭头（可选） */
    .language-switcher .lang-select {
        padding-right: 8px;
    }
    
    /* 移动端：语言切换器与logo同一行（已在article.css中处理） */
    .minimal-header .language-switcher {
        position: static; /* 改为静态定位，与logo同一行 */
        margin-left: auto;
        margin-right: 0;
        flex-shrink: 0;
    }
    
    /* 登录/注册页面移动端 */
    .login-container .logo-section,
    .register-container .logo-section {
        padding-top: 45px; /* 为语言切换器留出合适空间 */
        padding-right: 10px; /* 确保右侧有足够空间 */
    }
    
    .login-container .logo-section > div:first-child,
    .register-container .logo-section > div:first-child {
        top: 10px;
        right: 10px;
    }
}

