/* AddSearch styling */
#global-autocomplete-container .addsearch-autocomplete,
#searchresults-container .addsearch-searchresults {
    padding-top: 10px;
    position: relative;

    .number-of-results {
        font-size: 1.5em;
        margin-bottom: 0;

        @media(max-width:767px) {
            font-size: 1em;
        }
    }

    .addsearch-autocomplete-close {
        display: none;

        @media(max-width:767px) {
            display: block;
        }
    }

    h3.adds-title,
    ul.adds-suggestions-container li {
        color: #000 !important;
    }

    .adds-hits-main-wrapper {
        padding: 0;

        h3.adds-title {
            margin-left: 15px;
        }

        .adds-hit {
            padding: 20px;
            border-top: 1px solid #d3d6db !important;

            &:first-of-type {
                border-top: 0 none !important;
            }

            .adds-category-wrapper {
                order: 2;

                &.list {
                    display: none;
                }

                span:nth-of-type(2)::before {
                    content: "By";
                    font-weight: normal;
                    display: inline-block;
                    margin-left: -5px;
                }
            }

            .adds-category.pubdate {
                order: 2;
                position: absolute;
                top : 0;
            }

            .adds-category.author {
                order: 1;
            }

            .adds-category.pubdate,
            .adds-category.author {
                font-family: "Lora", serif !important;
                font-size: 16px;
                letter-spacing: 0;
                color: #00243e;
            }

            .adds-hit-wrapper {
                border: 0 none;
                padding-top: 0;
                position: relative;

                &:hover {
                    background-color: transparent;
                }

                .adds-hit-bottom {
                    padding-top: 30px;

                    @media(max-width:767px) {
                        position: relative;
                    }
                }

                @media(max-width:767px) {
                    flex-direction: column !important;
                }
            }

            .adds-hit-top {
                margin-right: 20px !important;
                height: 100%;

                @media(max-width:767px) {
                    margin: 0 0 1em !important;
                    width: 100%;
                    max-width: 100%;
                    min-width: 100%;
                    max-height: 300px;
                    height: fit-content;
                }
            }

            .adds-hit-title {
                order: 2;
                margin: 8px 0 0;

                a {
                    color: rgb(90, 165, 177);
                    font-size: 20px;
                    font-weight: 500;
                    font-family: "Istok Web", sans-serif;
                    line-height: 1.1;
                }
            }

            .adds-highlight {
                order: 2;
                font-size: 16px;
                margin-bottom: .5rem;
                padding-bottom: 0;
                color: rgb(29, 35, 41);
                font-family: "Lora", serif;

                > p {
                    margin-bottom: 0;
                }
            }

            .adds-main-image {

                img {
                    width: 150px;
                    object-fit: contain;
                    height: auto;
                }

                @media(max-width:767px) {
                    img {
                        width: 100%;
                        height: 100%;
                    }

                    &:before {
                        display: block;
                        content: "";
                        width: 100%;
                        padding-top: 56.25%;
                    }
                }
            }

        } /* end .adds-hit */

    } /* end .adds-hits-main-wrapper */
} /* end #global-autocomplete-container .addsearch-autocomplete */

@media(max-width: 991px){
    .adds-filters-group .adds-label {
        font-size: 14px;
        display: flex;
        flex-direction: row;
        align-items: center;
        height: auto;
    }
}

.adds-components button:after {
    content: '';
    margin: 0;
}

#global-searchfield-container .addsearch-searchfield button,
#searchfield-container .addsearch-searchfield button {
    background-color: rgb(50, 55, 60) !important;
    border-color: rgb(50, 55, 60) !important;
    color: #fff !important;

    &:hover {
        background-color: rgb(40, 45, 50) !important;
        border-color: rgb(40, 45, 50) !important;
    }
}

.adds-filters-group .adds-label {
    margin-bottom: 0;
    font-size: 14px;
}

.adds-filter-parent-container {
    margin-top: 0;
}

/* pagination */
#pagination-container {

    .addsearch-pagination {
        justify-content: center;

         button {
            font-size: 1.5rem;
            padding: 2px 8px;
            font-weight: normal;
            margin: 0 4px;
            border-color: rgb(50, 55, 60) !important;


            &[data-active="true"] {
                background-color: rgb(50, 55, 60) !important;
                border-color: rgb(50, 55, 60) !important;
                color: #fff !important;
            }

            @media(max-width:767px) {
                min-width: 24px;
            }
        }
    }
}

#addsearch-modal {
    @media(max-width: 767px) {
        .modal-dialog {
            margin: 30px auto;
        }
    }

    .modal-content {
        border-radius: 4px;
    }
}

a.addsearch-link {
    color: #fff;
    font-size:1.75rem !important;
    text-decoration: none;
    text-transform: uppercase;

    &:hover {
        color: #d9d9d9;
    }
}

.mobile-sidebar a.addsearch-link {
    align-self: end;
    margin: 10px 0;
}

/* hide page title if on search results page */
.container.page h1:has(~ .adds-components) {
    display: none;
}