/*
 * OAX datasheet guard — loaded ONLY on datasheet views and only when the FAJR Solar Kit plugin is active.
 * Purpose: the datasheet (assets/css/oax.css, PDF layout) must render exactly as before the plugin existed.
 * 1. Undo the plugin's global base rules inside .oax (kit.css section 1: heading font, dark colour-scheme).
 *    The plugin's theme.json layer is switched off on these pages in functions.php.
 * 2. Header / footer band around the sheet (outside .oax, does not touch the PDF layout).
 */

/* 1. Inside the sheet: same values the page had without the plugin. */
.oax { color-scheme: light; text-rendering: auto; }
.oax :where(h1, h2, h3, h4, h5, h6) { font-family: inherit; }
.oax ::selection { background: Highlight; color: HighlightText; }
/* Anchor targets from the header nav (#oax-ds-title, #oax-dg-title) stay visible below the sticky header. */
.oax [id] { scroll-margin-top: calc(var(--fajr-header-h, 86px) + 12px); }

/* 2. Header band: solid page-colour strip so the glass bar reads well above the white sheet in both modes. */
body.oax-ds-page { font-family: var(--font-body); color: var(--text); }
body.oax-ds-page .wp-block-template-part.oax-ds-header,
body.oax-ds-page .oax-ds-header { background: var(--bg); border-bottom: 1px solid var(--line); }
body.oax-ds-page .oax-ds-footer { background: var(--bg); margin-block-start: 0 !important; padding-top: var(--space-5); }
body.oax-ds-page .wp-site-blocks > .oax { margin-block-start: 0 !important; }
/* No backdrop-filter in the header/footer on datasheet pages: a backdrop filter anywhere on the page switches
   Chrome to a different text-rasterisation path and shifts the sheet's antialiasing (measured 1 % pixel diff).
   The header sits on the solid band above, so the blur adds nothing here. The open mobile menu keeps its blur. */
body.oax-ds-page :is(.oax-ds-header, .oax-ds-footer) *:not(.is-menu-open) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* Footer note "OAX batteries are available from FAJR" (plugin footer, oax brand) */
.fajr-footer__about.fajr-footer__from { margin-top: 8px !important; }
.fajr-footer__from a { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--energy) 70%, transparent); text-underline-offset: 3px; }
.fajr-footer__from a:hover { color: var(--energy-ink); }
