/* Search Dropdown Styles - Clean & Minimal Design */
.search-box {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    max-height: 480px;
    overflow: hidden;
    z-index: 1000;
    display: none;
    animation: fadeIn 0.15s ease;
    border: 1px solid #e8e8e8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-dropdown-content {
    max-height: 480px;
    overflow-y: auto;
}

.search-dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown-content::-webkit-scrollbar-track {
    background: transparent;
}

.search-dropdown-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.search-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.search-dropdown-header {
    padding: 12px 16px;
    font-size: 12px;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
}

.search-dropdown-header strong {
    color: #111827;
    font-weight: 600;
}

.search-dropdown-header-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9ca3af;
}

.search-no-results {
    padding: 48px 24px;
    text-align: center;
}

.search-no-results i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.2;
    display: block;
    color: #9ca3af;
}

.search-no-results p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.search-no-results p:first-of-type {
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.search-category-group {
    border-bottom: 1px solid #f3f4f6;
}

.search-category-group:last-child {
    border-bottom: none;
}

.search-category-header {
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fafafa;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #111827;
    text-decoration: none;
    transition: background-color 0.1s ease;
    cursor: pointer;
    border-left: 2px solid transparent;
}

.search-result-item:hover {
    background-color: #f9fafb;
    border-left-color: #28a745;
}

.search-result-item.selected {
    background-color: #f3f4f6;
    border-left-color: #28a745;
}

.search-result-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    color: #6b7280;
    font-size: 14px;
}

.search-result-item:hover .search-result-icon {
    background: #e5e7eb;
    color: #28a745;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
    line-height: 1.4;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-title mark {
    background: #fef3c7;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
    color: #92400e;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.search-result-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.search-result-url {
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.search-dropdown-footer {
    padding: 8px 16px;
    text-align: center;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.search-dropdown-footer-text {
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
}

/* Loading state */
.search-loading {
    padding: 40px 24px;
    text-align: center;
}

.search-loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #28a745;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-loading p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-dropdown {
        max-height: 400px;
        border-radius: 6px;
    }
    
    .search-dropdown-content {
        max-height: 400px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .search-result-title {
        font-size: 13px;
    }
    
    .search-category-header {
        padding: 8px 12px 4px;
    }
    
    .search-dropdown-header {
        padding: 10px 12px;
    }
    
    .search-dropdown-header-hint {
        display: none;
    }
}

