/* 联级国家选择器样式 */
.country-selector-container {
    position: relative;
    margin-top: 10px;
}

.country-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.country-search-input:focus {
    outline: none;
    border-color: #fe5b00;
    box-shadow: 0 0 0 3px rgba(254, 91, 0, 0.1);
}

.country-search-input::placeholder {
    color: #9ca3af;
    font-size: 14px;
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.country-option:hover {
    background-color: #f9fafb;
}

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

.country-option.no-result {
    color: #9ca3af;
    cursor: default;
    font-style: italic;
}

.country-option.no-result:hover {
    background-color: transparent;
}

/* 自定义滚动条 */
.country-dropdown::-webkit-scrollbar {
    width: 6px;
}

.country-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.country-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.country-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .country-search-input {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .country-dropdown {
        max-height: 150px;
    }
    
    .country-option {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* 加载状态 */
.country-selector-container.loading .country-search-input {
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 11-6.219-8.56"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 选中状态 */
.country-option.selected {
    background-color: #fe5b00;
    color: white;
}

.country-option.selected:hover {
    background-color: #e54f00;
}

/* 高亮搜索结果 */
.country-option .highlight {
    background-color: #fef3cd;
    font-weight: 600;
}