@import './common/var.scss';
@import './base.scss';
.es-menu-vertical-scrollbar {
  height: 100%;
}
.el-menu,
.el-menu--horizontal > .el-submenu {
  border-right: 0;
  background-color: transparent;
  .el-menu-item,
  .el-submenu__title {
    display: flex;
    align-items: center;
    padding-right: 16px;
    height: 48px;
    line-height: 48px;
    &:not(.is-disabled):focus,
    &:not(.is-disabled):hover {
      background-color: transparent;
    }
  }
  [class^='es-icon-'],
  [class^='es-icons-'],
  .es-menu-item-tooltip,
  .es-icon {
    vertical-align: middle;
    margin-right: 5px;
    width: 24px;
    text-align: center;
    font-size: 18px;
  }
  .el-submenu__icon-arrow {
    right: 8px;
  }
  .es-menu-title-vertical {
    flex: 1;
    display: block;
    white-space: normal;
    line-height: 16px;
    position: relative;
    &.es-menu-title-margin {
      margin-right: 8px;
    }
    .es-badge {
      @extend .es-text-ellipsis-row2;
      line-height: 18px;
      .el-badge__content {
        right: 0;
        top: 50%;
        margin-top: -10px;
        transform: scale(0.9);
        line-height: 18px;
      }
    }
  }
  &.es-menu-collapse {
    & > .el-menu-item {
      flex-direction: column;
      box-orient: vertical;
      padding: 8px 0 !important;
      text-align: center;
      height: auto !important;
      min-height: 60px;
    }
    & > li {
      & > .el-submenu__title {
        width: 100%;
        display: block;
        padding: 8px 0 !important;
        height: auto;
        min-height: 60px;
        text-align: center;
        line-height: 18px;
      }
    }
    .es-icon-sidebar {
      font-size: 26px;
    }
    .es-menu-title-text {
      flex: none;
      margin: 4px 0 0;
      font-size: 13px;
      line-height: 16px;
      .es-badge {
        padding-right: 0;
        .el-badge__content {
          top: -100%;
          right: 0;
          &:not(.is-dot) {
            top: -150%;
            right: -6px;
          }
        }
      }
    }
  }
  .es-item-vertical {
    width: $--nav-initial-width;
    height: auto;
    min-height: 70px;
    padding: 8px 0 !important;
    flex-direction: column;
    box-orient: vertical;
    .es-menu-item-icon {
      font-size: 26px;
      line-height: 30px;
    }
    .es-menu-title-text {
      text-align: center;
      font-size: 14px;
    }
  }
  &.es-menu-nav {
    & > .el-menu-item {
      flex-direction: column;
      box-orient: vertical;
      padding: 8px 0 !important;
      text-align: center;
      & > .es-icon-sidebar {
        font-size: 26px;
      }
    }
  }
}
.es-menu-vertical,
.es-menu-popper-vertical > .el-menu {
  background-color: $--color-primary;
  .el-menu-item:not(.is-disabled),
  .el-submenu__title {
    height: 40px;
    line-height: 40px;
    border: 0;
    color: #fff;
    i {
      color: #fff;
    }

    &.is-active {
      background-color: $--color-primary-light-8;
      i {
        color: #fff;
      }
    }
    &:hover,
    &:focus {
      background-color: $--color-primary-light-8;
    }
  }
}
.el-menu--horizontal {
  & > .el-submenu {
    .el-submenu__icon-arrow {
      margin-top: 0;
    }
  }
  .es-submenu-horizontal.is-active {
    background-color: $--color-primary-light-7;
  }
  & > .el-menu-item {
    height: 44px;
    line-height: 44px;
    &:not(.is-disabled) {
      &:hover {
        color: $--color-primary;
      }
    }
    &.is-active {
      border-bottom-width: 3px;
      color: $--color-primary !important;
    }
  }
  & > .el-submenu {
    .el-submenu__title {
      height: 44px;
      line-height: 44px;
    }
  }
  .el-menu {
    background-color: #fff;
    .el-submenu__title,
    .el-menu-item {
      color: rgba(0, 0, 0, 0.45);
      &:not(.is-disabled):focus,
      &:not(.is-disabled):hover {
        background-color: transparent;
        color: rgba(0, 0, 0, 0.75);
      }
      &.is-active {
        color: $--color-primary;
        font-size: 15px;
      }
    }
  }
}
.es-menu-tooltip {
  background: $--color-primary !important;
  .popper__arrow {
    border-right-color: $--color-primary !important;
    &::after {
      border-right-color: $--color-primary !important;
    }
  }
}

.es-menu-item-horizontal {
  flex-direction: unset !important;
  & > .es-badge > .el-badge__content.is-fixed {
    transform: translate(50%, 0);
  }
}
.es-menu-title-horizontal {
  & > .es-badge > .el-badge__content.is-fixed {
    transform: translate(50%, 0);
  }
}
.es-disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.3);
  background-color: transparent;
  &:hover {
    color: rgba(255, 255, 255, 0.3);
    background-color: transparent;
  }
}
