/* The footer band (navy, white text), shared by the built-in footer and the block footer from
   Appearance > Footer (inc/footer.php). The editor loads this file for the footer entry with
   .site-footer mapped to its canvas and .site-footer__blocks to its block list, so keep every rule
   under one of those two. */
.site-footer {
  --footer-text: var(--wp--preset--color--brand-foreground);
  --footer-muted: color-mix(in srgb, var(--wp--preset--color--brand-foreground) 72%, transparent);
  --footer-line: color-mix(in srgb, var(--wp--preset--color--brand-foreground) 16%, transparent);
  background: var(--wp--preset--color--brand);
  color: var(--footer-text);
}

/* The logo is navy: on the navy band it sits on a small white tile. */
.site-footer .site-logo {
  color: var(--footer-text);
}

.site-footer .site-logo__image {
  box-sizing: content-box;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  background: var(--wp--preset--color--brand-foreground);
}

.site-footer .wp-block-resilious-logo {
  display: flex;
}

.site-footer :is(a, button):focus-visible {
  box-shadow: 0 0 0 3px var(--footer-muted);
}

/* Block footer: the client's blocks inside the container. Spacing comes from the styles below, not
   from the block gap, so it matches the built-in footer. */
.site-footer__blocks {
  padding-block: 3rem 1.25rem;
}

.site-footer__blocks > * {
  margin-block: 0;
}

.site-footer__blocks a:where(:not(.wp-element-button)) {
  color: inherit;
}

/* Group style "Footer: columns": first column twice as wide; add or remove columns freely. */
.site-footer .wp-block-group.is-style-footer-columns {
  display: grid;
  gap: 2.5rem;
  padding-block-end: 3rem;
}

.site-footer .wp-block-group.is-style-footer-columns > * {
  min-width: 0;
  margin: 0;
}

.site-footer .wp-block-group.is-style-footer-columns > * > * + * {
  margin-block-start: 0.75rem;
}

/* Group style "Footer: bottom row": divider on top, small muted text, two ends from 40rem. */
.site-footer .wp-block-group.is-style-footer-bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block-start: 1.25rem;
  color: var(--footer-muted);
  font-size: 0.75rem;
}

.site-footer .wp-block-group.is-style-footer-bottom::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  border-top: 1px solid var(--footer-line);
}

.site-footer .wp-block-group:is(.is-style-footer-bottom, .is-style-footer-meta) > * {
  margin: 0;
}

/* Group style "Footer: right-aligned": a stack that moves to the right end from 40rem. */
.site-footer .wp-block-group.is-style-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer .wp-block-heading.is-style-footer-heading {
  margin-block-end: 0;
  color: var(--footer-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  line-height: 1.5;
  text-transform: uppercase;
}

.site-footer .is-style-footer-text {
  max-width: 24rem;
  margin-block: 0;
  color: var(--footer-muted);
  font-size: 0.875rem;
}

.site-footer .is-style-footer-small {
  margin-block: 0;
  color: var(--footer-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.site-footer :is(.is-style-footer-small, .is-style-footer-text) a {
  transition: color 150ms ease;
}

.site-footer :is(.is-style-footer-small, .is-style-footer-text) a:hover {
  color: var(--footer-text);
}

/* Social Icons: plain muted icons, white on hover. */
.site-footer .wp-block-social-links {
  gap: 1rem;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.site-footer .wp-block-social-links .wp-block-social-link.wp-social-link {
  margin: 0;
  background: none;
  color: var(--footer-muted);
  transition: color 150ms ease;
}

.site-footer .wp-block-social-links .wp-block-social-link.wp-social-link:hover {
  color: var(--footer-text);
  transform: none;
}

.site-footer .wp-block-social-links .wp-block-social-link.wp-social-link :is(a, button) {
  padding: 0;
  color: inherit;
}

.site-footer .wp-block-social-links .wp-block-social-link.wp-social-link svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Editor only: an empty Menu block's note. */
.site-footer .footer-block-hint {
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.75rem;
  font-style: italic;
}

@media (min-width: 40rem) {
  .site-footer .wp-block-group.is-style-footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .site-footer .wp-block-group.is-style-footer-meta {
    align-items: flex-end;
    text-align: end;
  }
}

@media (min-width: 48rem) {
  .site-footer__blocks {
    padding-block-start: 4rem;
  }

  .site-footer .wp-block-group.is-style-footer-columns {
    grid-auto-flow: column;
    grid-template-columns: minmax(0, 2fr);
    grid-auto-columns: minmax(0, 1fr);
    padding-block-end: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer :is(.is-style-footer-small, .is-style-footer-text) a,
  .site-footer .wp-block-social-links .wp-block-social-link.wp-social-link {
    transition: none;
  }
}
