﻿/* Bobbedoes shared filter component. Scoped to avoid existing Bootstrap/Kendo/list styles. */
.bd-filter-root {
    font-family: inherit;
    color: #202d37;
}

    .bd-filter-root *, .bd-filter-root *::before, .bd-filter-root *::after {
        box-sizing: border-box;
    }

.bd-filter-card {
    background: #fff;
    border-radius: 7px;
    padding: 15px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(17,34,51,.035);
}

.bd-filter-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

    .bd-filter-card-header h2 {
        font-size: 16px;
        line-height: 1.4;
        margin: 0;
        font-weight: 600;
    }

.bd-filter-small-heading {
    font-size: 12px;
}

.bd-filter-clear-all, .bd-filter-clear-category {
    border: 0;
    background: none;
    color: #0a7fb7;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
}

    .bd-filter-clear-all:hover, .bd-filter-clear-category:hover {
        text-decoration: underline;
    }

.bd-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bd-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    background: #f5f8fa;
    border: 1px solid #cfdae1;
    border-radius: 5px;
    color: #263844;
    font-size: 12px;
    text-decoration: none;
}

    .bd-filter-chip:hover {
        background: #ebf4f9;
        text-decoration: none;
    }

.bd-filter-chip-x {
    font-size: 17px;
    line-height: 1;
    color: #526675;
}

.bd-filter-category-list {
    min-height: 280px;
    height: auto;
    overflow: visible;
}

.bd-filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 10px;
    padding: 2px 8px;
    border-radius: 5px;
    background: #fff;
    color: #3e4448;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

    .bd-filter-row:hover, .bd-filter-row:focus {
        background: #f3f9fc;
        text-decoration: none;
    }

    .bd-filter-row.is-active {
        /*background: #e9eef0;*/
        color: #000;
        font-weight: 700;
    }

.bd-filter-count {
    display: inline-flex;
    justify-content: center;
    min-width: 26px;
    padding: 3px 7px;
    border-radius: 11px;
    color: #526a79;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bd-filter-row.is-active .bd-filter-count {
   /* background: #d8ebf6;*/
    /*color: #075c8c;*/
}

.bd-filter-placeholder {
    font-size: 13px;
    color: #758694;
    padding: 10px 5px;
}

.bd-filter-skeleton {
    padding: 3px 8px;
}

    .bd-filter-skeleton div {
        height: 12px;
        background: #edf0f2;
        border-radius: 4px;
        margin: 15px 0;
        width: 85%;
    }

        .bd-filter-skeleton div:nth-child(even) {
            width: 66%;
        }

.bd-filter-mobile-button, .bd-filter-mobile-close, .bd-filter-backdrop {
    display: none;
}

.bd-filter-root [hidden] {
    display: none !important;
}

.bd-filter-root a:focus-visible, .bd-filter-root button:focus-visible {
    outline: 2px solid #1a8cc3;
    outline-offset: 2px;
}

@media (max-width:991px) {
    .bd-filter-mobile-button {
        display: flex;
        align-items: center;
        gap: 9px;
        width: 100%;
        min-height: 44px;
        margin: 0 0 12px;
        padding: 10px 14px;
        border: 1px solid #cbd7dd;
        border-radius: 5px;
        color: #1475a4;
        background: #fff;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }

    .bd-filter-icon {
        font-size: 19px;
    }

    .bd-filter-active-count {
        margin-left: 3px;
        padding: 2px 7px;
        border-radius: 12px;
        color: #fff;
        background: #1684b9;
        font-size: 12px;
    }

    .bd-filter-drawer {
        display: none;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(88vw,345px);
        max-width: 345px;
        padding: 17px;
        z-index: 1052;
        overflow-y: auto;
        background: #f8fafb;
        box-shadow: 4px 0 25px rgba(0,0,0,.15);
    }

    .bd-filter-backdrop.bd-is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(16,29,39,.6);
        z-index: 1051;
    }

    .bd-filter-drawer.bd-is-open {
        display: block;
    }

    .bd-filter-mobile-close {
        display: inline-flex;
        margin-bottom: 14px;
        padding: 9px 12px;
        border: 1px solid #cbd7dd;
        border-radius: 5px;
        color: #1475a4;
        background: #fff;
        cursor: pointer;
    }

    .bd-filter-category-list {
        height: auto;
        max-height: 340px;
    }
}

.bd-filter-mobile-header,
.bd-filter-dialog {
    display: none;
}

@media (max-width: 991px) {
    html.bd-filter-page-locked {
        overflow: hidden;
        overscroll-behavior: none;
    }

        html.bd-filter-page-locked body {
            position: fixed;
            top: var(--bd-filter-page-top, 0px);
            left: 0;
            width: 100%;
            overflow: hidden;
        }

    .bd-filter-dialog[open] {
        display: block;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        margin: 0;
        padding: 0;
        border: 0;
        box-sizing: border-box;
        overflow: hidden;
        background: #fff;
        color: #202d37;
    }

    .bd-filter-dialog .bd-filter-drawer.bd-is-open {
        display: flex;
        flex-direction: column;
        position: static;
        width: 100%;
        height: 100%;
        max-width: none;
        padding: 0;
        overflow: hidden;
        background: #fff;
        box-shadow: none;
    }

    .bd-filter-dialog .bd-filter-mobile-header {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        flex: 0 0 auto;
        min-height: 60px;
        padding: env(safe-area-inset-top, 0px) 12px 0;
        border-bottom: 1px solid #e7ebee;
        background: #fff;
    }

    .bd-filter-mobile-title {
        grid-column: 2;
        text-align: center;
        font-size: 18px;
        font-weight: 600;
    }

    .bd-filter-dialog .bd-filter-mobile-close {
        grid-column: 3;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: inherit;
        font-size: 30px;
        line-height: 1;
    }

    .bd-filter-dialog .bd-filter-drawer-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .bd-filter-dialog .bd-filter-card {
        margin: 0 0 12px;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* Verberg alleen de dubbele titel in het gewone categorievenster. */
    .bd-filter-dialog #bdFilterDrawer .bd-filter-card-header h2 {
        display: none;
    }

    .bd-filter-dialog .bd-filter-category-list {
        min-height: 0;
        max-height: none;
    }

    .bd-filter-dialog .bd-filter-row {
        min-height: 48px;
        padding: 10px 12px;
        font-size: 16px;
    }

    /* Mobiel verkoperspaneel: duidelijke groepskoppen. */
    .bd-filter-dialog #bdSellerFilterDrawer .bd-filter-card-header {
        margin-bottom: 4px;
    }

        .bd-filter-dialog #bdSellerFilterDrawer .bd-filter-card-header h2 {
            display: block;
            font-size: 16px;
            font-weight: 700;
        }

    /* Scheidingslijn alleen als de groep Aanbod niet verborgen is. */
    .bd-filter-dialog #bdSellerFilterDrawer
    #sellerOfferTypeSection:not([style*="display: none"]):not([style*="display:none"]) + #sellerOfferCategorySection {
        border-top: 1px solid #e7ebee;
        padding-top: 14px;
    }
}
