/* Live Search Styles */
#searchResults,
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg, white);
    border: 1px solid var(--border-color, #dee2e6);
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 6px var(--shadow, rgba(0, 0, 0, 0.1));
    max-height: 500px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    margin-top: 2px;
}

.search-result-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #f0f0f0);
    text-decoration: none;
    color: var(--text-color, #333);
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: var(--hover-bg, #f8f9fa);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-color, #2c3e50);
}

.search-result-category {
    font-size: 12px;
    color: var(--text-secondary, #6c757d);
    margin-bottom: 4px;
}

.search-result-summary {
    font-size: 13px;
    color: var(--text-secondary, #666);
    line-height: 1.4;
}

.search-result-footer {
    padding: 8px;
    background-color: var(--hover-bg, #f8f9fa);
    border-top: 1px solid var(--border-color, #dee2e6);
}

.search-result-item mark {
    background-color: #fef3c7;
    color: #92400e;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
}

/* Dark theme highlight */
[data-theme="dark"] .search-result-item mark {
    background-color: #854d0e;
    color: #fef3c7;
}

/* Search input container */
.search-container {
    position: relative;
}

/* Loading spinner in search */
.search-result-item .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    #searchResults {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        max-height: calc(100vh - 80px);
    }
}

