/* Global footer */

#footer {
  background-color: $grey-8;
  border-top: 1px solid $grey-6;
  margin-top: 90px;

  .footer-wrapper {
    @include outer-block;
    padding-top: 20px;
    @include media(tablet) {
      padding-top: 60px;
    }
    background-color: $grey-8;
    margin: 0 auto;
  }

  a {
    color: $grey-3;

    &:hover {
      color: $grey-1;
    }
  }

  h2 {
    @include core-24;
    font-weight: bold;
    color: $grey-1;
    margin: 0;

    a {
      color: inherit;
    }
  }

  .footer-meta {
    @include inner-block;
    @extend %contain-floats;
    padding-bottom: 60px;
    clear: both;
    font-size: 0;
    color: $grey-3;

    .footer-meta-inner {
      display: inline-block;
      vertical-align: bottom;
      width: 100%;

      @include media(tablet) {
        width: 75%;
      }

      @include ie-lte(7) {
        float: left;
        display: block;
      }

      ul {
        @include core-16($line-height: (24/16), $line-height-640: (24/16));
        display: inline-block;
        list-style: none;
        margin: 0 0 1.5em 0;
        padding: 0;

        @include media(tablet) {
          margin: 0 0 1em 0;
        }

        li {
          display: inline-block;
          margin: 0 15px 0 0;

          @include ie-lte(7) {
            display: inline;
            margin-right: 0;
            padding-right: 15px;
          }
        }
      }

      .open-government-licence {
        clear: left;
        position: relative;

        @include media(tablet) {
          padding-left: 53px;
        }

        @include ie(6) {
          zoom: 1;
        }

        .logo {
          margin-bottom: 1em;
          padding-top: 0;
          @include media(tablet) {
            position: absolute;
            left: 0;
            top: 0;
            width: 41px;
            height: 100%;
          }

          a {
            display: block;
            width: 41px;
            height: 17px;
            overflow:hidden;
            text-indent: -999em;
            background: image-url("images/open-government-licence.png") 0 0 no-repeat;
            @include device-pixel-ratio() {
              background-image: image-url("images/open-government-licence_2x.png");
              background-size: 41px 17px;
            }
          }
        }

        p {
          @include core-16;
          margin: 0;
          padding-top: 0.1em;
        }
      }
    }

    .copyright {
      @include core-16;

      margin: 30px 0 0 0;
      width: 100%;
      display: block;

      @include media(tablet) {
        display: inline-block;
        text-align: inherit;
        width: 25%;
        padding-top: 15px;
        margin-top: 0;
      }

      @include ie-lte(7) {
        float: right;
        height: 150px;
        width: 24%;
      }

      a {
        display: block;

        background-image: image-url("images/govuk-crest.png");
        background-repeat: no-repeat;
        background-position: 50% 0%;

        @include media(tablet) {
          background-position: 100% 0%;
        }

        @include device-pixel-ratio() {
          background-image: image-url("images/govuk-crest-2x.png");
          background-size: 125px 102px;
        }

        @include ie(6) {
          background-image: image-url("images/govuk-crest-ie.png");
        }

        text-align: center;
        text-decoration: none;

        @include media(tablet) {
          text-align: right;
        }

        padding: 115px 0 0 0;

      }
    }
  }
}
