.c-mainMenu {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 5;
  height: 100vh;
  overflow: visible !important;

  .nav {
    display: flex;
    flex-direction: column;
    height: 100%;

    overflow: hidden;
    background: #1e1e1e;
  }

  .nav-logo {
    display: flex;
    flex: 0 0 auto;
    align-items: center;

    justify-content: center;
    height: $leftmenu-logo-height;
    background: url('../images/logo-background.svg') -11px -29px no-repeat;
    background-size: 112px;

    img {
      width: 32px;
      max-width: 80%;
    }
  }

  .nav-container {
    display: flex;

    flex-basis: auto;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    min-height: calc(100% - #{$leftmenu-logo-height});
    overflow: hidden;
  }

  .nav-menu {
    flex: 1 1 auto;
    margin: 70px 0 0;

    ul {
      margin: 0;
      padding: 0;
    }
  }

  .nav-footer {
    flex: 0 0 auto;
    background-color: $icon-color;

    .nav-link {
      padding: 8px 0;
      color: $menu-background-color;
      box-shadow: inset 0 0 20px 0 #888;

      [class^="el-icon-"],
      [class*=" el-icon-"] {
        font-size: 1.4rem;
      }

      &:hover {
        color: $menu-background-color;
        background-color: lighten($icon-color, 10%);
      }

      span {
        margin: 0 auto 2px;
      }
    }
  }

  .nav-link {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    color: #aaa;
    font-size: 10px;

    line-height: normal;
    text-align: center;

    [class^="icon-"],
    [class^="el-icon-"],
    [class*=" icon-"],
    [class*=" el-icon-"],
    .oi {
      display: block;
      margin: 0 auto 10px;
      font-size: 30px;
    }

    &:hover {
      color: #aaa;
      text-decoration: none;
      background: #111;
    }

    &.opened {
      background: #2b2b2b;
    }

    &.active {
      color: $primary-color;
    }
  }

  .sub-nav-category {

    li:not(:last-child) & {
      margin-bottom: 40px;
    }
  }

  .sub-nav-categoryName {
    margin-bottom: 5px;
    padding-left: 35px;
    color: #fff;

    &:hover {
      background: none;
    }
  }

  .nav-logout {
    @extend .nav-link;
    margin-bottom: 10px;
    padding: 10px 0;
  }

  .nav-logoutButton {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
  }

  .sub-nav {
    position: absolute;
    top: 0;
    left: 100%;
    z-index: -1;
    display: flex;
    flex-direction: column;
    width: 315px;
    // padding-top: 170px;
    height: 100%;
    background: #2b2b2b;
    transform: translateX(-100%);
    transition: transform 0.3s;

    &.sub-nav-opened {
      transform: translateX(0);
    }
  }

  .sub-navProfile {
    .sub-nav {
      top: unset;
      bottom: 0;
      height: fit-content;
    }

    .sub-nav-menu {
      margin-top: 0;
      padding-bottom: 0;
    }
  }


  .sub-nav-menu {
    flex: 1 1 auto;
    margin-top: 120px;
    padding-bottom: 30px;

    ul {
      margin: 0 0 25px;
      padding: 0;
      list-style-type: none;
    }
  }

  .sub-nav-head {
    flex: 0 0 auto;
    height: 40px;
    overflow: hidden;
    text-align: right;
  }

  .sub-nav-foot {
    flex: 0 0 auto;
    height: 30px;
    overflow: hidden;
    color: #94928c;
    font-size: .9em;
    line-height: 30px;
    text-align: center;
  }

  .sub-nav-link {
    display: block;
    padding: 8px 35px;
    color: #94928c;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.5px;

    &:hover {
      text-decoration: none;
    }

    &:hover,
    &.active {
      color: $primary-color;
      background: #242424;
    }
  }

  .sub-nav-close {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    padding: 40px 40px 20px 20px;

    &:before,
    &:after {
      position: absolute;
      top: 50%;
      left: 50%;
      display: block;
      width: 1px;
      height: 32px;
      margin-top: -16px;
      background: #999;
      content: ' ';
    }

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

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

  .nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: $leftmenu-width;
    z-index: -2;
    background: rgba(0, 0, 0, 0.5);
  }
}

.c-mainMenu-opened:before {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  content: ' ';
}

