#app {
  .main-container {
    height: 100%;
    transition: margin-left 0.28s;
    margin-left: $base-sidebar-width;
    width: calc(100% - #{$base-sidebar-width});
    position: relative;
    background: #f5f5f5;
  }

  .sidebarHide {
    margin-left: 0 !important;
  }

  .sidebar-container {
    -webkit-transition: width 0.28s;
    transition: width 0.28s;
    width: $base-sidebar-width !important;
    background-color: $base-menu-background;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    // overflow: hidden;
    // -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35);
    // box-shadow: 2px 0 6px rgba(0,21,41,.35);
    //展开、收起箭头
    .side-expand {
      position: absolute;
      top: 180px;
      width: 21px;
      height: 62px;
      cursor: pointer;
      animation: left-right 0.2s;
      animation-fill-mode: forwards;
      z-index: 1002;
    }

    @keyframes left-right {
      0% {
        right: 0;
      }
      100% {
        right: -21px;
      }
    }

    // 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%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 6px;
    }
    .el-submenu__icon-arrow {
      top: 54%;
      right: 5px;
      color: #d8d8d8;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: calc(100% - 16px) !important;
      margin: 0 8px;
    }
    .el-menu--inline {
      margin: 0;
      width: 100% !important;
    }
    .el-menu--inline .nest-menu .el-menu-item {
      width: 100% !important;
      min-width: 128px;
      font-size: 12px;
      color: #fff !important;
      padding-left: 23px !important;
    }
    .el-menu--inline .nest-menu .el-menu-item .svg-icon {
      display: none;
    }

    .el-menu-item,
    .el-submenu__title {
      height: 40px;
      line-height: 40px;
      border: 1px solid #141b2f;
      color: #fff;
      margin-bottom: 6px;
      padding: 0 6px !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
    }

    // menu hover
    .el-menu-item.is-active {
      // 点击菜单的颜色
      background-color: #1e2c4c !important;
      color: #fff !important;
      border-radius: 10px;
      border: 1px solid #2b3f69;
      &:hover {
        background-color: #1e2c4c !important;
        border-radius: 10px;
        color: #fff !important;
        border: 1px solid #2b3f69;
      }
      &:before {
        background: #fff !important;
      }
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      color: #fff !important;
      &:hover {
        background-color: #1e2c4c !important;
        color: #fff !important;
        border-radius: 10px;
        border: 1px solid #2b3f69;
      }
    }
  }
  .sidebar-container .el-submenu .el-menu-item:hover,
  .sidebar-container .nest-menu .el-submenu > .el-submenu__title:hover {
    background-color: #1e2c4c !important;
    color: #fff !important;
    border-radius: 10px;
    border: 1px solid #2b3f69;
  }

  .sidebar-container .el-submenu .el-menu-item:before,
  .sidebar-container .nest-menu .el-submenu > .el-submenu__title:before {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #344062;
    left: 16px;
    top: 50%;
    content: "";
  }
  .sidebar-container .el-submenu .el-menu-item:hover:before,
  .sidebar-container .nest-menu .el-submenu > .el-submenu__title:hover:before {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
    left: 16px;
    top: 50%;
    content: "";
  }

  .hideSidebar {
    .sidebar-container {
      width: 48px !important;
    }

    .main-container {
      margin-left: 48px;
      width: calc(100% - 48px);
    }

    .submenu-title-noDropdown {
      margin-bottom: 6px;
      padding: 0 6px !important;
      text-align: center;
      cursor: pointer;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin: 0px !important;
          width: 1em;
          height: 1em;
          font-size: 16px;
          margin-bottom: -2px;
          vertical-align: -0.15em;
          fill: currentColor;
          overflow: hidden;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      & > .el-submenu__title {
        margin-bottom: 6px;
        padding: 0 6px !important;
        text-align: center;
        cursor: pointer;

        .svg-icon {
          margin: 0px !important;
          width: 1em;
          height: 1em;
          font-size: 16px;
          margin-bottom: -2px;
          vertical-align: -0.15em;
          fill: currentColor;
          overflow: hidden;
          margin-left: 0px;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $base-sidebar-width !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform 0.28s;
      width: $base-sidebar-width !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$base-sidebar-width, 0, 0);
      }
    }
  }

  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }

  .nest-menu .el-submenu > .el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background-color: rgba(0, 0, 0, 0.06) !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

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

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
.side-popover {
  min-width: 80px;
  font-size: 12px;
  color: #232323;
  padding: 0 8px 32px 8px;
  margin-left: 16px !important;
  .side-title {
    font-size: 16px;
    height: 54px;
    line-height: 58px;
    padding: 0 6px;
    border-bottom: 1px solid #f0f0f0;
  }
  .side-list {
    li {
      padding: 24px 6px 0 6px;
      &:hover {
        color: #3d3d3d;
      }
    }
  }
}
.side-retract {
  height: 40px;
  line-height: 48px;
  border: 1px solid #141b2f;
  margin-bottom: 6px;
  padding: 0 6px !important;
  text-align: center;
  cursor: pointer;
  &:hover {
    background-color: #1e2c4c !important;
    border-radius: 10px;
    border: 1px solid #2b3f69;
  }
  .svg-icon {
    margin-right: 0 !important;
    width: 1em;
    height: 1em;
    font-size: 16px;
    margin-bottom: -2px;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
    margin-left: 0px;
  }
}
.side-one-popover {
  min-width: 52px;
  padding-bottom: 0;
  .side-title {
    font-size: 12px;
    height: 24px;
    line-height: 24px;
    border-bottom: 0;
  }
}

.side-logo-popover {
  width: 120px;
  padding-top: 16px;
  padding-bottom: 0;
  margin-left: 16px !important;
  .sidebar-logo {
    width: 24px;
    height: 24px;
    background: #f5f5f5;
    margin: 0 auto;
    text-align: center;
    img {
      width: 16px;
      height: 23px;
    }
  }
  .side-title {
    text-align: center;
    font-size: 12px;
    height: auto;
    line-height: 18px;
    border-bottom: 0;
    padding-top: 6px;
    padding-bottom: 10px;
  }
}
