.nsw-skipto {
  @include font-stack;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;

  &__link {
    @include nsw-spacing(padding, xs md);
    @include z-index('middle');
    background-color: $nsw-primary-blue;
    color: $white;
    transform: translateY(-101%);
    display: block;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    text-decoration: none;

    &:focus,
    &:active {
      transform: translateY(0);
      outline: none;

      span {
        @include nsw-focus($color: $white);
      }
    }

    @include breakpoint('lg') {
      text-align: left;
    }
  }
}

.nsw-infobar,
.nsw-masthead {
  @include font-stack;
  @include nsw-spacing(padding, sm none);
  background-color: $nsw-primary-blue;
  color: $white;

  p {
    margin: 0;
    font-size: rem(12px);
  }
}

.nsw-header {
  background-color: $white;
  position: relative;
  border-bottom: solid 1px $light20;

  @include breakpoint('lg') {
    border-bottom: 0;
  }

  &__container {
    @include container;
    position: relative;
  }

  &__wrapper {
    @include nsw-spacing(padding, sm none);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    height: rem(72px);

    @include breakpoint('lg') {
      justify-content: unset;
      height: rem(94px);
    }
  }

  &__center {
    order: 2;

    @include breakpoint('lg') {
      order: 0;
    }
  }

  &__left {
    order: 1;
    margin-left: rem(-6px);
  }

  &__right {
    order: 3;
    margin-right: rem(-4px);

    @include breakpoint('lg') {
      margin-left: auto;
      margin-right: 0;
    }
  }

  &__logo-link {
    display: block;

    &:focus {
      @include nsw-focus;
    }
  }
}

.nsw-header__logo {
  width: rem(141px);
  height: rem(46px);

  @include breakpoint('lg') {
    width: rem(168px);
    height: rem(55px);
  }
}

.nsw-header-btn {
  @include border-radius;
  color: $nsw-primary-blue;
  width: rem(48px);
  height: rem(48px);
  background: none;
  border: 0;
  padding: 0;
  text-align: center;
  position: relative;

  &:hover {
    @include nsw-hover;
  }

  &:focus {
    @include nsw-focus;
  }

  &__icon {
    height: rem(16px);
    width: rem(16px);
    position: relative;
    top: 1px;
  }

  &__sub {
    @include font-stack('heading');
    font-size: rem(12px);
  }
}

.nsw-header-btn--menu {
  @include breakpoint('lg') {
    display: none;
  }
}

.nsw-header-btn--search {
  @include breakpoint('lg') {
    .nsw-header-btn__sub {
      @include sr-only;
    }

    .nsw-header-btn__icon {
      width: rem(24px);
      height: rem(24px);
    }
  }
}

.nsw-search {
  &__area {
    @include break-out(absolute);
    background: $light10;
    top: 0;

    @include breakpoint('lg') {
      @include break-out-reset;
      position: absolute;
      width: rem(394px);
      right: rem(16px);
      top: 50%;
      transform: translateY(-50%);
    }
  }

  &__input {
    @include font-stack;
    @include font-size('md');
    background: none;
    padding: rem(8px) rem(72px) rem(8px) rem(16px);
    color: $dark80;
    width: 100%;
    appearance: none;
    border: 0;
    height: rem(72px);

    &:focus {
      @include nsw-focus($offset: false);
    }

    @include breakpoint('lg') {
      @include nsw-spacing(padding, none md);
      @include border-radius;
      height: rem(50px);
      padding: 0 rem(16px);
    }
  }

  &__search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: rem(12px);
    width: rem(24px);
    height: rem(24px);
    display: none;

    @include breakpoint('lg') {
      display: inline-block;
    }
  }

  &__close-btn {
    width: rem(48px);
    height: rem(48px);
    background: none;
    border: 0;
    padding: 0;
    text-align: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: rem(16px);

    &:hover {
      @include nsw-hover;
    }

    &:focus {
      @include nsw-focus;
    }

    @include breakpoint('lg') {
      display: none;
    }
  }

  &__close-icon {
    width: rem(24px);
    height: rem(24px);
  }
}
