/**
 * 组合的语言和货币选择器
 * 一个按钮触发，一个弹窗内两个独立选择器
 */

/* 主容器 */
.lang-currency-combined {
    position: relative;
    display: inline-block;
}

/* 触发按钮 */
.lc-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lc-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.lc-trigger .flag {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lc-trigger .flag .flag-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

.lc-trigger .flag .flag-emoji {
    font-size: 18px;
    line-height: 1;
}

.lc-trigger .currency {
    font-weight: 600;
}

.lc-trigger .lc-separator {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    font-size: 14px;
}

.lc-trigger .arrow {
    margin-left: 4px;
    transition: transform 0.3s ease;
    display: none;
}

.lc-trigger-line {
    opacity: 0.1;
}

.lang-currency-combined:hover .lc-trigger .arrow {
    transform: rotate(180deg);
}

/* 弹出框 */
.lc-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    max-width: 176px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.lang-currency-combined:hover .lc-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 弹窗内的区块 */
.lc-section {
    padding: 12px;
}

.lc-section:first-child {
    border-bottom: 1px solid #f0f0f0;
}

/* 区块标题 */
.lc-section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f5f5f5;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    position: relative;
}

.lc-section-header:hover {
    background: #eeeeee;
    border-color: #d0d0d0;
}

.lc-section-header .flag,
.lc-section-header .symbol {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lc-section-header .flag .flag-img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

.lc-section-header .flag .flag-emoji {
    font-size: 18px;
    line-height: 1;
}

.lc-section-header .name {
    font-size: 14px;
}

.lc-section-header .arrow-down {
    position: absolute;
    right: 10px;
    transition: transform 0.3s ease;
}

/* 展开/收起效果 */
.lc-section.expanded .arrow-down {
    transform: rotate(180deg);
}

.lc-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.lc-section.expanded .lc-section-content {
    max-height: 400px;
    overflow-y: auto;
}

/* 选项列表 */
.lc-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin: 3px 0;
}

.lc-option:hover {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.12) 0%, rgba(25, 118, 210, 0.12) 100%);
    transform: translateX(4px);
}

/* 当前选中的选项 */
.lc-option.active {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    font-weight: 600;
}

.lc-option.active:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    transform: translateX(4px);
}

.lc-option .flag {
    font-size: 20px;
    width: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lc-option .flag .flag-img {
    width: 28px;
    height: 21px;
    object-fit: cover;
    border-radius: 2px;
}

.lc-option .flag .flag-emoji {
    font-size: 20px;
    line-height: 1;
}

.lc-option span:first-child {
    font-size: 16px;
    width: 24px;
    text-align: center;
    font-weight: 600;
}

.lc-option .name,
.lc-option span:last-child {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .lc-trigger {
        padding: 6px 12px;
        font-size: 13px;
    }

    .lc-popup {
        min-width: 144px;
        max-width: 160px;
        right: -20px;
    }

    .lc-section {
        padding: 10px;
    }
}

/* 滚动条样式 */
.lc-section-content::-webkit-scrollbar {
    width: 6px;
}

.lc-section-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.lc-section-content::-webkit-scrollbar-thumb {
    background: #2196F3;
    border-radius: 4px;
}

.lc-section-content::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

/* 三角箭头指示器 */
.lc-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}
