/* ========== 语言国家选择弹出窗样式 ========== */

/* 模态框基础样式 */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.language-modal.show {
    opacity: 1;
    visibility: visible;
}

.language-modal.hidden {
    display: none;
}

/* 模态框遮罩层 */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* 模态框内容容器 */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 模态框头部 */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #105E8C;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    color: #6B7280;
    font-size: 20px;
}

.modal-close:hover {
    background-color: #F3F4F6;
    color: #374151;
}

/* 模态框主体 */
.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 选择区域样式 */
.language-selection,
.country-selection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selection-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* 自定义选择器样式 */
.select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    display: none; /* 隐藏原生select */
}

.select-display {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 16px;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    box-sizing: border-box;
}

.select-display:hover {
    border-color: #105E8C;
}

.select-display:focus {
    outline: none;
    border-color: #105E8C;
    box-shadow: 0 0 0 3px rgba(16, 94, 140, 0.1);
}

.select-arrow {
    font-size: 14px;
    color: #6B7280;
    transition: transform 0.3s ease;
}

.select-wrapper.open .select-arrow {
    transform: rotate(180deg);
}

/* 下拉菜单样式 - 改为fixed定位，最高层级 */
.select-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999; /* 设置最高层级 */
    background-color: #ffffff;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow: hidden;
    display: none; /* 默认隐藏 */
    flex-direction: column;
    min-width: 200px; /* 设置最小宽度 */
}

.select-dropdown.show {
    display: flex;
}

/* 搜索框样式 */
.search-box {
    padding: 12px;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #105E8C;
    box-shadow: 0 0 0 2px rgba(16, 94, 140, 0.1);
}

.search-input::placeholder {
    color: #9CA3AF;
}

/* 选项列表样式 */
.options-list {
    flex: 1;
    overflow-y: auto;
    max-height: 180px;
}

.option-item {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #F3F4F6;
}

.option-item:last-child {
    border-bottom: none;
}

.option-item:hover {
    background-color: #F3F4F6;
}

.option-item.selected {
    background-color: #105E8C;
    color: #ffffff;
    font-weight: 500;
}

.option-item.selected:hover {
    background-color: #0d4d73;
}

/* 模态框底部 */
.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 80px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel {
    background-color: #F3F4F6;
    color: #374151;
}

.btn-cancel:hover {
    background-color: #E5E7EB;
    color: #1F2937;
}

.btn-confirm {
    background-color: #105E8C;
    color: #ffffff;
}

.btn-confirm:hover {
    background-color: #0d4d73;
    transform: translateY(-1px);
}

/* 响应式优化 */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px;
        gap: 20px;
    }
    
    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* 移动端下拉菜单优化 */
    .select-dropdown {
        max-height: 200px;
        min-width: 250px;
    }
}

@media screen and (max-width: 480px) {
    .modal-content {
        width: 98%;
        border-radius: 6px;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-body {
        padding: 16px;
        gap: 16px;
    }
    
    .modal-footer {
        padding: 12px 16px;
    }
    
    .select-display {
        padding: 10px 12px;
        font-size: 15px;
        min-height: 44px;
    }
    
    .option-item {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .search-input {
        padding: 8px 10px;
        font-size: 15px;
    }
    
    /* 小屏幕下拉菜单优化 */
    .select-dropdown {
        max-height: 180px;
        min-width: 200px;
    }
}

/* 滚动条美化 */
.options-list::-webkit-scrollbar {
    width: 6px;
}

.options-list::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.options-list::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.options-list::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* 防止页面滚动 */
body.modal-open {
    overflow: hidden;
}

/* 关闭图标样式（如果没有图标字体，使用×符号） */
.modal-close::before {
    content: "×";
    font-size: 24px;
    line-height: 1;
} 

.modal-header::before {
    content: "";
    display: none;
}

.modal-header::after {
    content: "";
    display: none;
}