@import './var.less';

@menu-prefix-cls:  ~"@{css-prefix}-menu";

.@{menu-prefix-cls} {
  border-right: 1px solid @color-unactive;
}

@sub-menu-prefix-cls:  ~"@{css-prefix}-sub-menu";

.@{sub-menu-prefix-cls} {
  * {
    transition: @transition-base;
  }

  &-title {
    font-size: @font-size-default;
    height: 40px;
    line-height: 40px;
    cursor: pointer;
    margin: 4px 0;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 40px;

    &:hover {
      color: @primary-color;
    }
  }

  &-disabled {
    .@{sub-menu-prefix-cls}-title {
      cursor: not-allowed;
      color: @color-disabled;

      &:hover {
        color: @color-disabled;
      }
    }
  }

  &-container {
    overflow: hidden;
  }

  &-list {
  }

  &-hidden {
    .@{sub-menu-prefix-cls}-icon {
      transform: @transform-roate-half;
    }
  }

  &-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
  }
}

@menu-item-group-prefix-cls:  ~"@{css-prefix}-menu-item-group";

.@{menu-item-group-prefix-cls} {
  &-title {
    font-size: @font-size-default;
    height: 40px;
    line-height: 40px;
    color: @color-disabled;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@menu-item-prefix-cls:  ~"@{css-prefix}-menu-item";

.@{menu-item-prefix-cls} {
  font-size: @font-size-default;
  height: 40px;
  line-height: 40px;
  cursor: pointer;
  margin: 4px 0;
  transition: @transition-base;
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  &:hover:not(&-disabled) {
    color: @primary-color;
  }

  &::after {
    transition: @transition-base;
    position: absolute;
    right: -1px;
    top: 0;
    content: '';
    display: inline-block;
    height: 0;
    width: 0;
  }

  &-disabled {
    color: @color-disabled;
    cursor: not-allowed;
  }

  &-active {
    background: @primary-color-choosed;
    color: @primary-color;

    &::after {
      height: 100%;
      width: 3px;
      background: @primary-color;
    }
  }
}
