@header-height: 64px;
@menu-item-border: 2px;

#header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(240, 241, 242, 65);
  position: relative;
  z-index: 10;
  max-width: 100%;
  &.home-nav-bottom {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: #ebedee;
    .search {
      border-left-color: #ebedee;
    }
    a {
      color: @site-text-color;
    }
  }

  .header-link {
    color: @site-text-color;
  }

  .ant-menu-item-active .header-link {
    color: @primary-color;
  }
}

#logo {
  overflow: hidden;
  padding-left: 40px;
  float: left;
  height: @header-height;
  line-height: @header-height;
  text-decoration: none;
  white-space: nowrap;
  img {
    height: 32px;
    margin-right: 16px;
  }
  img + img {
    height: 16px;
    position: relative;
    top: 1px;
  }
}

#search-box {
  border-left: 1px solid @site-border-color-split;
  float: left;
  height: 22px;
  line-height: 22px;
  padding-left: 16px;
  margin: 22px auto 0;
}

#search-box .anticon {
  color: #ced4d9;
  position: relative;
  top: 0.5px;
}

#search-box input {
  font-size: 14px;
  margin-top: -5px;
  width: 200px;
  border: 0;
  box-shadow: none;
  background: transparent;

  &::placeholder {
    color: #a3b1bf;
  }
}

.header-lang-button,
.version {
  float: right;
  margin-top: 20px;
  margin-left: 16px;
}

.header-lang-button {
  color: @text-color;
  border-color: @border-color-base;
}

#nav {
  border: 0;
  float: right;
  font-size: 14px;
  font-family: Avenir, @font-family;
  font-variant: tabular-nums;
  &.ant-menu-horizontal {
    border-bottom: none;

    & > .ant-menu-item {
      height: @header-height;
      line-height: @header-height - @menu-item-border - 2px;
      min-width: 72px;
      border-top: @menu-item-border solid transparent;

      &:hover {
        border-top: @menu-item-border solid @primary-color;
        border-bottom: @menu-item-border solid transparent;
      }
    }

    & > .ant-menu-item-selected {
      border-top: @menu-item-border solid @primary-color;
      border-bottom: @menu-item-border solid transparent;
      a {
        color: @primary-color;
      }
    }
  }

  & > .ant-menu-item {
    text-align: center;
  }
}

.component-select {
  &.ant-select-dropdown {
    border: 0;
    border-radius: 0;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
    font-size: 14px;
  }
  .ant-select-dropdown-menu {
    max-height: 200px;
  }
  .ant-select-dropdown-menu-item {
    border-radius: 0 !important;
  }
  .ant-component-decs {
    font-size: 12px;
    position: absolute;
    color: #aaa;
    right: 16px;
  }
}

#github-btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-flow: nowrap;
  flex-flow: nowrap;
  height: auto;
  float: right;
  margin-top: 20px;
  margin-left: 16px;
  margin-right: 40px;
}
#github-btn .gh-btn {
  height: auto;
  padding: 1px 4px;
  background: transparent;
  border: 0;
}
#github-btn .gh-btn .gh-ico {
  width: 20px;
  height: 20px;
  margin: 0;
}
#github-btn .gh-btn .gh-text {
  display: none;
}
#github-btn .gh-count {
  height: auto;
  padding: 4px 8px;
  font-weight: normal;
  background: #fff;
}
#github-btn .gh-count:hover {
  color: #1890ff;
}
#github-btn.responsive-mode .gh-count {
  display: none !important;
}
.ant-row-rtl #github-btn .gh-count {
  display: none !important;
}

.github-btn {
  font: bold 11px/14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
  height: 20px;
  overflow: hidden;
}
.gh-btn,
.gh-count,
.gh-ico {
  float: left;
}
.gh-btn,
.gh-count {
  padding: 2px 5px 2px 4px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 3px;
}
.gh-btn {
  background-color: #eee;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0, #fcfcfc),
    to(#eee)
  );
  background-image: linear-gradient(to bottom, #fcfcfc 0, #eee 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#eeeeee', GradientType=0);
  background-repeat: no-repeat;
  border: 1px solid #d5d5d5;
}
.gh-btn:hover,
.gh-btn:focus {
  text-decoration: none;
  background-color: #ddd;
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #eee), to(#ddd));
  background-image: linear-gradient(to bottom, #eee 0, #ddd 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);
  border-color: #ccc;
}
.gh-btn:active {
  background-image: none;
  background-color: #dcdcdc;
  border-color: #b5b5b5;
  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}
.gh-ico {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjQwcHgiIGhlaWdodD0iNDBweCIgdmlld0JveD0iMTIgMTIgNDAgNDAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMTIgMTIgNDAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiMzMzMzMzMiIGQ9Ik0zMiAxMy40Yy0xMC41IDAtMTkgOC41LTE5IDE5YzAgOC40IDUuNSAxNS41IDEzIDE4YzEgMC4yIDEuMy0wLjQgMS4zLTAuOWMwLTAuNSAwLTEuNyAwLTMuMiBjLTUuMyAxLjEtNi40LTIuNi02LjQtMi42QzIwIDQxLjYgMTguOCA0MSAxOC44IDQxYy0xLjctMS4yIDAuMS0xLjEgMC4xLTEuMWMxLjkgMC4xIDIuOSAyIDIuOSAyYzEuNyAyLjkgNC41IDIuMSA1LjUgMS42IGMwLjItMS4yIDAuNy0yLjEgMS4yLTIuNmMtNC4yLTAuNS04LjctMi4xLTguNy05LjRjMC0yLjEgMC43LTMuNyAyLTUuMWMtMC4yLTAuNS0wLjgtMi40IDAuMi01YzAgMCAxLjYtMC41IDUuMiAyIGMxLjUtMC40IDMuMS0wLjcgNC44LTAuN2MxLjYgMCAzLjMgMC4yIDQuNyAwLjdjMy42LTIuNCA1LjItMiA1LjItMmMxIDIuNiAwLjQgNC42IDAuMiA1YzEuMiAxLjMgMiAzIDIgNS4xYzAgNy4zLTQuNSA4LjktOC43IDkuNCBjMC43IDAuNiAxLjMgMS43IDEuMyAzLjVjMCAyLjYgMCA0LjYgMCA1LjJjMCAwLjUgMC40IDEuMSAxLjMgMC45YzcuNS0yLjYgMTMtOS43IDEzLTE4LjFDNTEgMjEuOSA0Mi41IDEzLjQgMzIgMTMuNHoiLz48L3N2Zz4=');
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.gh-count {
  position: relative;
  display: none;
  /* hidden to start */
  margin-left: 4px;
  background-color: #fafafa;
  border: 1px solid #d4d4d4;
}
.gh-count:hover,
.gh-count:focus {
  color: #4183c4;
}
.gh-count:before,
.gh-count:after {
  content: '';
  position: absolute;
  display: inline-block;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.gh-count:before {
  top: 50%;
  left: -3px;
  margin-top: -4px;
  border-width: 4px 4px 4px 0;
  border-right-color: #fafafa;
}
.gh-count:after {
  top: 50%;
  left: -4px;
  z-index: -1;
  margin-top: -5px;
  border-width: 5px 5px 5px 0;
  border-right-color: #d4d4d4;
}
.github-btn-large {
  height: 30px;
}
.github-btn-large .gh-btn,
.github-btn-large .gh-count {
  padding: 3px 10px 3px 8px;
  font-size: 16px;
  line-height: 22px;
  border-radius: 4px;
}
.github-btn-large .gh-ico {
  width: 20px;
  height: 20px;
}
.github-btn-large .gh-count {
  margin-left: 6px;
}
.github-btn-large .gh-count:before {
  left: -5px;
  margin-top: -6px;
  border-width: 6px 6px 6px 0;
}
.github-btn-large .gh-count:after {
  left: -6px;
  margin-top: -7px;
  border-width: 7px 7px 7px 0;
}
