/**
 * WordPress-specific CSS overrides.
 * WordPress override styles for the theme.
 */

/* Reset WordPress default body margin; do NOT reset padding —
   site.css sets padding-top: 78px on .site for header spacing */
body.site {
    margin: 0;
}

/* ---------------------------------------------------------------
   WordPress Admin Bar Compensation
   WP admin bar is position: fixed, 32px tall (46px on mobile).
   The header is position: absolute; top: 0 — relative to the
   initial containing block (viewport). We must push it below
   the admin bar.
   WP core adds html { margin-top: 32px } which shifts the
   entire document down — so body padding stays at its original
   value (78px from site.css). We ONLY need to offset the
   absolutely-positioned header, since it ignores html margin.
   --------------------------------------------------------------- */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* Override WP block styles that interfere with theme */
.entry-content > *,
.wp-block-group,
.wp-block-columns {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Remove WP default figure margins */
figure.wp-block-image {
    margin: 0;
}

/* Ensure WP blocks don't add unexpected spacing */
.wp-block-separator {
    border: none;
}

/* Fix for WP adding side/bottom padding to body.
   Do NOT reset padding-top — site.css needs it for header spacing. */
body {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure the theme's visually-hidden class works properly */
.visually-hidden {
    position: absolute !important;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    word-wrap: normal;
}

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
    position: static !important;
    clip: auto;
    overflow: visible;
    width: auto;
    height: auto;
}

/* ---------------------------------------------------------------
   Fluent Forms — Contact form design
   Dark maroon (#790000) submit button, gold (#ae8637)
   accents, Playfair Display italic for inputs, acumin-pro-condensed
   uppercase for labels. Computed styles captured via Playwright.
   --------------------------------------------------------------- */

/* ---------------------------------------------------------------
   Formidable Forms — Contact form styling
   Replaces Fluent Forms CSS. Scoped to .contact wrapper.
   Works WITH Formidable's native 12-column grid system.
   --------------------------------------------------------------- */

/* Form wrapper in the contact section — reset text-align from section.contact center */
.contact .frm_forms {
    width: 100%;
    text-align: left;
}

/* Force form_fields wrapper to fill flex parent (Formidable's <form> is display:flex) */
.contact .frm_forms .frm_form_fields {
    width: 100%;
}

/* Let Formidable's grid handle the layout. Override clear:both which can interfere. */
.contact .frm_forms .frm_form_field {
    clear: none !important;
    margin-bottom: 5px;
}

/* Centered select dropdown — full grid row, centered via justify-self */
.contact .frm_forms .frm_form_field.gw-select-centered {
    grid-column: 1 / -1 !important;
    width: 300px;
    justify-self: center;
    margin-bottom: 20px;
    text-align: center;
}

/* Centered checkbox — full grid row, hide duplicate field label */
.contact .frm_forms .frm_form_field.gw-checkbox-centered {
    grid-column: 1 / -1 !important;
    margin: 0 0 25px;
    text-align: center;
}
.contact .frm_forms .frm_form_field.gw-checkbox-centered > .frm_primary_label {
    display: none;
}

/* Centered radio — full grid row */
.contact .frm_forms .frm_form_field.gw-radio-centered > .frm_primary_label {
    text-align: center;
    margin-bottom: 0;
}

.contact .frm_forms .frm_form_field.gw-radio-centered > .frm_opt_container {
    max-width: 110px;
    margin: 0 auto 20px;
}

.contact .frm_forms .frm_form_field.gw-radio-centered .frm_radio input[type="radio"]:not([disabled]):checked {
    border-color: #790000 !important;
}

.contact .frm_forms .frm_form_field.gw-radio-centered input:before {
    background-color: #790000;
}

/* Labels: uppercase, condensed font, LEFT-aligned */
.contact .frm_forms label,
.contact .frm_forms .frm_primary_label {
    font-family: acumin-pro-condensed, sans-serif !important;
    text-transform: uppercase;
    font-size: 14px !important;
    letter-spacing: 0.2px;
    color: #4f4e4e !important;
    font-weight: 400 !important;
    margin: 12.6px 0;
    line-height: 20px;
}

/* Centered labels for select & checkbox */
.contact .frm_forms .gw-select-centered label,
.contact .frm_forms .gw-checkbox-centered label {
    text-align: center;
}

/* Required asterisk: match Drupal's gray, not Formidable's red */
.contact .frm_forms .frm_required {
    color: #4f4e4e !important;
}

/* Inputs: serif italic (Playfair Display) */
.contact .frm_forms input[type="text"],
.contact .frm_forms input[type="email"],
.contact .frm_forms input[type="tel"],
.contact .frm_forms input[type="number"],
.contact .frm_forms textarea,
.contact .frm_forms select {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 16px;
    color: #000;
    border: 1px solid #e4e4e4;
    border-radius: 0;
    padding: 10px;
    width: 100%;
    height: 43px;
    box-sizing: border-box;
    background: #fff;
    -webkit-appearance: none;
    transition: border-color 0.2s;
}

.contact .frm_forms textarea {
    height: auto;
}

/* Select: uppercase text, match Drupal's 45px height */
.contact .frm_forms select {
    text-transform: uppercase;
    font-style: normal;
    height: 45px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Input placeholder color: gold (#ae8637) */
.contact .frm_forms input::placeholder,
.contact .frm_forms textarea::placeholder {
    color: #ae8637;
    font-style: italic;
}

.contact .frm_forms input[type="text"]:focus,
.contact .frm_forms input[type="email"]:focus,
.contact .frm_forms input[type="tel"]:focus,
.contact .frm_forms input[type="number"]:focus,
.contact .frm_forms textarea:focus,
.contact .frm_forms select:focus {
    /* border-color: #ae8637; */
    outline: none;
    box-shadow: none;
}

/* Submit button wrapper: full grid row, center the button */
.contact .frm_forms .frm_submit {
    grid-column: 1 / -1 !important;
    text-align: center;
    margin-top: 10px;
}

.contact .frm_forms button[type="submit"],
.contact .frm_forms .frm_button_submit {
    outline: 0;
    border: 2px solid #790000 !important;
    padding: 12px 45px 12px 18px !important;
    box-sizing: border-box;
    font-family: acumin-pro-condensed, sans-serif !important;
    text-transform: uppercase;
    max-width: 240px;
    text-align: left;
    width: 100%;
    position: relative;
    background: #790000 url(../images/icon-arrow-white.png) no-repeat 93% 50% !important;
    background-size: 22px auto !important;
    margin: 0 auto 30px;
    transition: 0.2s;
    -webkit-appearance: none;
    border-radius: 0 !important;
    font-size: 20px !important;
    color: #fff !important;
    cursor: pointer;
    letter-spacing: 0.2px;
    line-height: 20px;
}

.contact .frm_forms button[type="submit"]:hover,
.contact .frm_forms .frm_button_submit:hover {
    background: transparent url(../images/icon-arrow-red.png) no-repeat 93% 50% !important;
    background-size: 22px auto !important;
    color: #790000 !important;
}

/* Checkbox label: condensed uppercase centered */
.contact .frm_forms .frm_checkbox label,
.contact .frm_forms .frm_opt_container label {
    text-transform: uppercase;
    font-family: acumin-pro-condensed, sans-serif;
    font-style: normal;
    font-size: 14px;
    font-weight: 400;
    color: #4f4e4e;
    letter-spacing: 0.2px;
}

/* Consent disclaimer text */
.contact small {
    display: block;
    width: 100%;
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

/* Required asterisk color */
.contact .frm_forms .frm_blank_field input,
.contact .frm_forms .frm_blank_field textarea,
.contact .frm_forms .frm_blank_field select {
    border-color: #c00;
}

/* Hide Formidable's default error styling that conflicts */
.contact .frm_forms .frm_error_style {
    display: none;
}

/* Hide honeypot / verify fields from taking space in flex layout */
.contact .frm_forms .frm_form_field.frm_verify,
.contact .frm_forms .frm_form_field[style*="display:none"],
.contact .frm_forms .frm_form_field.frm_hidden {
    display: none !important;
}

/* Reset Formidable default box-shadow / styling */
.contact .frm_forms input,
.contact .frm_forms textarea,
.contact .frm_forms select {
    box-shadow: none !important;
}

/* Mobile: single column */
@media (max-width: 768px) {
    .contact .frm_forms .frm_form_field.frm_half {
        width: 100%;
        margin: 0 0 10px;
    }
}

/* ---------------------------------------------------------------
   Text alignment utility class — present in the original CMS
   globally but missing from WordPress. Used by homepage badge
   images and the "Download Here" button.
   --------------------------------------------------------------- */
.text-align-center {
    text-align: center;
}

/* ---------------------------------------------------------------
   Homepage badge images — WordPress wpautop wraps standalone
   images in <p> tags, breaking the direct-child selectors in
   site.css (.copy__wysiwyg > img). These rules replicate the
   same sizing for images inside <p> wrappers.
   Only needed for non-landing pages (landing pages use a PHP
   filter to strip <p> wrappers instead).
   --------------------------------------------------------------- */
.node-the-gatesworth .copy__wysiwyg > p > img {
    max-width: 225px;
    height: auto;
    width: 75%;
    margin: 0 auto;
    display: block;
}

.node-the-gatesworth .copy__wysiwyg > p > img.img-full-width {
    max-width: 630px;
    height: auto;
    width: 100%;
    margin: 0 auto;
}

@media screen and (max-width: 640px) {
    .node-the-gatesworth .copy__wysiwyg > p > img.img-full-width {
        width: calc(100% + 60px);
        margin-left: -30px;
    }
}

/* Button inside WYSIWYG content needs block display so that
   width / max-width / margin: 0 auto from site.css take effect */
.copy__wysiwyg a.button {
    display: block;
}

/* ---------------------------------------------------------------
   Banner Contact Form (Landing Pages) — Formidable Forms overrides
   Matches Drupal's compact field styling within #contact-form-banner.
   Scoped to #contact-form-banner so other forms are unaffected.
   --------------------------------------------------------------- */
#contact-form-banner .frm_form_field {
    margin-bottom: 0;
}

/* #contact-form-banner .frm_primary_label {
    margin: 0.9em 0 0.5em;
    font-size: 0.85em;
} */

#contact-form-banner input[type="text"],
#contact-form-banner input[type="email"],
#contact-form-banner input[type="tel"],
#contact-form-banner input[type="number"] {
    padding: 5px !important;
    height: auto;
    min-height: 0;
}

#contact-form-banner select {
    height: 35px;
    padding: 4px 16px !important;
}

#contact-form-banner textarea {
    padding: 5px !important;
    min-height: 60px;
}

#contact-form-banner .frm_submit {
    margin-top: 10px;
}

#contact-form-banner .frm_button_submit {
    padding: 8px 45px 8px 12px;
    font-size: 18px;
}

#contact-form-banner .frm_checkbox label {
    line-height: 1.2;
}
