/* ==========================================================================
   fbl-footer.css — global footer layer (fbl-child)
   Source of truth: sites/vegan-recipe.net/design/ui-upgrade-blueprint.md
   §5.8 (footer) + §5.7 (mobile safe-area / jump-bar clearance).
   Owner: W6-footer. Enqueue: functions.php handle `fbl-footer`, dep `fbl-child`.
   Tokens come from style.css :root (gcid/gvid fallbacks) — no hardcoded hex,
   no font sizes outside the type scale, radii only 4/8/12/999.
   ========================================================================== */

/* --- shell -------------------------------------------------------------- */
.fbl-footer {
  border-top: 1px solid var(--border);
}

/* --- columns ------------------------------------------------------------ */
.fbl-footer .fbl-footer__col {
  margin-bottom: var(--fbl-space-24);
}

/* Column titles: Meta 14px uppercase +0.02em, --text-muted (blueprint 5.8) */
.fbl-footer .fbl-footer__col-title,
.fbl-footer .fbl-footer__col-title .et_pb_heading_title,
.fbl-footer .fbl-footer__col-title h3 {
  font-family: var(--fbl-font-body) !important;
  font-size: var(--fbl-fs-meta) !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  margin: 0 0 var(--fbl-space-16);
}

.fbl-footer .fbl-footer__about {
  font-family: var(--fbl-font-body) !important;
  font-size: var(--fbl-fs-body-small) !important;
  line-height: 1.6 !important;
  color: var(--text-muted) !important;
}

/* --- link lists (Categories / Explore) ---------------------------------- */
.fbl-footer .fbl-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fbl-footer .fbl-footer__links li {
  margin: 0;
}

/* Footer links: Body-small 16px --text, hover --accent-hover, tap >= 44px */
.fbl-footer .fbl-footer__links a,
.fbl-footer .fbl-footer__legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--fbl-font-body);
  color: var(--text);
  text-decoration: none;
  transition: color 150ms ease;
}

.fbl-footer .fbl-footer__links a {
  font-size: var(--fbl-fs-body-small);
  line-height: 1.6;
}

.fbl-footer .fbl-footer__links a:hover,
.fbl-footer .fbl-footer__links a:focus-visible,
.fbl-footer .fbl-footer__legal-links a:hover,
.fbl-footer .fbl-footer__legal-links a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fbl-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- legal row (single legal line + copyright, no duplicates) ----------- */
.fbl-footer .fbl-footer__legal {
  margin-top: var(--fbl-space-48);
}

.fbl-footer .fbl-footer__legal-col {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  padding-top: var(--fbl-space-32);
}

.fbl-footer .fbl-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--fbl-space-8);
  font-family: var(--fbl-font-body);
  font-size: var(--fbl-fs-meta);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.fbl-footer .fbl-footer__legal-label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--fbl-font-body);
  font-size: var(--fbl-fs-meta);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: var(--fbl-space-4);
}

.fbl-footer .fbl-footer__legal-links a {
  font-size: var(--fbl-fs-meta);
  letter-spacing: 0.02em;
}

.fbl-footer .fbl-footer__sep {
  color: var(--text-muted);
  user-select: none;
}

.fbl-footer .fbl-footer__copyright,
.fbl-footer .fbl-footer__disclaimer {
  font-family: var(--fbl-font-body);
  font-size: var(--fbl-fs-meta);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.fbl-footer .fbl-footer__copyright {
  margin: 0 0 var(--fbl-space-8);
}

.fbl-footer .fbl-footer__disclaimer {
  margin: var(--fbl-space-8) 0 0;
}

/* --- mobile 375: stack, tap targets, safe-area, jump-bar clearance ------ */
@media (max-width: 768px) {
  .fbl-footer .fbl-footer__col {
    margin-bottom: var(--fbl-space-32);
  }

  .fbl-footer .fbl-footer__sep {
    display: none;
  }

  .fbl-footer .fbl-footer__legal-links {
    gap: 0 var(--fbl-space-12);
  }

  /* bottom padding clears the iOS home indicator */
  .fbl-footer {
    padding-bottom: calc(var(--fbl-space-48) + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* single recipe: also clear the 56px sticky jump-bar (blueprint 5.7) */
  body.single-post .fbl-footer {
    padding-bottom: calc(var(--fbl-space-48) + 56px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* --- reduced motion (mandatory in every new CSS file, blueprint 6) ------ */
@media (prefers-reduced-motion: reduce) {
  .fbl-footer *,
  .fbl-footer *::before,
  .fbl-footer *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
