@import '../../style/themes/default';
@proPopover-prefix-cls: ~'@{ant-prefix}-pro-global-header';
.ant-pro-global-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.@{proPopover-prefix-cls} {
  height: 56px;
  padding: 0 12px 0 0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  position: relative;

  .ant-layout {
    min-height: 100vh;
    overflow-x: hidden;
  }
  .ant-layout-header {
    height: 56px;
    line-height: 1;

    .react-intl-lc {
      position: fixed;
      z-index: 999;
      right: 70px;
      top: 0px;
      color: #fff;
    }
  }
  .antd-header-logo-pic {
    display: inline-block;
    margin-right: 0px !important;
    margin-left: 54px !important;
    img {
      cursor: pointer;
      width: 40px;
      height: 40px;
      background-size: 100%;
      border-radius: 50px 50px 50px 50px;
    }
  }
  .ant-userinfo {
    display: flex;
    justify-content: center;
    margin-right: 20px;
    .username {
      border-left: none;
      color: #fff;
      padding-left: 10px;
      display: block;
      max-width: 188px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-weight: bold;
    }
  }
  .ant-top-handle {
    display: inline-block;
    width: 40px;
    height: 56px;
    margin: 0px 20px 0;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    i {
      display: block;
      color: #ff9500;
      line-height: 12px;
      position: absolute;
      right: 5px;
      top: 20px;
      font-size: 14px;
      font-weight: bold;
      font-style: normal;
      width: 8px;
      height: 8px;
      border-radius: 12px;
      background-color: #ff9500;
    }
  }
  .react-intl-lc {
    position: fixed;
    z-index: 999;
    right: 70px;
    top: 0px;
    color: #fff;
  }
  .antd-header-logo-pic {
    display: inline-block;
    margin-right: 0px !important;
    margin-left: 54px !important;
  }
  .ant-userinfo {
    margin-right: 20px !important;
  }
}

.logo {
  height: 56px;
  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 {
  .anticon {
    margin-right: 8px;
  }
  .ant-dropdown-menu-item {
    width: 160px;
  }
}

i.trigger {
  font-size: 20px;
  line-height: 64px;
  cursor: pointer;
  transition: all 0.3s, padding 0s;
  padding: 0 24px;
  &:hover {
    background: @primary-1;
  }
}

.right {
  float: right;
  height: 100%;
  .action {
    cursor: pointer;
    padding: 0 12px;
    display: inline-block;
    transition: all 0.3s;
    height: 100%;
    > i {
      font-size: 16px;
      vertical-align: middle;
      color: @text-color;
    }
    &:hover,
    &:global(.ant-popover-open) {
      background: @primary-1;
    }
  }
  .search {
    padding: 0;
    margin: 0 12px;
    &:hover {
      background: transparent;
    }
  }
  .account {
    .avatar {
      margin: 20px 8px 20px 0;
      color: @primary-color;
      background: rgba(255, 255, 255, 0.85);
      vertical-align: middle;
    }
  }
}

@media only screen and (max-width: @screen-md) {
  .@{proPopover-prefix-cls} {
    .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;
        }
      }
    }
  }
}
