/* 可搜索下拉选择框样式 */

.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.searchable-select-input-wrapper {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    width: 100%;
    padding-right: 40px !important;
    cursor: pointer;
}

.searchable-select-input:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.searchable-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.searchable-select.open .searchable-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.searchable-select.open .searchable-select-dropdown {
    display: block;
}

.searchable-select-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.searchable-select-option:hover {
    background-color: #f0f9ff;
}

.searchable-select-option:active {
    background-color: #dbeafe;
}

.searchable-select-option mark {
    background-color: #fef08a;
    color: inherit;
    font-weight: 600;
    padding: 0 2px;
}

.searchable-select-group-label {
    padding: 8px 15px;
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.searchable-select-group-label:first-child {
    border-top: none;
}

.searchable-select-no-result {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
}

/* 滚动条样式（Webkit浏览器） */
.searchable-select-dropdown::-webkit-scrollbar {
    width: 8px;
}

.searchable-select-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.searchable-select-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.searchable-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .searchable-select-dropdown {
        max-height: 250px;
    }
    
    .searchable-select-option {
        padding: 14px 12px;
        font-size: 1rem;
        /* 增大移动端触摸区域 */
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .searchable-select-group-label {
        padding: 10px 12px;
    }
}

/* 焦点状态 */
.searchable-select.open .searchable-select-input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--primary-color);
}

