.site-header-logo {
  font-size: 22px;

  .mega-octicon {
    padding-right: 5px;
  }

  @include breakpoint(lg) {
    float: left;
  }

  .logo {
    width: auto;
    height: 18px;
    overflow: visible !important; // overrides for descender characters to not get cut off by SVG frame.

    @include breakpoint(sm) {
      height: 22px;
      opacity: 0.9;
    }

    &:hover {
      opacity: 1;
    }

    path,
    ellipse {
      fill: $gray-8;
    }
  }
}

.menu {
  margin-top: $spacer-5;
  margin-bottom: 15px;
  list-style: none;
  background-color: $white !important;
  border: 1px solid $border-color !important;
  border-radius: $border-radius;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

// Site Header

.site-header {
  color: $jumbo-color;
  background-color: lighten($jumbo-bg-color, 2%);
  border-bottom: 1px solid $gray-1;
  border-bottom-color: darken($jumbo-bg-color, 8%);
  -webkit-font-smoothing: antialiased;
  padding-top: 25px;
  padding-bottom: 25px;
  padding-left: $spacer-3;
  padding-right: $spacer-3;
  text-align: center;

  a,
  button {
    color: inherit;
    transition: all 0.3s;

    &.active,
    &:hover {
      color: $jumbo-color-strong;
    }

    &:active {
      color: $jumbo-color-subtle;
    }
  }
}

.site-header-nav {
  margin-top: 20px;
  line-height: 2;

  @include breakpoint(lg) {
    float: right;
    margin-top: 0;
  }

  .mega-octicon {
    min-width: 32px; // stops jumping of the nav when loading the page
  }
}

.site-header-nav-item {
  font-size: 15px;
  border-bottom: 2px solid transparent;
  display: inline-block;

  + .site-header-nav-item {
    margin-left: 20px;
  }

  &.active,
  &:active,
  &:hover {
    border-bottom-color: $jumbo-color-strong;
    text-decoration: none;
  }

  &.octicon {
    border: none;
  }

  &.bordered {
    background-color: transparent;
    border: 1px solid $jumbo-color-strong;
    border-radius: 3px;
    padding: 0 7px;
    opacity: 0.7;
    font-size: 12px;
    line-height: 2;
    cursor: pointer;
  }
}

// Electron icon
.site-header-icon {
  width: 38px;
  height: 38px;
  vertical-align: middle;

  @include breakpoint(lg) {
    margin-top: -4px; // visually align
    margin-right: 0.4em;
  }

  .svg-fill {
    fill: currentColor;
  }

  .svg-stroke {
    stroke: currentColor;
    stroke-width: 1.2;
    stroke-linecap: round;
  }
}

// keep it centered a bit longer
@include breakpoint(md) {
  .site-header {
    text-align: center;
  }

  .site-header-logo,
  .site-header-nav {
    float: none;
  }
}

html[dir="ltr"] {
  .site-header-logo { @include breakpoint(lg) { float: left; } }
  .site-header-nav { @include breakpoint(lg) { float: right; } }
}

// swap logo and nav for right-to-left languages
html[dir="rtl"] {
  .site-header-logo { @include breakpoint(lg) { float: right; } }
  .site-header-nav { @include breakpoint(lg) { float: left; } }

  .site-header-nav-item {
    + .site-header-nav-item {
      margin-left: 0;
      margin-right: 20px;
    }
  }
}
