/* Footer — dark blue band with supporting links, the coat of arms and a
   copyright line. Markup: <footer class="govbb-footer"> wrapping
   <div class="govbb-width-container govbb-footer__inner"> holding a __nav
   with a semantic __list of __item > __link entries, a __divider <hr> (mobile
   only) and an __end column with the __coat image and __copy line. Two columns
   from the tablet breakpoint. */

.govbb-footer {
  /* dark band: links inside go white; hover is the teal tint with dark
     teal text, per the Figma links sheet (the link component reads these) */
  --govbb-link-color: currentcolor;
  --govbb-link-hover-color: var(--govbb-teal-ink);
  --govbb-link-hover-bg: var(--govbb-teal-10);

  overflow: hidden;
  color: var(--govbb-color-surface);
  background: var(--govbb-color-brand);
}

.govbb-footer__inner {
  display: grid;
}

.govbb-footer__nav {
  padding-block: var(--govbb-space-m);
}

/* Keep the nav itself as a stack for pre-links API markup, where FooterLink
   children were rendered directly inside it. The list repeats that layout for
   the canonical semantic markup. */
.govbb-footer__nav,
.govbb-footer__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--govbb-space-xs);
}

.govbb-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Footer links are .govbb-link (that class owns colour/underline/hover/focus);
   the footer only re-themes it via the --govbb-link-* variables above and sets
   the footer's own type size. */
.govbb-footer__link {
  font-size: var(--govbb-font-size-body);
  line-height: var(--govbb-line-height-base);
  overflow-wrap: anywhere;
}

.govbb-footer__divider {
  margin-block: 0;

  /* Full bleed: mirror the container's fluid gutter, not just its 16px
     minimum, so the rule reaches the viewport edge at every width. */
  margin-inline: calc(var(--govbb-page-gutter) * -1);
  border: 0;
  border-top: 4px solid
    color-mix(in srgb, var(--govbb-color-ink) 25%, transparent);
}

.govbb-footer__end {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--govbb-space-xm);
  padding-block: var(--govbb-space-m) var(--govbb-space-s);
}

.govbb-footer__end:only-child {
  grid-column: 1 / -1;
}

.govbb-footer__coat {
  display: block;
  width: auto;
  height: 7rem;
  user-select: none;
}

.govbb-footer__copy {
  margin: 0;
  font-size: var(--govbb-font-size-body);
  line-height: var(--govbb-line-height-base);
}

@media (--tablet) {
  .govbb-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .govbb-footer__nav {
    padding-bottom: 0;
  }

  .govbb-footer__end {
    align-items: flex-end;
    padding-block: var(--govbb-space-m);
  }

  .govbb-footer__divider {
    display: none;
  }
}
