
/* 搜索下拉框核心组件容器 */
.search-select {
    position: relative;
    width: 100%;
}

/* 输入框外层包装器 */
.select-input-wrapper {
}

/* 输入区域内部布局 */
.input-field {
    display: flex;
    align-items: center;
}

/* 搜索图标样式 */
.search-icon {
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
}

.search-icon svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 搜索输入框 */
#searchInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    padding-left: 20px;
    padding-right: 20px;
    min-width: 0;
}

/* 下拉箭头按钮 */
.dropdown-arrow {
    cursor: pointer;
    color: #94a3b8;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.dropdown-arrow:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

/* 箭头打开状态：旋转180度 */
.dropdown-arrow.open {
    transform: rotate(180deg);
    color: #3b82f6;
}

/* 下拉列表面板 */
.dropdown-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 5px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    border: 1px rgba(204, 204, 204, 0.8) solid;
    scroll-behavior: smooth;
}

/* 下拉列表显示时的动画效果 */
.dropdown-list.show {
    display: block;
    animation: fadeInUp 0.2s ease-out;
}
.hide{
    display: none !important;
}

/* 淡入上升动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
    margin: 8px 0;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

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

/* 下拉选项样式 */
.option-item {
    padding: 5px;
    cursor: pointer;
    transition: background 0.15s;
    color: #000000;
    border-bottom: 1px solid #f0f2f5;
    display: block;
    line-height: 1.5;
    word-break: break-word;
}

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

/* 选项悬停效果 */
.option-item:hover {
    background: #f8fafc;
}

/* 当前高亮（键盘导航或选中）的选项样式 */
.option-item.selected {
    background:rgba(143,0,114,0.05);
    color: rgba(143,0,114,1);
    position: relative;
}

/* 高亮选项前的对勾图标 */
.option-item.selected::before {
    color: rgba(143,0,114,1);
}

/* 关键词高亮样式 */
.highlight {
    background-color:transparent;
    display: inline;
    letter-spacing: inherit;
    word-spacing: inherit;
}

/* 无搜索结果提示 */
.no-result {
    padding: 1.2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
}

/* 当前选中值的展示区域 */
.selected-value-area {
    margin-top: 1rem;
    background: #f1f5f9;
    border-radius: 1rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 选中标签的标题 */
.selected-label {
    font-weight: 600;
    color: #334155;
}

/* 选中的值标签 */
.selected-tag {
    background: white;
    border-radius: 2rem;
    padding: 0.3rem 0.9rem;
    color: #0f172a;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    max-width: 100%;
    word-break: break-all;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
}

/* 清空按钮 */
.clear-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: #e2e8f0;
    color: #dc2626;
}

/* 辅助信息徽章 */
.info-badge {
    font-size: 0.7rem;
    text-align: right;
    margin-top: 0.5rem;
    color: #6c7a91;
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    padding-left: 0.2rem;
}

.info-badge span {
    background: #eef2ff;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}

/* ========== 响应式布局：移动端适配 ========== */
@media (max-width: 520px) {
    .demo-container {
        padding: 1.5rem;
    }
    
    .option-item {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .input-field {
        padding: 0;
    }
    
    .selected-value-area {
        padding: 0.7rem 1rem;
    }
}