/* ============================================================
   BFF · WP overrides — sits on top of styles.css
   Purpose:
   - Apply the Boxed container CSS variable behaviour
   - Tweak a handful of selectors to match WP-generated markup
     (wp_nav_menu, the_content wrappers, body classes)
   - Skip-link & screen-reader-text utilities (WP a11y conventions)
   ============================================================ */

/* ---------- Boxed container variant ---------- */
body.pd-boxed {
  --container-width: 1192px;
}
body.pd-boxed main .shell,
body.pd-boxed .pd-breadcrumb-bar .shell {
  max-width: var(--container-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.pd-boxed .location .shell {
  max-width: var(--container-width) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.pd-boxed .pd-hero-img {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- WP a11y ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); border: 0;
}
.skip-link {
  background: var(--orange);
  color: white;
  padding: 12px 16px;
  position: absolute; top: -100px; left: 16px;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------- the_content wrapper from page.php ----------
   When pages use BFF blocks exclusively, no wrapper is needed.
   When user mixes in native Gutenberg blocks, add sensible
   default spacing so paragraphs/images don't ride to the edge. */
.bff-content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.bff-content-wrap > p { font-size: 17px; line-height: 1.7; margin: 0 0 1em; color: var(--ink-2); }
.bff-content-wrap > h2 { font-family: 'Mulish', sans-serif; font-weight: 300; font-size: 36px; letter-spacing: -0.01em; color: var(--navy); margin: 48px 0 16px; }
.bff-content-wrap > h3 { font-family: 'Mulish', sans-serif; font-weight: 400; font-size: 24px; color: var(--navy); margin: 32px 0 12px; }
.bff-content-wrap > ul,
.bff-content-wrap > ol { padding-left: 24px; margin-bottom: 1em; }
.bff-content-wrap > figure { margin: 32px 0; }
.bff-content-wrap > figure img { width: 100%; height: auto; display: block; }
.bff-content-wrap > figure figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; font-family: 'JetBrains Mono', monospace; }

/* ---------- Native nav menu defaults (when no walker) ----------
   The BFF_Nav_Walker outputs flat <a> tags, but a fallback
   wp_nav_menu() could still emit <ul><li> — style them anyway. */
.nav-links ul { list-style: none; display: contents; }
.nav-links li { display: contents; }

/* ---------- Admin-bar offset ---------- */
body.admin-bar .nav { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .nav { top: 46px; }
}

/* ---------- Editor (Gutenberg) body class hook ----------
   Lets BFF blocks render with the same vars in the editor canvas. */
body.block-editor-page {
  --container-width: 1192px;
}
