@charset "utf-8";

/* -------------------------------------------------------------- */
/* header
/* -------------------------------------------------------------- */
.l-header {
  width: auto;
  height: auto;
  margin-bottom: 20px;
  &__inner {
    @include grid-row();
    position: relative;
  }
}
/**
 * site-branding
 */
.site-title {
  float: left;
  max-width: 80%;
  margin: 0;
  padding: 14px 36px 14px 14px;
  font-weight: bold;
  font-size: rem-calc(16);
  a {
    display: block;
    color: $colorBase;
    line-height: 1.2;
    &:hover {
      color: $colorLink;
    }
  }
}
.site-description {
  display: none;
}
/**
 * navigation
 */
.gnav {
  &__search {
    position: absolute;
    top: 0;
    right: 50px;
    margin-bottom: 0;
    // search form on header
    .search {
      &__form {
        margin-bottom: 0;
      }
      &__field {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
        padding-left: 42px;
        border: none;
        box-shadow: none;
        cursor: pointer;
        background-color: darken($colorBg, 5%);
        background-image: url($filePath + 'icon_search.png');
        background-position: center;
        background-repeat: no-repeat;
        background-size: 20px 20px;
        transition: width 400ms ease, background 400ms ease;
        &:focus  {
          width: 240px;
          padding-left: 30px;
          background-position: 6px center;
          background-repeat: no-repeat;
          background-size: 20px 20px;
          cursor: text;
          outline: 0;
        }
        @media #{$retina} {
          background-image: url($filePath + 'icon_search_2x.png');
          &:focus {
            background-image: url($filePath + 'icon_search_2x.png');
          }
        }
      }
      &__submit {
        display: none;
      }
    }
  }
  // toggle button global navigation
  &__trigger {
    display: inline-block;
    float: right;
    width: 50px;
    height: 50px;
    padding: 0;
    margin: 0;
    text-align: center;
    background-color: $colorBase;
    border-radius: 0;
    box-shadow: none;
    outline: 0;
    &:before {
      @include genericon('\f419');
      margin: 16px auto;
      color: #ffffff;
    }
    &:hover,
    &:focus {
      outline: 0;
      background-color: lighten($colorBase, 8%);
    }
  }
  // toggle sub menu
  &__arrowdown {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    &:before {
      @include genericon('\f431', 28px);
      text-align: center;
      margin: 11px auto;
      color: #ffffff;
    }
    &:hover,
    &:focus {
      outline: 0;
      background-color: lighten($colorBase, 8%);
    }
  }
  &__list {
    @extend %clearfix;
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 100%;
    margin: 0;
    background-color: $colorBase;
    z-index: 9999;
    &--active {
      display: block;
    }
    >li {
      &:first-child {
        border-top: none;
      }
    }
    li {
      position: relative;
      border-top: 1px dotted $colorSub;
      a {
        display: block;
        padding: 13px;
        color: #ffffff;
        font-weight: normal;
        text-transform: uppercase;
        letter-spacing: 1.2px;
      }
    }
  }
  // child menu
  .sub-menu {
    display: none;
    background-color: lighten($colorBase, 16%);
  }
}
/**
 * media queries
 */
@media #{$medium-up} {
  .l-header {
    margin-bottom: 40px;
  }
  .site-title {
    padding: 10px 20px 10px 14px;
    font-size: rem-calc(24);
  }
  .site-description {
    display: block;
    float: left;
    margin: 14px 0 12px 0;
    font-size: rem-calc(14);
  }
  .gnav {
    &__list {
      width: 40%;
    }
  }
}
