.search-highlight {
    color: #1d4ed8;
    background-color: #eff6ff;
    border-color: #3b82f6;
}

.autocomplete-wrapper {
    position: relative;
    min-width: 0;
}

.autocomplete-wrapper .dropdown-menu {
    width: 100%;
    margin-top: 0;
    top: 100%;
    left: 0;
}

#autocomplete-list .dropdown-item {
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

#autocomplete-list .dropdown-item:hover,
#autocomplete-list .dropdown-item:focus,
#autocomplete-list .dropdown-item.active {
    background-color: var(--bs-primary-bg-subtle, #dbeafe);
    color: var(--bs-primary-text-emphasis, #0a58ca);
}

.search-toolbar-sticky {
    position: sticky;
    top: var(--search-toolbar-top-offset, 72px);
    z-index: 1015;
}

.search-toolbar-surface {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: .75rem;
    box-shadow: 0 .25rem .75rem rgba(15, 23, 42, .05);
}

.search-page {
    --search-control-height: calc(1.5em + .75rem + 2px);
}

#search-input,
#search-submit-button,
.search-toolbar-icon-btn,
#toggle-desktop-filters {
    height: var(--search-control-height);
}

#search-submit-button,
.search-toolbar-icon-btn {
    width: var(--search-control-height);
    min-width: var(--search-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.search-filter-dropdown {
    width: min(420px, calc(100vw - 2rem));
    max-height: 360px;
    overflow-y: auto;
}

.search-toolbar-icon-btn {
    flex: 0 0 auto;
}

.search-facet-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .2rem 0;
}

.search-facet-option .form-check {
    margin-bottom: 0;
}

.search-facet-count {
    color: #6c757d;
    font-size: .875rem;
    white-space: nowrap;
}

.search-facet-list-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: .25rem;
}

#toggle-desktop-filters.active {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

#quick-status-toggle .btn.active {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

#quick-missing-primary-penalty-toggle.active {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.search-results-count {
    padding-inline-start: .3rem;
}

.search-results-count p {
    margin-bottom: 0;
    font-size: .93rem;
    color: var(--bs-secondary-color, #6c757d);
}

.search-results-count p strong {
    color: var(--bs-body-color, #212529);
}

#active-filters-chips .btn {
    --bs-btn-padding-y: .15rem;
    --bs-btn-padding-x: .55rem;
}

#active-filters-bar {
    min-height: 34px;
}

#desktop-filters-shell:not(.d-none),
#results-count:not(.d-none) {
    margin-top: .5rem;
}

#announcements .announcement-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 991.98px) {
    .search-toolbar-sticky {
        position: static;
    }

    .search-toolbar-surface {
        border: none;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }
}
