/* ============================================================================
   BAFLEH JEWELLERY PUBLIC UI B16 - CONTEXTUAL FILTER COUNTS
   Loaded after B15. Counts are server-side facets calculated against all active
   filters except the facet itself (category/color/carat/type).
   ============================================================================ */

body.bafleh-page-catalog .filter-title-row > a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
}

body.bafleh-page-catalog .filter-all-count,
body.bafleh-page-catalog .filter-option-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    min-width: 24px !important;
    height: 19px !important;
    padding: 0 6px !important;
    border: 1px solid #e1ddd6 !important;
    border-radius: 10px !important;
    background: #f8f7f5 !important;
    color: #77716a !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9px !important;
    font-weight: 500 !important;
    line-height: 17px !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    font-variant-numeric: tabular-nums !important;
}

body.bafleh-page-catalog .filter-all-count {
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #99928a !important;
    font-size: 9px !important;
}

body.bafleh-page-catalog .live-filter-option .filter-option-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    color: inherit !important;
    font-weight: inherit !important;
    overflow-wrap: anywhere !important;
}

body.bafleh-page-catalog .live-filter-option .filter-option-count {
    margin-left: auto !important;
}

body.bafleh-page-catalog .live-filter-option:hover .filter-option-count,
body.bafleh-page-catalog .live-filter-option:has(input:checked) .filter-option-count,
body.bafleh-page-catalog .filter-category-link.active .filter-option-count {
    border-color: #c9c2b7 !important;
    background: #fff !important;
    color: #252525 !important;
}

body.bafleh-page-catalog .live-filter-option.is-empty:not(:has(input:checked)),
body.bafleh-page-catalog .filter-category-link.is-empty:not(.active) {
    color: #aaa49d !important;
}
body.bafleh-page-catalog .live-filter-option.is-empty:not(:has(input:checked)) .filter-option-count,
body.bafleh-page-catalog .filter-category-link.is-empty:not(.active) .filter-option-count {
    border-color: #eeeae5 !important;
    background: #fbfaf9 !important;
    color: #b9b3ac !important;
}

/* Category landing uses links rather than checkboxes. Keep the count aligned. */
body.bafleh-page-catalog .filter-category-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-right: 3px !important;
}
body.bafleh-page-catalog .filter-category-link .filter-option-name {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}
body.bafleh-page-catalog .filter-category-link .filter-option-count {
    margin-left: auto !important;
}

/* RTL: numerical pill remains at the visual far edge without reversing digits. */
.rtl-site body.bafleh-page-catalog .live-filter-option .filter-option-count,
.rtl-site body.bafleh-page-catalog .filter-category-link .filter-option-count,
body.rtl-site.bafleh-page-catalog .live-filter-option .filter-option-count,
body.rtl-site.bafleh-page-catalog .filter-category-link .filter-option-count {
    margin-left: 0 !important;
    margin-right: auto !important;
    direction: ltr !important;
}

@media (max-width: 767.98px) {
    body.bafleh-page-catalog .filter-all-count,
    body.bafleh-page-catalog .filter-option-count {
        font-size: 10px !important;
    }
    body.bafleh-page-catalog .filter-option-count {
        min-width: 28px !important;
        height: 21px !important;
        line-height: 19px !important;
        padding: 0 7px !important;
        border-radius: 11px !important;
    }
    body.bafleh-page-catalog .live-filter-option {
        column-gap: 10px !important;
    }
}
