﻿/* List toolbar only. Existing category drawer, tab navigation and pagers stay independent. */
.bd-ault-page .bd-ault {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px 10px;
    padding: 2px 0;
}

.bd-ault-page .bd-ault-page__bar {
    margin-bottom: 10px;
}

.bd-ault-page .bd-list-controls.bd-ault-follow-controls {
    display: block;
    max-width: 100%;
    min-width: 0;
}

.bd-ault-page .bd-ault [hidden] {
    display: none !important;
}

.bd-ault-page .bd-ault__filters,
.bd-ault-page .bd-ault__toggle {
    display: none;
}

.bd-ault-page .bd-ault select,
.bd-ault-page .bd-ault input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #dce1e5;
    border-radius: 4px;
    background: #fff;
    color: #20272c;
    font: inherit;
    font-size: 14px;
}

.bd-ault-page .bd-ault__sort {
    flex: 0 1 195px;
    min-width: 0;
}

.bd-ault-page .bd-ault__search {
    flex: 0 1 245px;
    min-width: 0;
}

    .bd-ault-page .bd-ault__search form {
        display: flex;
        width: 100%;
        margin: 0;
    }

    .bd-ault-page .bd-ault__search input[type="search"] {
        flex: 1 1 auto;
        min-width: 0;
        border-radius: 4px 0 0 4px;
    }

    .bd-ault-page .bd-ault__search button {
        display: grid;
        place-items: center;
        flex: 0 0 42px;
        padding: 0;
        border: 1px solid #dce1e5;
        border-left: 0;
        border-radius: 0 4px 4px 0;
        color: #28333a;
        background: #f7f8f9;
    }

.bd-ault-page .bd-ault__active {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 100%;
    min-width: 0;
}

.bd-ault-page .bd-ault__chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f2f4f5;
    color: #273138;
    font-size: 13px;
}

    .bd-ault-page .bd-ault__chip span {
        overflow-wrap: anywhere;
    }

.bd-ault-page .bd-ault .bd-icon {
    flex: none;
}

@media (max-width: 991px) {
    .bd-ault-page .bd-ault {
        justify-content: flex-start;
        gap: 4px 7px;
        padding: 0;
        border-block: 1px solid #e5e8ea;
    }

    .bd-ault-page .bd-ault__sort {
        flex: 0 0 min(42%, 182px);
    }

    .bd-ault-page .bd-ault select {
        height: 44px;
        padding-inline: 4px;
        border: 0;
        background: transparent;
    }

    .bd-ault-page .bd-ault--ready .bd-ault__filters,
    .bd-ault-page .bd-ault--ready .bd-ault__toggle {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        min-height: 44px;
        padding: 0 5px;
        border: 0;
        border-radius: 4px;
        color: #273138;
        background: transparent;
        white-space: nowrap;
        font: inherit;
        font-size: 14px;
    }

    .bd-ault-page .bd-ault__toggle {
        flex: 0 0 44px;
        margin-inline-start: auto;
    }

        .bd-ault-page .bd-ault__toggle[aria-expanded="true"] {
            background: #f2f4f5;
        }

    .bd-ault-page .bd-ault__filters [data-ault-count] {
        color: #285668;
        font-size: 12px;
    }

    .bd-ault-page .bd-ault__search {
        flex: 1 1 100%;
        padding-bottom: 5px;
    }

    .bd-ault-page .bd-ault--ready:not(.bd-ault--search-open) .bd-ault__search {
        display: none;
    }

    .bd-ault-page .bd-ault__search input[type="search"] {
        height: 44px;
        font-size: 16px;
    }

    .bd-ault-page .bd-ault__search button {
        flex-basis: 44px;
    }

    .bd-ault-page .bd-ault__active {
        justify-content: flex-start;
        padding-bottom: 5px;
    }

    .bd-ault-page .bd-ault__chip {
        min-height: 44px;
    }

    .bd-ault-page .bd-ault-follow-bar {
        padding-bottom: 0;
        border-bottom: 0;
        margin-bottom: 10px;
    }

    .bd-ault-page--filter-ready [data-bd-category-filter] .bd-filter-mobile-button {
        display: none !important;
    }
}

/* Search facets load alongside the results with the existing count endpoint. */
.bd-search-auto-page #searchFilterPanel [hidden] {
    display: none !important;
}

.bd-search-auto-page #searchFilterResults:not([hidden]) {
    display: block;
}

.bd-search-auto-page .bd-search-filter-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.bd-search-auto-page .bd-search-filter-shimmer {
    display: grid;
    gap: 12px;
    padding: 12px 0;
    min-height: 212px;
    align-content: start;
}

    .bd-search-auto-page .bd-search-filter-shimmer span {
        height: 16px;
        width: 90%;
        border-radius: 4px;
        background: linear-gradient(90deg, #eef1f3 20%, #f8f9fa 45%, #eef1f3 70%);
        background-size: 220% 100%;
        animation: bd-search-facet-shimmer 1.5s linear infinite;
    }

        .bd-search-auto-page .bd-search-filter-shimmer span:nth-child(2n) {
            width: 74%;
        }

@keyframes bd-search-facet-shimmer {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -100% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bd-search-auto-page .bd-search-filter-shimmer span {
        animation: none;
    }
}

.bd-search-auto-page .bd-search-more-categories {
    display: none;
}

.bd-search-auto-page .bd-search-filter-error {
    padding: 8px 0;
}

    .bd-search-auto-page .bd-search-filter-error button,
    .bd-search-auto-page .bd-search-more-categories {
        border: 0;
        background: transparent;
        color: #076182;
        min-height: 44px;
        padding: 0 4px;
        text-align: left;
        text-decoration: underline;
    }

/* The follow tabs stay left; both desktop fields share a sized right column. */
@media (min-width: 992px) {
    .bd-ault-page .bd-ault-follow-bar {
        display: flex;
        align-items: flex-end;
    }

        .bd-ault-page .bd-ault-follow-bar .bd-list-toolbar-left {
            flex: 1 1 0;
            min-width: 0;
        }

    .bd-ault-page .bd-list-controls.bd-ault-follow-controls {
        flex: 0 1 450px;
        width: 450px;
        min-width: 0;
    }

    .bd-ault-page .bd-ault-follow-controls .bd-ault {
        display: grid;
        grid-template-columns: minmax(0, 195px) minmax(0, 245px);
        column-gap: 10px;
    }

    .bd-ault-page .bd-ault-follow-controls .bd-ault__active {
        grid-column: 1 / -1;
    }
}

/* Restyle the legacy NewAds category markup without changing its links. */
.bd-newads-page .bd-newads-category-panel {
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #e5e8ea;
    border-radius: 6px;
    background: #fff;
}

.bd-newads-page .bd-newads-category-title {
    color: #202d37;
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.bd-newads-page #bdNewAdsCategoryList .row {
    margin-inline: 0;
}

.bd-newads-page #bdNewAdsCategoryList [class*="col-"] {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
}

.bd-newads-page #bdNewAdsCategoryList :is(.sidebar, .sidebar-card, .categories-wrapper, .card--category, #auctionCategories) {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.bd-newads-page #bdNewAdsCategoryList ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.bd-newads-page #bdNewAdsCategoryList :is(.topCategory, .CategoryTop) {
    height: auto;
    margin: 2px 0 5px;
    padding: 0 8px;
    color: #526675;
    font-size: 12px;
    font-weight: 600;
}

.bd-newads-page #bdNewAdsCategoryList .subCategory {
    display: block;
    float: none;
    width: 100%;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

    .bd-newads-page #bdNewAdsCategoryList a,
    .bd-newads-page #bdNewAdsCategoryList .subCategory.activelink-sub:not(:has(a)) {
        display: flex;
        align-items: center;
        padding: 8px;
        min-height: 36px;
        border: 0;
        border-radius: 4px;
        line-height: 1.35;
        font-size: 14px;
        color: #3e4448;
        text-decoration: none;
        overflow-wrap: anywhere;
    }

        .bd-newads-page #bdNewAdsCategoryList a:hover {
            background: #f3f9fc;
        }

        .bd-newads-page #bdNewAdsCategoryList a:focus-visible {
            outline: 2px solid #1a8cc3;
            outline-offset: -2px;
        }

        .bd-newads-page #bdNewAdsCategoryList .subCategory.activelink-sub,
        .bd-newads-page #bdNewAdsCategoryList a[aria-current="true"],
        .bd-newads-page #bdNewAdsCategoryList a[aria-current="page"] {
            border: 0;
            border-radius: 4px;
            background: #e9eef0;
            color: #202d37;
            font-weight: 700;
        }

            .bd-newads-page #bdNewAdsCategoryList .subCategory.activelink-sub a {
                color: inherit;
                font-weight: inherit;
                background: transparent;
            }

@media (max-width: 991px) {
    .bd-search-auto-page .search-filter-card {
        margin: 0 0 10px;
        padding: 0;
    }

    .bd-search-auto-page #searchFilterResults {
        margin: 0;
        padding: 0;
    }

    .bd-search-auto-page :is(#searchOfferLinks, #searchCategoryLinks) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 8px;
    }

    .bd-search-auto-page .search-filter-option {
        min-height: 44px;
        width: 100%;
        overflow-wrap: anywhere;
        padding: 4px;
        margin: 0;
    }

    .bd-search-auto-page #searchCategoryLinks:not(.bd-search-categories-expanded) [data-compact-extra] {
        display: none;
    }

    .bd-search-auto-page .bd-search-more-categories:not([hidden]) {
        display: inline-block;
    }

    .bd-search-auto-page .search-filter-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

        .bd-search-auto-page .search-filter-actions button {
            flex: 1 1 120px;
            width: auto;
            margin: 0 !important;
            min-height: 44px;
            white-space: normal;
        }

    .bd-search-auto-page .bd-search-filter-shimmer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 230px;
        align-content: center;
    }

    .bd-newads-categories-ready .bd-newads-category-column:not(.bd-newads-categories-open) {
        display: none;
    }

    .bd-newads-page .bd-newads-category-column {
        margin-bottom: 10px;
    }

    .bd-newads-page #bdNewAdsCategoryList a,
    .bd-newads-page #bdNewAdsCategoryList .subCategory.activelink-sub:not(:has(a)) {
        min-height: 44px;
        padding-block: 9px;
    }
}

@media (max-width: 991px) {
    .bd-shop-offer-toolbar {
        margin-top: 12px;
    }

    .bd-ault-page--filter-ready #sellerOfferFilters .bd-filter-mobile-button {
        display: none !important;
    }
}
