/**
 * Search Retrieval Demo Styles - Simplified Single View
 * 内容检索增强简化演示UI样式
 */

.search-retrieval-demo {
    background: var(--yali-card-bg, #ffffff);
    border-radius: var(--yali-radius-lg, 12px);
    box-shadow: var(--yali-shadow-lg, 0 8px 30px rgba(0,0,0,0.08));
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Source Tabs */
.source-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.source-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #64748b;
    background: white;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.source-tab:hover {
    border-color: var(--yali-primary, #3b82f6);
    color: var(--yali-primary, #3b82f6);
}

.source-tab.active {
    background: var(--yali-primary, #3b82f6);
    color: white;
    border-color: var(--yali-primary, #3b82f6);
}

.source-divider {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Flow Demo */
.flow-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem;
    flex-wrap: wrap;
}

.flow-node {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.flow-node.highlight {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.flow-node.success {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}

.node-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.flow-node.highlight .node-badge {
    background: var(--yali-primary, #3b82f6);
    color: white;
}

.flow-node.success .node-badge {
    background: #22c55e;
    color: white;
}

.node-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.node-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.node-meta {
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    gap: 0.375rem;
}

.node-meta .tag {
    padding: 0.125rem 0.375rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--yali-primary, #3b82f6);
    border-radius: 4px;
}

.flow-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #cbd5e1;
}

.trigger-label {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Material Preview */
.material-preview {
    margin: 0 1.25rem 1rem;
    padding: 0.875rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
    font-size: 0.8rem;
    color: #64748b;
}

.preview-header .count {
    padding: 0.125rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--yali-primary, #3b82f6);
    border-radius: 4px;
    font-size: 0.75rem;
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.item-dot.web {
    background: #3b82f6;
}

.item-dot.local {
    background: #f97316;
}

.item-text {
    flex: 1;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-cite {
    font-size: 0.7rem;
    color: #22c55e;
    font-weight: 500;
}

/* Footer */
.demo-footer {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

/* Responsive */
@media (max-width: 640px) {
    .flow-demo {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .flow-connector {
        transform: rotate(90deg);
    }
    
    .trigger-label {
        display: none;
    }
}