/*------------------------------------
  Sidebar Navigation
------------------------------------*/
/* Disable content revealing on page load */
.u-sidebar {
    &[aria-labelledby] {
        opacity: 0;
    }

    &[aria-labelledby][role="tabpanel"] {
        opacity: 1;
    }

    &[aria-labelledby].u-unfold--css-animation,
    &[aria-labelledby].u-unfold--jquery-slide {
        opacity: 1;
    }

    &.u-unfold--css-animation.u-unfold--hidden {
        display: none;
        opacity: 0;
        visibility: hidden;
    }
}

// Common styles of Sidebar Navigation
.u-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: $sidebar-z-index;
    width: $sidebar-width;
    height: 100%;
    background-color: $sidebar-bg-color;
    box-shadow: $sidebar-right-box-shadow;

    &__md {
        @include media-breakpoint-up(md) {
            width: $sidebar-width-md;
        }
    }

    &-bg-overlay {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1002;
        display: none;
        width: 100%;
        height: 100%;
    }

    &__lg {
        @include media-breakpoint-up(md) {
            width: $sidebar-width-lg;
        }
    }

    &__xl {
        @include media-breakpoint-up(md) {
            width: $sidebar-width-xl;
        }
    }

    &__body,
    &__content {
        height: 100%;
    }

    &--left {
        right: auto;
        left: 0;
        box-shadow: $sidebar-left-box-shadow;
    }

    &__scroller {
        height: 100%;
        overflow: hidden;
        overflow-y: auto;
    }

    &__container {
        position: relative;
        height: 100%;
        min-height: 100%;
    }

    &__footer {
        width: 100%;
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
    }
}

.right-sidebar:not(.woocommerce-checkout),
.left-sidebar:not(.woocommerce-checkout) {
    #primary,
    #secondary {
        @include make-col-ready;
    }

    #primary {
        @include media-breakpoint-up(md) {
            @include make-col(6.62400001);
        }

        @include media-breakpoint-up(lg) {
            @include make-col(7.92727273);
        }

        @include media-breakpoint-up(xl) {
            @include make-col(8.73170732);
        }

        @include media-breakpoint-up(wd) {
            @include make-col(9.23835617);
        }
    }

    #secondary {
        @include media-breakpoint-up(md) {
            @include make-col(5.37599999);
        }

        @include media-breakpoint-up(lg) {
            @include make-col(4.07272727);
        }

        @include media-breakpoint-up(xl) {
            @include make-col(3.26829268);
        }

        @include media-breakpoint-up(wd) {
            @include make-col(2.76164383);
        }
    }

    &.woocommerce-cart {
        #primary {
            @include media-breakpoint-up(md) {
                @include make-col(6);
            }

            @include media-breakpoint-up(lg) {
                @include make-col(6.5);
            }

            @include media-breakpoint-up(xl) {
                @include make-col(8.5);
            }

            @include media-breakpoint-up(wd) {
                @include make-col(9);
            }
        }

        #secondary {
            @include media-breakpoint-up(md) {
                @include make-col(6);
            }

            @include media-breakpoint-up(lg) {
                @include make-col(5.5);
            }

            @include media-breakpoint-up(xl) {
                @include make-col(3.5);
            }

            @include media-breakpoint-up(wd) {
                @include make-col(3);
            }
        }
    }
}
