@import "~antd/lib/style/themes/default.less";

.header {
  padding: 0 12px 0 0;
  background: #2b82d8;
  box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
  position: relative;
  height: 50px;
  line-height: 50px;
}

:global {
  .ant-layout {
    overflow-x: hidden;
  }
}

.logo {
  height: 64px;
  line-height: 58px;
  vertical-align: top;
  display: inline-block;
  padding: 0 0 0 24px;
  cursor: pointer;
  font-size: 20px;
  img {
    display: inline-block;
    vertical-align: middle;
  }
}

.menu {
  :global(.anticon) {
    margin-right: 8px;
  }
  :global(.ant-dropdown-menu-item) {
    width: 160px;
    span{
      text-overflow: ellipsis;
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }
    :global(.iconfont){
      width: auto;
      vertical-align: middle;
    }
    a{
      width: 100px;
    }
  }
}

i.trigger {
  font-size: 20px;
  line-height: 50px;
  cursor: pointer;
  transition: all .3s, padding 0s;
  padding: 0 24px;
  &:hover {
    background: @primary-1;
  }
}

.right {
  float: right;
  height: 100%;
  .action {
    cursor: pointer;
    overflow: hidden;
    padding: 0 12px;
    display: inline-block;
    transition: all .3s;
    height: 100%;
    color:#fff;
    > i {
      font-size: 16px;
      vertical-align: middle;
    }
    &:hover,
    &:global(.ant-popover-open) {
      // background: @primary-1;
      background: none;
    }
    &:hover{
      &:after{
        transform: rotate(180deg);
      }
    }
    &::after{
      transition:transform 0.3s;
      content:'\e7ca';
      font-family: "iconfont" !important;
      font-size: 16px;
      display: inline-block;
      transform: translateY(2px);
      margin-left: 6px;
    }
  }
  .action:first-child {
    max-width: 160px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .search {
    padding: 0;
    margin: 0 12px;
    &:hover {
      background: transparent;
    }
  }
  .account {
    .avatar {
      margin: 8px 8px 8px 0;
      color: @primary-color;
      background: rgba(255, 255, 255, .85);
      vertical-align: middle;
    }
  }
}

@media only screen and (max-width: @screen-md) {
  .header {
    :global(.ant-divider-vertical) {
      vertical-align: unset;
    }
    .name {
      display: none;
    }
    i.trigger {
      padding: 0 12px;
    }
    .logo {
      padding-right: 12px;
      position: relative;
    }
    .right {
      position: absolute;
      right: 12px;
      top: 0;
      background: #fff;
      .account {
        .avatar {
          margin-right: 0;
        }
      }
    }
  }
}

.bell{
  float: right;
  width: 40px;
  margin-top: 2px;
  text-align: center;
  position: relative;
  :global{
    .iconfont{
      color: #fff;
      font-size: 18px;
    }
  }
}
.num{
  background: #E52946;
  color: #fff;
  width: 20px;
  height: 20px;
  position: absolute;
  right: 0px;
  top:6px;
  border-radius: 50px;
  font-size: 12px;
  line-height: 20px;
}