/* Hierarchical product categories in the filter on the main shop page. */
.shop-sidebar .wp-block-woocommerce-product-filter-taxonomy.theme-category-tree
    .wc-block-product-filter-checkbox-list__items {
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item {
    position: relative;
    box-sizing: border-box;
    margin: 0;
    border-right: 1px solid #e8eaed;
    border-bottom: 1px solid #e8eaed;
    border-left: 1px solid #e8eaed;
    background: #fff;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item[hidden] {
    display: none !important;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item--depth-0 {
    margin-top: -1px;
    border-top: 1px solid #e8eaed;
    background: #f7f8fa;
}

.shop-sidebar .theme-category-tree .wc-block-product-filter-checkbox-list__label {
    box-sizing: border-box;
    min-height: 48px;
    margin: 0;
    padding: 12px 42px 12px 14px;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item--depth-0
    > .wc-block-product-filter-checkbox-list__label {
    font-weight: 500;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item--depth-1
    > .wc-block-product-filter-checkbox-list__label {
    min-height: 43px;
    padding-left: 28px;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item--depth-2
    > .wc-block-product-filter-checkbox-list__label {
    min-height: 40px;
    padding-left: 44px;
    font-size: 0.94em;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item--depth-3
    > .wc-block-product-filter-checkbox-list__label {
    min-height: 38px;
    padding-left: 60px;
    font-size: 0.9em;
}

.shop-sidebar .theme-category-tree .wc-block-product-filter-checkbox-list__label:hover {
    background: #f1f7ff;
    color: #0878df;
}

.shop-sidebar .theme-category-tree .wc-block-product-filter-checkbox-list__text-wrapper {
    padding: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item--has-children
    .wc-block-product-filter-checkbox-list__text-wrapper[role="button"] {
    cursor: pointer;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item--has-children
    .wc-block-product-filter-checkbox-list__text-wrapper[role="button"]:focus-visible {
    outline: 2px solid #0878df;
    outline-offset: 3px;
}

.shop-sidebar .theme-category-tree .theme-category-tree__toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    z-index: 2;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #8b929a;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.shop-sidebar .theme-category-tree .theme-category-tree__toggle:hover,
.shop-sidebar .theme-category-tree .theme-category-tree__toggle:focus-visible {
    outline: none;
    background: #e7f2ff;
    color: #0878df;
}

.shop-sidebar .theme-category-tree .theme-category-tree__toggle span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    transform: translate(-65%, -50%) rotate(-45deg);
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transition: transform 0.2s ease;
}

.shop-sidebar .theme-category-tree .theme-category-tree__item.is-expanded
    > .theme-category-tree__toggle span {
    transform: translate(-50%, -70%) rotate(45deg);
}

.shop-sidebar .theme-category-tree .wc-block-product-filter-checkbox-list__show-more {
    display: none !important;
}

@media (max-width: 991px) {
    .shop-sidebar .theme-category-tree .wc-block-product-filter-checkbox-list__label {
        min-height: 46px;
    }
}
