@import 'var-list';
.nav {
  user-select: none;
  text-align: center;
  height: 100%;
  width: 7.7rem;
  min-width: 154px;
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--nav-color);
  //background-color: var(--nav-bg-color);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  .navItem {
    display: flex;
    align-items: center;
    position: relative;
    font-size: 1rem;
    // padding-left: 2.2rem;
    height: 2rem;
    margin: 0.2rem;
    border-radius: 4px;
    margin-bottom: 10px;
    outline: none;
    cursor: pointer;
    border-right: 3px solid transparent;
    .categoryIcon {
      //   margin-right: 0.5rem;
      width: 1.2rem;
      min-width: 1.2rem;
      height: 1.2rem;
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-position-x: 0, -100px;
      padding: 0 13px 0 15px;
      @each $v in $category-list {
        &.#{$v} {
          background-image: var(--nav-icon-#{$v});
        }
      }
    }
    &.active {
      //   border-right: 3px solid #2ca7f8;
      background-color: var(--nav-bg-color-active);
      color: #ffffff;
      .categoryIcon {
        background-position-x: -100px, 0px;
      }
      &:hover {
        background-color: var(--activityColorHover);
      }
      .downloadCount {
        box-shadow: 0 0 0 1px var(--activityColorHover);
        color: #fff;
      }
    }
    &:not(.active):hover {
      background-color: rgba(0, 0, 0, 0.05);
    }
    .title {
      display: flex;
      align-items: center;
      flex-grow: 1;
      overflow: hidden;
      white-space: nowrap;
      span {
        line-height: 2rem;
        text-overflow: ellipsis;
        overflow: hidden;
      }
    }
  }
  .hr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 6px;
  }
}

.downloadCount {
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  margin: 0 0.5rem;
  color: var(--activityColor);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--main-title-hr-color);
  &.rect {
    width: 20px;
    border-radius: 8px;
  }
}