/* 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;
        font-size: 1em;

        @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: 0 1em 0 1em;

            .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;
                margin-left: 10px;
            }

            .adds-category.author {
                order: 1;
                font-weight: 500;
            }

            .adds-category.pubdate,
            .adds-category.author {
                font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
                font-size: 14px;
                letter-spacing: 0;
                color: rgb(51,51,51);
            }

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

                &:hover {
                    background-color: #fff;
                }

                .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: 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 {
                order: 2;

                a {
                    color: rgb(51,51,51);
                    font-size: 1.4rem;
                    font-weight: 500;
                    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
                    line-height: 1.1;
                }
            }

            .adds-highlight {
                order: 2;
                font-size: 1rem;
                margin-bottom: .5rem;
                padding-bottom: 0;

                > 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: rgb(240, 65, 50) !important;

    &:hover {
        background: rgb(240, 65, 50) !important;
        color: darkred !important;
    }
}

.adds-filters-group .adds-label {
    margin-bottom: 0;
}

/* pagination */
#pagination-container {

    .addsearch-pagination {
        justify-content: center;

         button {
            font-size: 1.5rem;
            border: 1px solid #000;
            padding: 2px 8px;
            font-weight: normal;

            &[data-active="true"] {
                color: #fff !important;
                background-color: rgb(237, 35, 17) !important;
                border: 0 none;
            }

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

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

a.addsearch-link {
    color: #fff;
    font-size:12px;
    margin-right:10px;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;

    &:hover {
        color: #d9d9d9;
    }
}

/* hide page title if on search results page */
header:has(+ section.entry-content #searchfield-container) {
    display: none;
}