// Copyright (c) 2016-2018 VMware, Inc. All Rights Reserved.
// This software is released under MIT license.
// The full license information can be found in LICENSE in the root directory of this project.

@mixin sliding-nav-positioning($top: 0, $right: auto, $bottom: 0, $left: 0) {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: $top;
    right: $right;
    bottom: $bottom;
    left: $left;
    background: $clr-nav-background-color;
    z-index: $clr-sliding-panel-z-index;
    height: 100vh;
}

@mixin menu-trigger($right: auto, $left: 0, $transformX: $clr-trigger-position) {
    position: fixed;
    top: 0;
    right: $right;
    left: $left;
    z-index: $clr-sliding-panel-z-index;
    transform: translateX($transformX);
    transition: $clr-trigger-animation;

    &::after {
        content: none;
    }
}

@mixin hamburger-menu-trigger-animation() {
    & > span {
        background: transparent;

        &::before,
        &::after {
            left: 0.125rem;
            transform-origin: 9%;
            transition: $clr-trigger-animation;
        }

        &::before {
            transform: rotate(45deg);
        }

        &::after {
            transform: rotate(-45deg);
        }
    }
}

@mixin overflow-menu-trigger-animation() {
    & > span {
        background: transparent;

        &::before,
        &::after {
            height: 0.0833333rem;
            width: 1rem;
            left: -0.25rem;
            transform-origin: -3%;
            transition: $clr-trigger-animation;
        }

        &::before {
            transform: rotate(45deg);
        }

        &::after {
            transform: rotate(-45deg);
        }
    }
}
