/* =========================================================================
   Search autocomplete dropdown
   Positioned under the .site-search form in the header.
   ========================================================================= */

.site-search {
    position: relative;
}

.site-search__suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: var(--z-overlay);
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
    background: var(--color-bg);
    border: var(--border-thin);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Option rows */
.site-search__suggestions li[role="option"] {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    color: var(--color-text);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
}

/* Hairline divider between rows */
.site-search__suggestions li[role="option"] + li[role="option"] {
    border-top: 1px solid var(--color-border);
}

/* Active (keyboard) and hover states */
.site-search__suggestions li[role="option"].is-active,
.site-search__suggestions li[role="option"]:hover {
    background: var(--color-accent-soft);
}

/* Logo thumbnail */
.site-search__logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

/* Label text */
.site-search__label {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    line-height: var(--leading-snug);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* On mobile the search sits full-width in the collapsed nav,
   so the dropdown needs a minimum width to be usable. */
@media (max-width: 768px) {
    .site-search__suggestions {
        min-width: 100%;
    }
}
