/* ==========================================================================
   Woodwright — Beaver Builder / Gravity Forms layer.
   assets/css/pages/*.css are generated from the Astro build and never edited; everything that
   adapts that design system to WordPress markup lives here.
   ========================================================================== */

/* ---------- BB Theme page shell: no chrome of its own ---------- */
.fl-page { overflow: visible; }
.fl-page, .fl-page-content, .fl-content, .fl-post, .fl-post-content { background: transparent; margin: 0; padding: 0; border: 0; box-shadow: none; }
.fl-content-full.container, .fl-content-full .row, .fl-content-full .fl-content { width: auto; max-width: none; margin: 0; padding: 0; display: block; }
.fl-post-header, .fl-post-meta { display: none; }

/* BB Theme's skip link (its skin CSS, which hid it, is dequeued): hidden until focused */
.fl-screen-reader-text { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.fl-screen-reader-text:focus { position: fixed; z-index: 100; top: 0.5rem; left: 0.5rem; width: auto; height: auto; clip-path: none; padding: 0.7rem 1rem; background: var(--cta); color: #0e0d0b; font-family: var(--font-mono); font-size: 0.8rem; }

/* ---------- Rows that hold WWD modules are layout-neutral ---------- */
.fl-builder-content .wwd-row > .fl-row-content-wrap { padding: 0; margin: 0; border: 0; min-height: 0; }
.fl-builder-content .wwd-row .fl-row-content,
.fl-builder-content .wwd-row .fl-col-group,
.fl-builder-content .wwd-row .fl-col,
.fl-builder-content .wwd-row .fl-col-content { max-width: none; margin: 0; padding: 0; float: none; width: auto; min-width: 0; }
.fl-builder-content .wwd-row .fl-col-content { display: block; }
.fl-builder-content .wwd-row .fl-col-group { display: block; }

/* ---------- Sticky headers ----------
   position:sticky sticks inside its parent, and BB wraps every module in row/column
   containers the height of the header. The OUTERMOST wrapper is what must stick. */
.fl-builder-content[data-type="header"] { position: sticky; top: 0; z-index: 50; }
.fl-builder-content[data-type="header"] .site-header { position: relative; }
.admin-bar .fl-builder-content[data-type="header"] { top: 32px; }
@media (max-width: 782px) { .admin-bar .fl-builder-content[data-type="header"] { top: 46px; } }
.fl-builder-content .wwd-row:has(.ww-header) { position: sticky; top: 0; z-index: 50; }
.admin-bar .fl-builder-content .wwd-row:has(.ww-header) { top: 32px; }
.fl-builder-content .wwd-row .ww-header { position: relative; }
/* the sticky header must not be hidden behind BB's own row stacking */
.fl-builder-content[data-type="header"] .fl-row, .fl-builder-content[data-type="header"] .fl-row-content-wrap { overflow: visible; }

/* ---------- Gravity Forms in the design system's form panels ---------- */
.wwd-gform .gform_wrapper, .wwd-gform:not(.wwd-gform--enquiry) form { margin: 0; } /* enquiry forms keep Astro's .ww-enquiry__form margin */
.wwd-gform .gform_heading { display: none; }
.wwd-gform .gform_fields { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; list-style: none; margin: 0; padding: 0; }
.wwd-gform legend.gfield_label { display: block; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; margin-bottom: 0.4rem; color: var(--ink-soft); padding: 0; }
.wwd-gform .gfield { min-width: 0; margin: 0; padding: 0; border: 0; }
.wwd-gform .gfield.full, .wwd-gform .gfield--width-full { grid-column: 1 / -1; }
@media (max-width: 40rem) { .wwd-gform .gform_fields { grid-template-columns: 1fr; } }
.wwd-gform .gfield_required { color: inherit; margin-left: 0.3em; }
.wwd-gform .gfield_required .gfield_required_text { display: none; }
.wwd-gform .ginput_container { margin: 0; }
.wwd-gform select { appearance: auto; }
.wwd-gform .gform_validation_container,
.wwd-gform .gfield_visibility_hidden,
.wwd-gform .gform_hidden,
.wwd-gform .gfield--type-honeypot { display: none !important; position: absolute !important; left: -9999px !important; }
.wwd-gform .gform_footer, .wwd-gform .gform-footer { margin-top: 1.2rem; padding: 0; }
.wwd-gform .gform_ajax_spinner, .wwd-gform .gform-loader { margin-left: 0.8rem; vertical-align: middle; }
.wwd-gform .gfield_description { font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.35rem; }
/* validation */
.wwd-gform .gform_validation_errors { grid-column: 1 / -1; border-left: 3px solid #b3261e; background: #fbeaea; padding: 0.8rem 1rem; margin-bottom: 1.2rem; }
.wwd-gform .gform_validation_errors h2, .wwd-gform .gform_submission_error { font-family: var(--font-body); font-size: var(--step--1); font-weight: 600; text-transform: none; letter-spacing: 0; color: #8c1d18; line-height: 1.4; }
.wwd-gform .gform_validation_errors ol { margin: 0.4rem 0 0 1.1rem; padding: 0; font-size: var(--step--1); }
.wwd-gform .gfield_error input, .wwd-gform .gfield_error textarea, .wwd-gform .gfield_error select { border-color: #b3261e; }
.wwd-gform .validation_message { color: #8c1d18; font-size: var(--step--1); margin-top: 0.35rem; }
/* confirmation */
.wwd-gform .gform_confirmation_message { font-size: var(--step-1); line-height: 1.45; }
/* Turnstile widget sits on its own line */
.wwd-gform .gfield--type-turnstile { grid-column: 1 / -1; }
/* landing-page form: the whole-width button (lp-form__btn) */
.lp-form .wwd-gform .gform_button { width: 100%; }

/* ---------- Landing-page enquiry (Enquiry.astro) as Gravity Forms ----------
   The <form> carries Astro's class ww-enquiry__form (inc/forms.php), so each page's own form CSS applies — the base
   grid (gap .8rem, margin-top 1.3rem) and variants such as the builders page's .wbi-form-column (gap .6rem). Gravity
   Forms' wrappers are flattened so the fields, the details disclosure, the button and the note are that grid's
   direct items, exactly as in Astro. Field look comes from .ww-field (campaign CSS). */
.wwd-gform--enquiry .gform-body, .wwd-gform--enquiry .gform_body, .wwd-gform--enquiry .gform_fields,
.wwd-gform--enquiry .gform_footer, .wwd-gform--enquiry .gform-footer { display: contents; }
.wwd-gform--enquiry .gform_footer .gform-loader, .wwd-gform--enquiry .gform_ajax_spinner { position: absolute; }
.wwd-gform--enquiry .ww-field .gfield_label { display: block; margin: 0; }
.wwd-gform--enquiry .ww-field .gfield_required { display: inline; margin: 0; }
.wwd-gform--enquiry .hidden_label > .gfield_label, .wwd-gform--enquiry .ww-more .gfield_label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wwd-gform--enquiry .ww-more .ginput_container { margin: 0; }
.wwd-gform--enquiry .gform_confirmation_message { font-size: inherit; line-height: inherit; }

/* ---------- Builder editing comforts (never on the public page) ---------- */
.fl-builder-edit .reveal { opacity: 1 !important; transform: none !important; }
.fl-builder-edit .wwd-empty { padding: 3rem var(--gutter); border: 2px dashed var(--line); text-align: center; font-family: var(--font-mono); }
