/* Compact multi-select for sidebar attribute filters (e.g. Size) */
.bb-attr-multiselect {
    position: relative;
    width: 100%;
}

.bb-attr-multiselect__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #ececec;
    border-radius: 6px;
    background: #fff;
    color: #253d4e;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bb-attr-multiselect__trigger:hover,
.bb-attr-multiselect.is-open .bb-attr-multiselect__trigger {
    border-color: var(--color-brand, #3bb77e);
}

.bb-attr-multiselect.is-open .bb-attr-multiselect__trigger {
    box-shadow: 0 0 0 3px rgba(59, 183, 126, 0.12);
}

.bb-attr-multiselect__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #7e7e7e;
}

.bb-attr-multiselect.has-selection .bb-attr-multiselect__label {
    color: #253d4e;
    font-weight: 600;
}

.bb-attr-multiselect__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--color-brand, #3bb77e);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.bb-attr-multiselect__count[hidden] {
    display: none !important;
}

.bb-attr-multiselect__trigger .fi-rs-angle-small-down {
    font-size: 14px;
    color: #adadad;
    transition: transform 0.2s ease;
}

.bb-attr-multiselect.is-open .bb-attr-multiselect__trigger .fi-rs-angle-small-down {
    transform: rotate(180deg);
    color: var(--color-brand, #3bb77e);
}

.bb-attr-multiselect__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    max-height: 280px;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(37, 61, 78, 0.12);
    overflow: hidden;
}

.bb-attr-multiselect__panel[hidden] {
    display: none !important;
}

.bb-attr-multiselect__search {
    flex-shrink: 0;
    padding: 10px;
    border-bottom: 1px solid #f1f1f1;
}

.bb-attr-multiselect__search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ececec;
    border-radius: 6px;
    background: #f7f8f9;
    color: #253d4e;
    font-size: 13px;
    outline: none;
}

.bb-attr-multiselect__search-input:focus {
    border-color: var(--color-brand, #3bb77e);
    background: #fff;
}

.bb-attr-multiselect__options {
    margin: 0;
    padding: 6px 0;
    list-style: none;
    overflow-y: auto;
    max-height: 220px;
}

.bb-attr-multiselect__option {
    margin: 0;
}

.bb-attr-multiselect__option[hidden] {
    display: none !important;
}

.bb-attr-multiselect__option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.bb-attr-multiselect__option-label:hover {
    background: #f4faf7;
}

.bb-attr-multiselect__option-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bb-attr-multiselect__check {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1.5px solid #cfd4d8;
    border-radius: 3px;
    background: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bb-attr-multiselect__option-label input:checked + .bb-attr-multiselect__check {
    border-color: var(--color-brand, #3bb77e);
    background: var(--color-brand, #3bb77e);
}

.bb-attr-multiselect__option-label input:checked + .bb-attr-multiselect__check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.bb-attr-multiselect__text {
    flex: 1;
    min-width: 0;
    color: #253d4e;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.bb-attr-multiselect__empty {
    margin: 0;
    padding: 16px 12px;
    color: #7e7e7e;
    font-size: 13px;
    text-align: center;
}

.bb-attr-multiselect__empty[hidden] {
    display: none !important;
}

/* Keep the panel usable inside sticky sidebars */
.primary-sidebar .bb-attr-multiselect.is-open {
    z-index: 40;
}
