////
/// @group components
////

/// Site footer
/// @since 0.1.0
.site-footer {
  @include font-size(-1);
  background: $colour-panel-inverse;
  color: $colour-text-inverse;
  margin-top: em(32px);
  padding: em(32px 0);

  @media print {
    display: none;
  }

  a {
    color: $colour-text-inverse;

    &:focus {
      color: #000;
    }
  }

  p {
    @include font-size(-1);
  }

  &__logo {
    display: block;
    margin: em(0 0 32 0);
    text-decoration: none;

    .icon {
      font-size: rem(48px);
    }
  }

  &__services {
    margin: em(0 0 32 0);
  }

  &__social {
    clear: both;
    margin: em(0 0 32 0);
  }

  &__nav {
    clear: both;
    margin: em(0 0 32 0);
  }

  &__copyright {
    margin: 0;
    text-align: center;
  }

  @include mq($from: sm) {
    &__logo {
      float: left;
      margin: em(0 32 32 0);
    }

    &__services {
      float: left;
      margin: em(0 0 32 0);
    }

    &__social {
      clear: both;
    }

    &__copyright {
      text-align: left;
    }
  }

  @include mq($from: md) {

    &__social {
      clear: none;
      float: right;
    }
  }
}

/// Services list - ie.g. service icon and name.
/// Stacked on mobile, and side-by-side on larger screen widths
.services {

  &__list {
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
  }

  &__item {
    border-bottom: 1px solid $colour-border;

    &:first-child {
      border-top: 1px solid $colour-border;
    }

    a {
      @include font-size(-1);
      color: $colour-panel-default;
      display: block;
      padding: em(8 0);
      text-decoration: none;

      &:hover {
        color: $colour-text-inverse;
      }

      &:focus {
        color: $colour-text;
      }
    }

    .icon {
      @include font-size(1);
      display: inline-block;
      margin: em(0 4 0 0);
      vertical-align: middle;
    }
  }

  @include mq($from: sm) {

    &__item {
      border: 0;
      float: left;
      text-align: center;
      width: em(90px);

      &:first-child {
        border: 0;
      }

      a {
        padding: em(4px) 0 0;
      }
    }

    .icon {
      @include font-size(6);
      display: block;
      line-height: 1;
      margin: 0 auto em(4px);

      // The following is needed for IE8 to go centrally aligned
      &:before {
        text-align: center;
        width: 100%;
      }
    }
  }
}

/// List of social networks icons
.social-networks {

  &__heading {
    @include font-size(-1);
    display: inline-block;
    font-weight: normal;
    margin: em(0 8 0 0);
    padding: 0;
    vertical-align: top;
  }

  &__list {
    display: inline;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  &__item {
    display: inline-block;

    .icon {
      @include font-size(4);
      line-height: 1;
    }
  }

  a {
    display: block;
    padding: em(0 4);
    text-decoration: none;

    &:focus,
    &:active {
      color: $colour-text;
    }
  }
}

/// Footer navigation - list of links that stacks on mobile and is side-by-side on wider screen widths
.footer-nav {
  &__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  a {
    padding: em(4 0);
    text-decoration: none;
  }

  @include mq($from: sm) {
    &__list {
      line-height: 1;
    }

    &__item {
      border-left: 1px solid $colour-text-inverse;
      display: inline-block;
      line-height: 1;

      &:first-child {
        border-left: 0;

        a {
          padding-left: 0;
        }
      }
    }

    a {
      padding: em(0 8);
    }
  }
}
