/**
 * 多语言切换器样式
 */

/* 语言切换器容器 */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

/* 当前语言按钮 */
.language-switcher-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.language-switcher-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-switcher-button .icon {
    font-size: 18px;
}

.language-switcher-button .arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-switcher.active .language-switcher-button .arrow {
    transform: rotate(180deg);
}

/* 语言下拉菜单 */
.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-switcher.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
}

.language-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.language-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.language-dropdown-item:hover {
    background: #f5f5f5;
}

.language-dropdown-item.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.language-dropdown-item .flag {
    font-size: 20px;
    line-height: 1;
}

.language-dropdown-item .check {
    margin-left: auto;
    color: #1976d2;
    font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 0;
        margin-top: 10px;
    }

    .language-switcher-button {
        width: 100%;
        justify-content: center;
    }

    .language-dropdown {
        right: auto;
        left: 0;
        width: 100%;
    }
}

/* 响应式 - 超小屏幕 */
@media (max-width: 480px) {
    .language-switcher-button {
        padding: 6px 10px;
        font-size: 13px;
    }

    .language-dropdown-item {
        padding: 10px 14px;
        font-size: 13px;
    }
}
