@import '../style/var';

.van-sidebar-item {
  position: relative;
  display: block;
  box-sizing: border-box;
  padding: @sidebar-padding;
  overflow: hidden;
  color: @sidebar-text-color;
  font-size: 14px;  // ks @sidebar-font-size -> 14px
  line-height: @sidebar-line-height;
  background-color: @sidebar-background-color;
  border-left: none; // ks add
  cursor: pointer;
  user-select: none;

  &:active {
    background-color: @sidebar-active-color;
  }

  &__text {
    position: relative;
    display: inline-block;
    padding-left: 12px; // ks add
    // https://github.com/youzan/vant/issues/7455
    word-break: break-all;
    border-left: 3px solid transparent; // ks add
  }

  &:not(:last-child)::after {
    border-bottom-width: 1px;
  }

  &--select {
    color: @purple;  // ks @sidebar-selected-text-color -> @purple
    font-weight: @sidebar-selected-font-weight;
    // ks add
    .van-sidebar-item__text {
      border-color: @sidebar-selected-border-color;
    }
    &,
    &:active {
      background-color: @sidebar-selected-background-color;
    }

    // &::before {
    //   position: absolute;
    //   top: 50%;
    //   left: 0;
    //   width: @sidebar-selected-border-width;
    //   height: @sidebar-selected-border-height;
    //   background-color: @sidebar-selected-border-color;
    //   transform: translateY(-50%);
    //   content: '';
    // }
    // ks update
    &::before {
      width: 0;
      height: 0;
    }
  }

  &--disabled {
    color: @sidebar-disabled-text-color;
    cursor: not-allowed;

    &:active {
      background-color: @sidebar-background-color;
    }
  }
}
