/* Menu styles */

.menu {
    position: fixed;
    top: 120px;
    left: 0;
    width: 300px;
    height: calc(100vh - 120px);
    background: #1c1d22;
}

.menu__wrap {
    position: absolute;
    top: 3.5em;
    bottom: 0;
    overflow: hidden;
    width: 100%;
}

.menu__level {
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
    overflow: hidden;
    overflow-y: scroll;
    width: calc(100% + 50px);
    height: 100%;
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.menu__level:focus {
    outline: none;
}

.menu__level--current {
    visibility: visible;
}

.menu__item {
    display: block;
    width: calc(100% - 50px);
}

.menu__link {
    font-weight: 600;
    position: relative;
    display: block;
    padding: 1em 2.5em 1em 1.5em;
    color: #bdbdbd;
    transition: color 0.1s;
}

.menu__link[data-submenu]::after {
    content: '\2026';
    position: absolute;
    right: 0;
    padding: 0 .25em;
    color: #2a2b30;
}

.menu__link:hover,
.menu__link:focus,
.menu__link[data-submenu]:hover::after,
.menu__link[data-submenu]:focus::after {
    color: #5c5edc;
}

.menu__link--current::before {
    content: '\00B7';
    font-size: 1.5em;
    line-height: 0;
    position: absolute;
    top: 50%;
    left: 0.5em;
    height: 4px;
    color: #5c5edc;
}

/* csslint ignore:start */
[class^='animate-'],
[class*=' animate-'] {
    visibility: visible;
}
/* csslint ignore:end */

.animate-outToRight .menu__item {
    animation: outToRight 0.6s both cubic-bezier(0.7, 0, 0.3, 1);
}

@keyframes outToRight {
    to {
        opacity: 0;
        transform: translate3d(100%, 0, 0);
    }
}

.animate-outToLeft .menu__item {
    animation: outToLeft 0.6s both cubic-bezier(0.7, 0, 0.3, 1);
}

@keyframes outToLeft {
    to {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
    }
}

.animate-inFromLeft .menu__item {
    animation: inFromLeft 0.6s both cubic-bezier(0.7, 0, 0.3, 1);
}

@keyframes inFromLeft {
    from {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-inFromRight .menu__item {
    animation: inFromRight 0.6s both cubic-bezier(0.7, 0, 0.3, 1);
}

@keyframes inFromRight {
    from {
        opacity: 0;
        transform: translate3d(100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.menu__breadcrumbs {
    font-size: 0.65em;
    line-height: 1;
    position: relative;
    padding: 2.5em 3.75em 1.5em 2.5em;
}

.menu__breadcrumbs a {
    font-weight: bold;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #5c5edc;
}

.menu__breadcrumbs a:last-child {
    pointer-events: none;
}

.menu__breadcrumbs a:hover,
.menu__breadcrumbs a:focus {
    color: #8182e0;
}

.menu__breadcrumbs a:not(:last-child)::after {
    content:'\2192';
    padding: 0 .25em;
}

.menu__breadcrumbs a:not(:last-child):hover::after,
.menu__breadcrumbs a:not(:last-child):focus::after {
    color: #33353e;
}

.menu__back {
    font-size: 1.05em;
    position: absolute;
    z-index: 100;
    top: 0;
    right: 0.25em;
    margin: 0;
    padding: 1.365em 0.65em 0 0;
    cursor: pointer;
    color: #2a2b30;
    border: none;
    background: none;
}

.menu__back--hidden {
    pointer-events: none;
    opacity: 0;
}

.menu__back:hover,
.menu__back:focus {
    color: #fff;
    outline: none;
}

/* Icons */

.icon--cross::before {
    content:'\2715';
}

.icon--menu::before {
    content:'\2630';
}

.icon--arrow-left::after {
     content:'\2190';
 }

/* Open and close buttons */

.action {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    cursor: pointer;
    border: none;
    background: none;
}

.action:focus {
    outline: none;
}

.action--open {
    font-size: 1.5em;
    top: 1em;
    left: 1em;
    display: none;
    color: #fff;
    position: fixed;
    z-index: 1000;
}

.action--close {
    font-size: 1.1em;
    top: 1.25em;
    right: 1em;
    display: none;
    color: #45464e;
}

@media screen and (max-width: 40em) {
    .action--open,
    .action--close {
        display: block;
    }
    .menu {
        z-index: 1000;
        top: 0;
        width: 100%;
        height: 100vh;
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.3s;
    }
    .menu--open {
        transform: translate3d(0, 0, 0);
    }

    .menu__back {
        right: 2.25rem;
    }
}
