/**
 * Search Results Styling
 */

.search-results {
    position: fixed;
    background: var(--bg-primary, #ffffff);
    border: 2px solid var(--primary, #6366f1);
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    margin-top: 0;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .search-results {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--primary-light, #818cf8);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(129, 140, 248, 0.2);
}

.search-results.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-3, 0.75rem);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary, #0f172a);
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    background: var(--bg-primary, #ffffff);
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-result-icon {
    font-size: 1.25em;
    line-height: 1;
    flex-shrink: 0;
    width: 1.5em;
    text-align: center;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

[data-theme="dark"] .search-result-item {
    color: var(--text-dark, #f1f5f9);
    border-bottom-color: var(--border, #334155);
    background: var(--bg-secondary, #1e293b);
}

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

.search-result-item:hover,
.search-result-item.selected {
    background: var(--primary-50, #eef2ff);
    color: var(--primary-dark, #4f46e5);
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary, #6366f1);
    transform: translateX(2px);
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.selected {
    background: var(--bg-tertiary, #334155);
    color: var(--primary-light, #818cf8);
    border-left-color: var(--primary-light, #818cf8);
}

.search-result-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 0.375rem;
    font-weight: 600;
    display: block;
}

[data-theme="dark"] .search-result-category {
    color: var(--text-muted, #64748b);
}

.search-result-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    line-height: 1.4;
    display: block;
}

[data-theme="dark"] .search-result-name {
    color: var(--text-dark, #f1f5f9);
}

.search-result-item:hover .search-result-name,
.search-result-item.selected .search-result-name {
    color: var(--primary-dark, #4f46e5);
}

[data-theme="dark"] .search-result-item:hover .search-result-name,
[data-theme="dark"] .search-result-item.selected .search-result-name {
    color: var(--primary-light, #818cf8);
}

.search-result-name mark {
    background: var(--warning-light, #fef3c7);
    color: var(--warning, #f59e0b);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .search-result-name mark {
    background: var(--warning, #f59e0b);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.4);
}

.search-result-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary, #64748b);
    font-size: var(--text-sm, 0.875rem);
}

[data-theme="dark"] .search-result-empty {
    color: var(--text-muted, #94a3b8);
}

/* Scrollbar for results */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--bg-secondary, #f1f5f9);
    border-radius: 0 0.75rem 0.75rem 0;
}

[data-theme="dark"] .search-results::-webkit-scrollbar-track {
    background: var(--bg-tertiary, #334155);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--border-dark, #cbd5e1);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

[data-theme="dark"] .search-results::-webkit-scrollbar-thumb {
    background: var(--border, #475569);
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--primary, #6366f1);
}

[data-theme="dark"] .search-results::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light, #818cf8);
}

