/* Header Search Bar */
.header-search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 var(--spacing-md);
    position: relative;
    z-index: 1000;
}

.header-search-form {
    display: flex;
    align-items: center;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 99px;
    /* Rounded pill shape */
    padding: 0.25rem 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.header-search-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(47, 82, 51, 0.1);
}

.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: var(--color-text-primary);
    outline: none;
    min-width: 0;
}

.header-search-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    flex-shrink: 0;
}

.header-search-btn:hover {
    background-color: var(--color-primary-light);
}

.header-search-btn svg {
    width: 16px;
    height: 16px;
}

/* Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    /* Wider professional card */
    max-width: 90vw;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-height: 500px;
    overflow-y: auto;
    display: none;
    /* Controlled by JS */
    z-index: 1100;
}

.search-suggestions:not([hidden]) {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all 0.2s;
    border-bottom: 1px solid var(--color-border);
}

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

.suggestion-item:hover,
.suggestion-item:focus {
    background-color: #f8f9fa;
    padding-left: 1.75rem;
    /* Subtle slide effect */
}

.suggestion-icon,
.suggestion-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

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

.suggestion-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.suggestion-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Optional: Add a subtle badge style for the category in subtitle if we wrap it in a span */
.suggestion-category-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-search-container {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0.5rem 0;
    }

    .search-suggestions {
        position: absolute;
        width: calc(100% - 2rem);
        /* Full width minus margin */
        left: 50%;
        transform: translateX(-50%);
        max-width: none;
    }
}