/* 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;
    }

    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: 0 1em 0 1em;

            .adds-category-wrapper {

                order: 3;

                &.list {
                    display: none;
                }
            }

            .adds-category.pubdate {
                order: 2;
            }

            .adds-category.author {
                order: 1;
                margin-right: 40px;

                &:before {
                    content: "By: ";
                }
            }

            .adds-category.pubdate,
            .adds-category.author {
                font-family: 'Montserrat',sans-serif !important;
                letter-spacing: 0;
                color: #757b85;
                font-size: 16px;
            }

            .adds-hit-wrapper {
                border: 0 none;
                position: relative;

                &:hover {
                    background-color: #fff;
                }

                .adds-hit-bottom {

                    @media(max-width:767px) {
                        position: relative;
                    }
                }

                @media(max-width:767px) {
                    flex-direction: column !important;
                }
            }

            .adds-hit-top {
                margin-right: 1em !important;
                width: 200px;
                max-width: 200px;
                min-width: 200px;
                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 {
                margin-bottom: 0;
                font-family: 'Montserrat',sans-serif;
                font-weight: 400;
                font-style: normal;
                font-size: 26px;
                line-height: 1.6;

                a {
                    color: #035daa;
                }

                & + .adds-category-wrapper {
                    border-top: 1px solid #e9e9e9;
                    border-bottom: 1px solid #e9e9e9;
                    color: #757b85;
                }
            }

            .adds-highlight {
                order: 2;
                margin-bottom: .5rem;
                padding-bottom: 0;
                font-family: 'Montserrat',sans-serif;
                font-weight: 400;
                font-style: normal;
                line-height: 1.75;
                color: #1d2329;
                font-size: 16px;
                text-shadow: 1px 1px 1px rgba(0,0,0,.004);
                text-rendering: optimizeLegibility !important;
                -webkit-font-smoothing: antialiased !important;

                > p {
                    margin-bottom: 0;
                }
            }

            .adds-main-image {

                img {
                    width: 150px;
                    object-fit: none;
                    height: auto;
                }

                @media(max-width:767px) {
                    img {
                        object-fit: contain;
                        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: #9f34e0 !important;
    color: #fff;

    &:hover {
        background: #035daa !important;
    }
}

.adds-filters-group .adds-label {
    margin-bottom: 0;
}

/* pagination */
#pagination-container {

    .addsearch-pagination {
        justify-content: center;

         button {
             width: 50px;
             height: 50px;
             display: inline-block;
             margin: 0 6px;
             border-radius: 25px !important;
             color: #bababa !important;
             background-color: #f6fafb !important;
             text-align: center;
             line-height: 50px;
             font-size: 23px;
             border: 0 none;
             transition: .5s;

            &:hover {
                background-color: #bababa !important;
                color: #fff !important;
            }

            &[data-active="true"] {
                color: #fff !important;
                background-color: #035daa !important;
                border: 0 none;
            }

            @media(max-width:767px) {
                min-width: 24px;
            }
        }
    }
}

/* hide secondary header on search page */
.orm-secondary-header:has(+ .orm-main #searchfield-container) {
    display: none;
}
