/**
 * Page chrome for FEAST membership pages.
 *
 * EVERYTHING here is scoped to body.feast-membership-page, added by
 * page-chrome.php. The stylesheet loads everywhere and does nothing unless that
 * class is present — so if titles are still showing, inspect <body>: if the
 * class is missing, detection is the problem, not the CSS.
 *
 * The components supply their own visible headings, so the theme's page title
 * is a visual duplicate. It is hidden VISUALLY RATHER THAN REMOVED:
 * display:none would drop it from the accessibility tree too, leaving these
 * pages with no <h1> at all. Screen readers and the document outline keep it.
 *
 * The title is rendered by the THEME, not the editor — so this has to cover
 * whichever is in play, independent of whether the page was built in Elementor
 * or Gutenberg:
 *   .entry-title / .page-header        → Hello Elementor, most classic themes
 *   .elementor-page-title              → Elementor's Page Title widget
 *   .elementor-widget-theme-page-title → Elementor Theme Builder
 *   .wp-block-post-title               → block themes (FSE) and the core
 *                                        Post Title block in any editor
 *
 * !important throughout: these are deliberate overrides of theme and builder
 * styles that may load after this file, not a specificity race.
 */

body.feast-membership-page .entry-title,
body.feast-membership-page .page-header .entry-title,
body.feast-membership-page h1.entry-title,
body.feast-membership-page .elementor-page-title,
body.feast-membership-page .elementor-widget-theme-page-title .elementor-heading-title,
body.feast-membership-page .wp-block-post-title,
body.feast-membership-page .page-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/**
 * With the title clipped out of the flow, its wrapper would still contribute
 * padding/margin and leave a gap above the content. Zero the spacing rather
 * than hiding the wrapper — hiding it would take the (still needed) heading
 * inside it out of the accessibility tree.
 */
body.feast-membership-page .page-header,
body.feast-membership-page .elementor-widget-theme-page-title {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/**
 * Keyboard focus must never land on something invisible with no way back.
 */
body.feast-membership-page .entry-title:focus,
body.feast-membership-page .entry-title:focus-within,
body.feast-membership-page .elementor-page-title:focus,
body.feast-membership-page .elementor-page-title:focus-within,
body.feast-membership-page .wp-block-post-title:focus,
body.feast-membership-page .wp-block-post-title:focus-within {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
}
