.nsw-footer {
  @include font-stack;
  @include nsw-spacing(margin-top, xxl);
  border-top: solid 1px $light40;

  hr {
    @include nsw-spacing(margin, md none md none);
    height: 1px;
    border: 0;
    color: $light40;
    background-color: $light40;
  }

  &__upper {
    @include nsw-spacing(padding-top, lg);
    background-color: $white;
  }

  &__lower {
    @include nsw-spacing(padding, md none lg none);
    background-color: $dark80;
    color: $white;
    font-size: rem(12px);

    a {
      color: $white;

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

  &__info {

    @include breakpoint('md') {
      display: flex;
      flex-wrap: nowrap;
    }
  }

  &__copyright {
    flex: 1 1 auto;
  }

  &__built {

    flex: 0 0 rem(200px);

    a:hover {
      text-decoration: none;
    }

    @include breakpoint('md') {
      text-align: right;
    }
  }
}

.nsw-footer-links {
  @include font-stack('heading');
  @include nsw-spacing(margin, md none none none);
  @include nsw-spacing(padding, none);
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  &__item {
    @include nsw-spacing(margin, none none md none);
    flex: 1 0 50%;
    max-width: 50%;

    @include breakpoint('md') {
      @include nsw-spacing(margin-right, lg);
      flex: 0 0 auto;
      max-width: none;
    }
  }

  &__link {
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }

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

.section-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  @include breakpoint('md') {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
  }

  a {
    color: $nsw-primary-blue;

    &:hover {
      //@include nsw-hover;
    }

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

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

  &__group {
    @include nsw-spacing(padding-bottom, lg);
    flex: 1 0 auto;
    min-width: rem(256px);
    max-width: 50%;

    @include breakpoint('md') {
      flex-basis: 50%;
      min-width: auto;
    }

    @include breakpoint('lg') {
      flex-basis: 25%;
    }
  }

  &__heading {
    @include nsw-spacing(margin, none);
    @include font-stack('heading');
    @include font-size('sm');
  }

  &__list {
    @include nsw-spacing(margin, none);
    @include nsw-spacing(padding, none);
    @include font-size('xs');
    list-style: none;
    margin-top: rem(4px);
  }

  &__item:not(:first-child) {
    @include nsw-spacing(margin-top, xs);
  }
}
