/**
 * Category tree
 */

.#{$namespace}side-nav {
    $root: &;

    &__parent {
        margin-bottom: 1.5rem;
        padding: 1.5rem 0;
        font-size: 1.8rem;
        text-transform: uppercase;
        font-weight: 700;
        border-bottom: 1px solid $colorGallery;

        &-link,
        &-link:visited {
            color: $colorMineShaft;
            transition: color 0.15s linear;

            &:hover {
                color: $colorCeruleanBlue;
                text-decoration: none;
            }
        }
    }

    &__category-name,
    &__parent-category-name {
        hyphens: auto;
    }

    &__products-counter {
        font-weight: 400;
        color: $colorGray;

        &:before {
            content: '(';
        }

        &:after {
            content: ')';
        }
    }

    &__list {
        margin: 0 0 1rem;
        padding: 0;
        list-style: none;

        &--subcats {
            margin: 1rem 0 2rem;
            padding-left: 2rem;

            #{$root}__link {
                color: $colorGray;

                &:visited {
                    color: $colorGray;
                }

                &--current {
                    font-weight: 700;

                    &:hover {
                        color: $colorGray;
                    }
                }
            }
        }
    }

    &__item {
        font-weight: 400;
        text-transform: none;
        font-size: 1.4rem;
        line-height: 1.25;

        &--has-children,
        &--has-children ~ #{$root}__item {
            font-weight: 700;
            font-size: 1.5rem;
        }
    }

    &__link {
        color: $colorMineShaft;
        transition: color 0.15s linear;

        &:hover {
            color: $colorCeruleanBlue;
            text-decoration: none;
        }

        &:visited {
            color: $colorMineShaft;

            &:hover {
                color: $colorCeruleanBlue;
            }
        }

        &--current {
            font-weight: 700;

            &:hover {
                color: $colorMineShaft;
            }
        }
    }
}
