/* Search Dropdown Styles */

.search-container {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px -8px rgba(30, 58, 138, 0.25);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    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: 1rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #f8fafc;
}

.search-result-item:last-of-type {
    border-bottom: none;
}

.search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.search-result-title mark {
    background: #fef08a;
    color: #854d0e;
    padding: 0 0.2rem;
    border-radius: 0.25rem;
    font-weight: 700;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
}

.search-result-category {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.15rem 0.5rem;
    border-radius: 0.35rem;
    font-weight: 600;
    text-transform: capitalize;
}

.search-result-date {
    color: #94a3b8;
}

.search-no-results {
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}

.search-see-all {
    padding: 0.75rem 1rem;
    text-align: center;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.85rem;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

/* Dark mode */
.dark-mode .search-dropdown {
    background: #1e293b;
    border-color: #334155;
}

.dark-mode .search-result-item {
    border-bottom-color: #334155;
}

.dark-mode .search-result-item:hover,
.dark-mode .search-result-item.selected {
    background: #334155;
}

.dark-mode .search-result-title {
    color: #f1f5f9;
}

.dark-mode .search-result-title mark {
    background: #fbbf24;
    color: #78350f;
}

.dark-mode .search-result-category {
    background: #3b82f6;
    color: #eff6ff;
}

.dark-mode .search-result-date {
    color: #94a3b8;
}

.dark-mode .search-no-results {
    color: #94a3b8;
}

.dark-mode .search-see-all {
    background: #334155;
    border-top-color: #475569;
    color: #60a5fa;
}

/* Responsive */
@media (max-width: 768px) {
    .search-dropdown {
        left: -1rem;
        right: -1rem;
        border-radius: 0;
        max-height: 400px;
    }
    
    .search-result-item img {
        width: 50px;
        height: 50px;
    }
}
