/**
 * QuantaPay 语言切换器样式 - 优化版
 * 更大尺寸，更显眼，简化代码
 */

/* 语言切换器容器 */
.language-switcher-dropdown {
    position: relative;
    display: inline-block;
}

/* 主按钮样式 - 增大尺寸更显眼 */
.language-switcher-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
    min-width: 140px;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(14,165,233,0.1);
}

.language-switcher-btn:hover {
    background: #0ea5e9;
    color: #fff;
    box-shadow: 0 4px 12px rgba(14,165,233,0.2);
}

/* 按钮内容 */
.language-switcher-btn .flag {
    font-size: 20px;
    line-height: 1;
}

.language-switcher-btn .name {
    font-weight: 600;
    color: inherit;
}

.language-switcher-btn i {
    font-size: 14px;
    color: inherit;
    transition: transform 0.2s ease;
}

/* 展开状态的箭头 */
.language-switcher-menu.show ~ .language-switcher-btn i {
    transform: rotate(180deg);
}

/* 下拉菜单 - 简化版 */
.language-switcher-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.language-switcher-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 语言选项 - 简化版 */
.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: #f0f9ff;
    text-decoration: none;
}

.language-option.active {
    background-color: #0ea5e9;
    color: #fff;
}

.language-option .flag {
    font-size: 18px;
}

.language-option .name {
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .language-switcher-dropdown {
        width: 100%;
    }
    
    .language-switcher-btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .language-switcher-menu {
        left: 0;
        right: 0;
        min-width: auto;
    }
    
    .language-option {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .language-option .flag {
        font-size: 18px;
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .language-switcher-btn .name {
        display: none;
    }
    
    .language-switcher-btn {
        min-width: auto;
        width: 50px;
        justify-content: center;
    }
    
    .language-switcher-menu {
        right: 0;
        left: auto;
        min-width: 140px;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .language-switcher-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #fff;
    }
    
    .language-switcher-btn .name {
        color: #fff;
    }
    
    .language-switcher-btn:hover {
        border-color: #63b3ed;
        box-shadow: 0 2px 8px rgba(99,179,237,0.1);
    }
    
    .language-switcher-menu {
        background: #2d3748;
        border-color: #4a5568;
        box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    }
    
    .language-option {
        color: #fff;
    }
    
    .language-option:hover {
        background-color: #4a5568;
    }
    
    .language-option.active {
        background-color: #3182ce;
    }
    
    .language-option.active:hover {
        background-color: #2c5282;
    }
}

/* 无障碍支持 */
.language-switcher-btn:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.language-option:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* 动画效果 */
.language-switcher-dropdown {
    --animation-duration: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
    .language-switcher-btn,
    .language-switcher-menu,
    .language-option {
        transition: none;
    }
    
    .language-switcher-btn i {
        transition: none;
    }
}

/* 集成到现有头部样式 */
.main-header .language-switcher-dropdown {
    margin-left: auto;
}

.main-nav .language-switcher-dropdown {
    order: 999;
}

/* 确保在其他元素之上 */
.language-switcher-menu {
    z-index: 9999;
}