/* Autocomplete */
/* minimal overrides for www form css */
.aa-Form .aa-SubmitButton,
.aa-Form .aa-ClearButton,
.aa-Label {
    padding: 5px;
    margin: 0;
}
.aa-Input {
    text-align: left;
}
/* Position loading indicator over the search icon */
.aa-InputWrapperPrefix {
    position: relative;
}
.aa-LoadingIndicator:not([hidden]) {
    position: absolute;
    left: 0;
    top: 0;
}
/* Hide search icon while loading */
.aa-InputWrapperPrefix:has(.aa-LoadingIndicator:not([hidden])) .aa-Label {
    visibility: hidden;
}
/* Autocomplete result icons */
.aa-ItemLink i {
    text-decoration: none;
    margin-right: 5px;
    display: inline-block;
    color: #477a98;
}
.aa-ItemLink:hover {
    text-decoration: none;
}
.aa-Item[aria-selected="true"] {
    background-color: #edf4f8;
}
.aa-Panel {
    z-index: 9999 !important;
}
.header-search {
    width: 100%;
}
.header-search .aa-Form {
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: none;
}
.header-search .aa-Input {
    font-size: 13px;
    height: 35px !important;
}
.header-search .aa-Form:focus-within {
    border-color: #777;
}
.search-autocomplete-heading {
    padding: 6px 12px;
    background: #edf2f5;
    border-bottom: 1px solid #ddd;
    /* border-left: 3px solid #477a98; */
    color: #345c75;
    font-size: 13px;
    font-weight: bold;
}
.aa-sponsor-name {
    display: block;
    font-size: 0.8em;
    color: #777;
    padding-left: 1.5em;
    line-height: 1.3;
}
.aa-sponsor-emphasis {
    color: #505050;
    font-weight: 600;
}
.aa-sponsor-name:empty {
    display: none;
}
.aa-duration,
.aa-document-type {
    white-space: nowrap;
}
.aa-duration::before,
.aa-document-type::before {
    content: " · ";
}
.autocomplete-view-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #ddd;
    background: #f5f7f8;
    text-align: left;
    color: #0068aa;
    font-weight: bold;
}
.autocomplete-view-all:hover {
    background: #eaf0f3;
}
.aa-PanelLayout {
    max-height: 60vh;
    overflow-y: auto;
}
/* Full search results */
/* works with algolia autocomplete css */
.search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    font-size: 1em;
}
.search-result-logo {
    width: 90px;
    min-width: 90px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.search-result-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease-in;
}
.search-result-logo:has(img.loaded) {
    background-color: transparent;
}
.search-result-logo img.loaded {
    opacity: 1;
}
.search-result-content {
    flex: 1;
    min-width: 0;
}
.search-result-content p {
    margin: 5px 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-result-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #1769aa;
    text-decoration: none;
}
.search-result-title:hover {
    text-decoration: underline;
}
.result-type-text {
    font-size: 12px;
    font-weight: normal;
    color: #888;
    margin-left: 4px;
}
.search-result-details {
    margin-top: 6px;
    color: #777;
    font-size: 14px;
}
.search-result-separator {
    margin: 0 8px;
    color: #aaa;
}
.document-placeholder {
    font-size: 40px;
    color: #999;
    text-align: center;
}
/* Remove this temp hack after replacing old search with new */
h5.search-result > a > strong {
    font-size: 18px;
    font-weight: 700;
}
.search-summary {
    margin: 25px 0 30px;
}
.search-summary p {
    margin: 20px 0;
    color: #555;
}
.search-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    align-items: center;
}
.search-categories a,
.search-categories .search-category-disabled {
    display: inline-block;
    padding: 7px 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    color: #1765a5;
    text-decoration: none;
}
.search-category-disabled {
    opacity: 0.5;
}
.search-jump-label {
    margin-left: 10px;
}
.search-categories a:hover {
    background: #eaf2f9;
    border-color: #b8d1e5;
}
.search-count {
    margin-left: 6px;
    color: #666;
    font-weight: bold;
}
.search-result-heading {
    display: flex;
    font-size: 20px;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}
.search-result-heading-next {
    margin-top: 40px !important; /* Override #olc-content h3 */
}
.search-heading-count {
    color: #888;
    font-size: 14px;
    font-weight: normal;
}
.search-show-more {
    display: block;
    margin: 15px auto 25px;
    padding: 8px 20px;
    background: #f5f6f7;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #1765a5;
    cursor: pointer;
}
.search-show-more:hover {
    background: #eaf2f9;
}
@media only screen and (max-width: 767px) {
    nav.search-categories {
        display: none;
    }
    .search-result-heading,
    .search-heading-count {
        display: block;
    }
    .aa-PanelLayout {
    max-height: 70vh;
    }
}