@import '~antd/lib/style/themes/default.less';
@import '../../../src/themeColor.less';

@nav-header-height: @layout-header-height;

.logo {
  height: 50px;
  position: relative;
  line-height: 50px;
  padding-left: (@menu-collapsed-width - 32px) / 2;
  transition: all 0.3s;
  background: #002140;
  overflow: hidden;

  img {
    display: inline-block;
    vertical-align: middle;
    height: 32px;
  }

  h1 {
    color: white;
    display: inline-block;
    vertical-align: middle;
    font-size: 20px;
    margin: 0 0 0 12px;
    font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
    font-weight: 600;
  }
}

:global {
  @keyframes slideLinkAni {
    0% {
      display: none;
    }
    99% {
      display: none;
    }
    100% {
      display: block;
    }
  }

  .custom_left_slide_class {
    position: relative;
  }

  .ant-layout-sider-collapsed {
    div[class*=slide_link_panel] {
      display: none;
      animation: none;
    }
  }
}

.slide_link_panel {
  position: absolute;
  left: 0;
  z-index: 9999;
  padding-left: 15px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  animation: slideLinkAni 4s 1;
  width: 150px;

  .link_title {
    color: #404040;
    font-size: 14px;
    font-family: PingFangSC-Medium, PingFang SC;
    margin-bottom: 15px;
  }

  ul {
    padding-bottom: 10px;

    li {
      margin-top: 10px;

      .left_icon {
        img {
          width: 14px;
        }
      }

      .right_label {
        color: #404040;
        font-size: 14px;
        margin-left: 8px;
        width: 105px;
        //white-space: nowrap;
        //overflow: hidden;
        //text-overflow: ellipsis;
        word-break: break-all;
      }
    }
  }
}

.sider {
  min-height: 100vh;
  position: relative;
  z-index: 10;

  .slide_link_panel {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 9999;
    background: #fff;
  }

  &.fixSiderbar {
    position: fixed;
    top: 50px;
    left: 0;

    :global(.ant-menu-root) {
      height: calc(100vh - 230px);
    }
  }

  &.light {
    box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
    background-color: white;

    .logo {
      background: white;
      box-shadow: 1px 1px 0 0 @border-color-split;

      h1 {
        color: @primary-color;
      }
    }

    :global(.ant-menu-light) {
      border-right-color: transparent;
    }
  }
}

.icon {
  width: 14px;
  margin-right: 10px;
}

:global {
  .ant-menu-item {
    padding-left: 30px !important;
  }

  .top-nav-menu li.ant-menu-item {
    height: @nav-header-height;
    line-height: @nav-header-height;
  }

  .drawer .drawer-content {
    background: #001529;
  }

  .ant-menu-inline-collapsed {
    & > .ant-menu-item .sider-menu-item-img + span,
    &
    > .ant-menu-item-group
    > .ant-menu-item-group-list
    > .ant-menu-item
    .sider-menu-item-img
    + span,
    & > .ant-menu-submenu > .ant-menu-submenu-title .sider-menu-item-img + span {
      max-width: 0;
      display: inline-block;
      opacity: 0;
    }
  }

  .ant-menu-item .sider-menu-item-img + span,
  .ant-menu-submenu-title .sider-menu-item-img + span {
    transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
    opacity: 1;
  }

  .ant-menu.ant-menu-dark .ant-menu-item-selected {
    background: @theme-light4Color !important;
  }

  .ant-menu-dark .ant-menu-item > a {
    color: #333 !important;
  }

  .ant-menu.ant-menu-dark .ant-menu-item-selected > a, .ant-menu.ant-menu-dark .ant-menu-item-selected > a:hover {
    color: @theme-color !important;
  }

  .ant-menu-dark .ant-menu-item-selected .anticon + span {
    color: @theme-color !important;
  }

  .ant-menu-dark {
    background: #fff;
  }

  .ant-menu-dark .ant-menu-inline.ant-menu-sub {
    background: #182037;
  }

  .ant-layout-sider {
    background: #fff !important;
  }
}

.left_nav {
  padding-left: 12px;
  margin-top: 15px;
  margin-bottom: 5px;

  .left_nav_top_icon {
    width: 60px;
    height: 60px;
    margin-right: 8px;
  }

  .left_nav_top_title {
    color: #333;
    font-size: 14px;
  }

  .left_nav_top_subtitle {
    color: #999;
    font-size: 14px;
    margin-top: 7px;
  }
}


