@import '../../core/variables.less';

@top-height: 0px;
@menu-bakg: #fff;
@active-color: #2966ff;
.left-container {
  position: absolute;
  z-index: 10;
  top: @top-height;
  left: 0;
  bottom: 0;
  width: @xm-left-width;
  background: @menu-bakg;
  color: #333;
  .top-ctrl {
    display: flex;
    align-items: center;
    .topLogo {
      height: 60px;
      background: rgba(255, 255, 255, 0.5);
      .img1 {
        width: 138px;
        height: 35px;
        margin: 15px 0 15px 8px;
      }
    }
    .menu-type-icon {
      margin: 8px 14px 0px 4px;
      cursor: pointer;
      .icon {
        font-size: 14px;
        color: #5e606a;
      }
    }
  }

  .ant-menu {
    padding-left: 0 !important;
    color: #333;
    background: #fff !important;
    .ant-menu-title-content {
      margin-left: 0 !important;
    }
  }
  .left {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    display: -webkit-flex;
    flex-direction: column;
    -webkit-flex-direction: column;

    .nav {
      -webkit-flex: 1;
      cursor: default;
      font-size: 16px;
      height: calc(~'100% - 72px');
      overflow: auto;
      &::-webkit-scrollbar {
        display: none;
      }
      .icon {
        margin-right: 20px;
      }
      .icon-img-box {
        // display: flex;
        display: inline-block;
        width: 40px;
        height: 40px;
        .icon-img {
          margin-left: 12px;
        }
        margin-right: 0 !important;
      }
      .icon-img-title {
        margin-left: 0 !important;
      }
      .icon-img {
        width: 18px;
        height: 18px;
      }
      .listType {
        width: 5px;
        height: 5px;
        background: #9a9da7;
        border-radius: 50%;
        top: 18px;
        left: 38px;
        position: absolute;
      }
      .ant-menu-item {
        padding-left: 0 !important;
        padding-right: 0px;
        margin: 6px 8px;
        width: calc(100% - 15px);
        &:hover {
          background: #f3f6fa;
          border-radius: 2px;
          color: #333;
        }
      }
      .ant-menu-item-selected {
        background-color: @active-color;
        color: #fff;
        border-radius: 2px;
        &:hover {
          color: #fff;
        }
      }
      .ant-menu-submenu {
        .ant-menu-submenu-title {
          margin: 6px 8px;
          padding-left: 0 !important;
        }
        .ant-menu-item {
          padding-left: 46px !important;
        }
      }

      .ant-menu-submenu-selected {
        color: @active-color;

        .ant-menu-item-selected {
          color: #fff;
          .listType {
            background: @active-color;
          }
        }
      }
      .ant-menu-submenu-arrow {
        right: 22px;
        color: #5e606a;
      }
    }
  }

  &.left-container-vertical {
    width: 56px;
    .menu-type-icon {
      margin: 4px 0 0px 22px;
    }
    .left {
      .ant-menu-submenu-arrow {
        display: none !important;
      }
    }
  }
  .shink-footer {
    left: 74px;
  }
  // &:hover{
  //   .menu-type-icon{
  //     display:inline-block;
  //   }
  // }
  .version-info {
    position: absolute;
    height: 74px;
    bottom: 0;
    width: 100%;
    cursor: pointer;
    z-index: -1;
    .row-1 {
      width: fit-content;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #999999;
      line-height: 20px;
      margin: 0 auto;
      .version-name {
        display: inline-block;
        width: 58px;
        text-align: center;
        color: #333333;
        margin: 0 auto;
        border-radius: 2px;
        border: 1px solid #E8E8E8;
      }
      .renew {
        display: inline-block;
        width: 58px;
        color: #2966FF;
        margin-left: 8px;
      }
    }

    .expiration-time {
      height: 24px;
      text-align: center;
      font-size: 12px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #999999;
      line-height: 22px;
      margin: 6px auto 0 auto;
    }
    
    .popover {
      display: none;
      position: absolute;
      z-index: 100;
      padding: 16px 22px;
      bottom: 22px;
      width: 352px;
      height: 198px;
      right: -342px;
      background: #FFFFFF;
      box-shadow: 0px 2px 15px 0px rgba(0, 0, 0, 0.06);
      .title {
        display: inline-block;
        width: 68px;
        height: 22px;
        font-size: 16px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #333333;
        line-height: 22px;
        margin-right: 8px;
      }
      .expiration-tag {
        display: inline-block;
        width: 52px;
        height: 18px;
        background: #EEEEEE;
        border-radius: 2px;
        text-align: center;
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #999999;
        line-height: 17px;
      }
      &::before {
        position: absolute;
        content: "";
        width: 16px;
        height: 16px;
        left: -8px;
        top: 80%;
        border: 8px solid transparent;
        box-shadow: 0px 2px 15px 0px rgba(0, 0, 0, 0.06);
      }
      .content {
        margin-top: 24px;
        .widget {
          display: inline-block;
        }
        .lable {
          font-size: 14px;
          font-weight: 400;
          color: #999999;
          line-height: 22px;
        }
        .lable-text {
          margin-top: 4px;
          font-size: 16px;
          font-weight: 500;
          color: #333333;
          line-height: 22px;
        }
      }
    }
    .popover-show {
      display: block;
    }
  }
}

.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
  background: @active-color !important;
}
.ant-menu.ant-menu-dark,
.ant-menu-dark .ant-menu-sub,
.ant-menu.ant-menu-dark .ant-menu-sub {
  background: @menu-bakg !important;
}
.ant-menu-submenu-popup {
  left: 67px !important;
}
.ant-menu-submenu-popup > .ant-menu {
  background: @menu-bakg !important;
  color: #333;
  width: 132px;
  min-width: auto;
  li {
    width: calc(100% - 16px);
    padding-left: 20px;
    margin: 12px 8px !important;
    &:hover {
      background: #f3f6fa;
      border-radius: 2px;
      color: #333 !important;
    }
  }

  .ant-menu-item-selected {
    background: @active-color;
    color: #fff;
    &:hover {
      color: #fff !important;
    }
  }

  &:hover {
    .ant-menu-item-active {
      color: #fff;
    }
  }
}
