#app {
  .sidebar-container {
    transition: width 0.28s;
    width: $sideBarWidth !important;
    // background-color: $menuBg;
    background-color: #C0C4CC;
    box-shadow: 3px 0 13px 0 rgba(0,0,0,0.10);
    height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    padding-top: 10px;
    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
        0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }
    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }
    .el-scrollbar {
      height: 100%;
    }
    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }
    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }
  }

  .openSidebar{
    .el-menu {
      padding: 0 10px;
      .el-sub-menu__title{
        font-weight: bold;
        padding-left: 15px!important;
        height: 40px;
        .svg-icon{
          margin-right: 12px;
        }
      }
      .el-menu-item{
        height: 38px;
        padding-left: 32px;
        &:hover{
          background: $menuHover;
          border-bottom: 4px;
        }
      }
      .el-menu-item.is-active{
        background: #D0E6FF;
        border-radius: 4px;
        &:before{
          content: "";
          display: block;
          width: 5px;
          height: 5px;
          background: $primaryColor;
          border-radius: 50%;
          position: absolute;
          top: 50%;
          left: 10px;
          transform: translateY(-3px);
        }
      }
      .nest-menu{
        .el-sub-menu__title{
          padding-left: 32px!important;
          .svg-icon{
            display: none;
          }
        }
        .el-menu-item{
          .svg-icon{
            display: none;
          }
        }
      }
    }
    .el-menu.verticalMenu > div > .el-menu-item{
      font-weight: bold;
      padding-left: 15px !important;
      height: 40px
    }
    .el-sub-menu.is-active{
      > .el-sub-menu__title{
        color: $primaryColor!important;
        &:before{
          content: "";
          display: block;
          width: 4px;
          height: 18px;
          background: $primaryColor;
          box-shadow: 1px 0 2px 0 rgb(0 104 205 / 20%);
          border-radius: 0 100px 100px 0;
          position: absolute;
          left: -10px;
          top: 10px;
        }
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 40px !important;
    }
    .el-menu--collapse {
      .el-sub-menu {
        & > .el-sub-menu__title {
          padding: 0;
          height: 40px;
          .svg-icon{
            margin-left: 12px;
          }
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
            & > .el-sub-menu__icon-arrow{
              display: none;
            }
        }
      }
      .el-sub-menu.is-active{
        & > .el-sub-menu__title{
          color: $primaryColor!important;
        }
      }
    }
  }

}

// when menu collapsed
.el-menu--vertical {
  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;
    &::-webkit-scrollbar-track-piece {
      background: transparent;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #cccccc;
      border-radius: 20px;
      transition:background-color 0.3s;
      &:hover{
        background: #909399;
      }
    }
    .nest-menu{
      .el-sub-menu__title{
        height: 38px;
        .svg-icon{
          display: none;
        }
      }
      .el-menu-item{
        height: 38px;
        &:hover{
          background: $menuHover;
        }
        .svg-icon{
          display: none;
        }
      }
      .el-menu-item.is-active{
        background: #D0E6FF;
        border-right: 4px solid $primaryColor;
      }
    }
  }
}
