footer {
  .id7-site-footer .id7-site-footer-content, .id7-app-footer {
    .container-fluid((@grid-gutter-width * 2));
    position: relative;
    padding-top: var(--w-ref-gridGutterWidth);
    padding-bottom: var(--w-ref-gridGutterWidth);
  }

  .id7-app-footer {
    .crest-right;
    .small();

    background-color: black;
    &, :is(a, a:link, a:visited) {
      color: white;
      text-decoration-color: white;
    }

    .page-footer-elements {
      margin-top: 0;

      ul {
        margin: 0;
        padding-left: 0;
        list-style: none;
      }
    }

    .id7-footer-utility {
      & when (@id7-gen-layout = 2024) {
        padding-bottom: @grid-gutter-width;
      }

      & when (@id7-gen-logos >= 2025) {
        grid-row: 1;
        grid-column: 1 / span 2;
      }

      ul {
        .horizontal-utility-links(1em);
        flex-wrap: wrap;
      }
    }
  }



  & when (@id7-gen-logos > 2024) {
    // Crest
    .id7-app-footer-content {
      .crest-right(negative);
      &::before {
        grid-row: 1;
        grid-column: -1;
      }

      display: grid;
      grid: auto-flow / 1fr 1fr auto;
    }
  }

  // Footer styling elements - logo bleed and/or divider
  div:is(.id7-site-footer, .id7-app-footer) .id7-logo-bleed {
      // Not currently used, so hide.
      display: none;
  }

  @media print {
    &.id7-footer-coloured .id7-site-footer::before {
      border-top: 1px solid @text-color;
      display: block;
      margin-bottom: @grid-gutter-width;
    }

    .id7-site-footer::after {
      border-bottom: 1px solid @text-color;
      display: block;
      margin-top: @grid-gutter-width;
    }
  }
}

.id7-non-branded {
  .id7-page-footer {
    .id7-site-footer, .id7-app-footer {
      .id7-logo-bleed {
        display: none;

        + * {
          margin-top: 0;
        }
      }
    }
  }
  .id7-app-footer-content {
    background-image: none;
    padding-bottom: 0;
  }
}
