/* AddSearch styling */

#addsearch-autocomplete-offcanvas {
    width: 75%;
    max-width: 1000px;

    @media(max-width: 992px) {
        width: 100%;
    }
}

#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: 2;

                &.list {
                    display: none;
                }
            }

            .adds-category.author {
                display:none;
            }

            .adds-category.pubdate,
            .adds-category.author {
                font-family: var(--font-body) !important;
                font-size: .9rem;
                letter-spacing: 0;
                --bs-text-opacity: 1;
                color: rgba(0,0,0,.5) !important;
            }

            .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 {
                margin-bottom: 0;

                a {
                    color: rgb(51,51,51);
                    font-size: 1.65rem;
                    font-family: var(--font-heading);
                    line-height: 1.2;
                }
            }

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

                > p {
                    margin-bottom: 0;
                    color: var(--color-gray);
                }
            }

            .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: var(--color-red) !important;
    color: #fff;

    &:hover {
        background: darkred !important;
    }
}

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

/* Hide unwanted facets */
#facets-container-content-type {
    li[data-facet] { display: none; }

    li[data-facet="Post"],
    li[data-facet="Partner Content"],
    li[data-facet="Webinars"],
    li[data-facet="White Papers"] { display: block; }
}

/* 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: var(--color-red) !important;
                border: 0 none;
            }

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