/* Rules the WordPress theme needs that the React build does not.

   tokens.css, themes.css, typography.css and global.css are regenerated from the React build by
   scripts/wordpress/export-content.mjs and must not be edited by hand. Anything WordPress-specific
   goes here instead, loaded last. */

/* Articles without a featured image — decision A5 (2026-10-03). The live posts mostly carry their
   picture inline in the body rather than as a featured image, so a card or article header would
   otherwise show an empty frame. A tinted block carrying the category fills the same box. */
.image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  padding: 1.5rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  font: 800 0.82rem/1.3 var(--font-display);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

/* WordPress core classes that reach article bodies through the block editor. */
.article-content .aligncenter { margin-inline: auto; }
.article-content .alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; }
.article-content .alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; }
.article-content .wp-block-image img,
.article-content img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The enquiry form, rendered by Contact Form 7 (inc/forms.php). Contact Form 7 wraps it in
   <div class="wpcf7">, which simply takes the grid cell the mockup's <form> takes, so the page layout
   and the homepage's slide-in are unchanged. The rules below cover only what Contact Form 7 adds. */

/* Contact Form 7 puts each control inside a <span>. In the mockup the control is itself the label's
   grid item, and so a block; inline inside the span it would sit on a text line and add a few pixels
   below every field. */
.contact-form .wpcf7-form-control-wrap { display: block; }
.contact-form .wpcf7-form-control-wrap > :is(input, select, textarea) { display: block; }

/* The consent box: Contact Form 7 nests its own <label> inside the acceptance field, so the
   mockup's .checkbox-field layout moves onto that label, and the general field-label rule is undone. */
.contact-form .checkbox-field > .wpcf7-form-control-wrap { flex: 1; }
.contact-form .checkbox-field .wpcf7-list-item { display: block; margin: 0; }
.contact-form .checkbox-field label { display: flex; align-items: flex-start; gap: 0.65rem; font-size: inherit; font-weight: inherit; }

/* Errors. Contact Form 7's own colour and wording; only spacing and shape follow the form. */
.contact-form .wpcf7-not-valid-tip { margin-top: 0.35rem; font-size: 0.78rem; }
/* An error under one field of a row makes that label taller; keep its neighbour's field level with it
   instead of letting the stretched label push it down. No effect while neither has an error. */
.contact-form .field-row > label { align-content: start; }
.contact-form .wpcf7-not-valid { border-color: #dc3232; }
.contact-form .wpcf7-response-output { margin: 0; padding: 0.75rem 0.9rem; border-radius: 0.6rem; font-size: 0.82rem; }

/* While sending: one click only. */
.contact-form.submitting .button { opacity: 0.6; pointer-events: none; }

/* Shown instead of the form when Contact Form 7 or the form is missing (template-parts/layout/contact-form.php). */
.contact-form-unavailable p { margin: 0; }

/* Logged-in users only. WordPress pins its admin bar to the top of the window (32px; 46px at 782px and
   narrower) and pushes the page down by the same amount, but the theme's header is fixed at the top
   too, so the admin bar covered the logo and left an empty strip under the header. Everything pinned to
   the top moves down by the bar's height. At 600px and narrower WordPress lets the bar scroll away; it
   is kept pinned there instead, so the header never has a gap above it. Visitors never see the bar, so
   none of this affects them. */
.admin-bar { --admin-bar: 32px; }
@media screen and (max-width: 782px) { .admin-bar { --admin-bar: 46px; } }
@media screen and (max-width: 600px) { .admin-bar #wpadminbar { position: fixed; } }
.admin-bar .site-header { top: var(--admin-bar); }
html:has(> body.admin-bar) { scroll-padding-top: calc(var(--header-height) + 1rem + 32px); }
.admin-bar :is(.process-layout, .faq-page-grid) aside { top: calc(var(--header-height) + 2rem + var(--admin-bar)); }
@media (max-width: 74rem) { .admin-bar .primary-navigation { inset: calc(var(--header-height) + var(--admin-bar)) 0 auto; max-height: calc(100vh - var(--header-height) - var(--admin-bar)); } }

/* Logged-in users only, while HostGator's coming-soon mode is on: The HostGator Plugin adds a "Site
   Preview - This site is NOT LIVE" bar at the top of the page. It sat behind the fixed header, so it
   could not be read, and it pushed the page down, leaving a gap under the header. The admin bar
   already says "Coming soon", so the bar is hidden. Visitors never get it. */
.nfd-site-preview-warning { display: none; }
