/* ==========================================================================
   Unified form styling — Professional Wiki Help
   Loaded after style.css so these rules win without editing the 337KB theme.

   Built on the existing theme tokens: steel blue #4682B4 + Barlow.
   Covers all four site forms:
     1. .contact-form            contact page          (light surface)
     2. .header_signup_form      homepage header card  (light surface)
     3. .footer-form-new-box     homepage footer box   (blue surface)
     4. .christmas_popup_form    footer popup          (light surface)
   ========================================================================== */

:root {
    --pwh-blue: #4682b4;
    --pwh-blue-dark: #35648c;
    --pwh-blue-darker: #2a5170;
    --pwh-ink: #1d2b39;
    --pwh-muted: #8fa3b6;
    --pwh-field: #f6f9fc;
    --pwh-field-border: #dde6ef;
    --pwh-ring: rgba(70, 130, 180, .16);
    --pwh-radius: 10px;
    --pwh-field-h: 54px;
    --pwh-ease: cubic-bezier(.4, 0, .2, 1);
}

/* --------------------------------------------------------------------------
   1. Shared field reset
   -------------------------------------------------------------------------- */

.contact-form .form-group input,
.contact-form .form-group textarea,
.header_signup_form .field_text,
.footer-form-new-box input,
.footer-form-new-box textarea,
.christmas_popup_form_input {
    font-family: Barlow, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--pwh-ink);
    width: 100%;
    background-color: var(--pwh-field);
    border: 1.5px solid var(--pwh-field-border);
    border-radius: var(--pwh-radius);
    box-shadow: none;
    outline: none;
    transition: border-color .2s var(--pwh-ease),
                box-shadow .2s var(--pwh-ease),
                background-color .2s var(--pwh-ease);
    -webkit-appearance: none;
    appearance: none;
}

.contact-form .form-group input,
.header_signup_form .field_text,
.footer-form-new-box input,
.christmas_popup_form_input {
    height: var(--pwh-field-h);
    padding: 0 18px;
}

.contact-form .form-group textarea,
.footer-form-new-box textarea,
.christmas_popup_form_text_area,
.header_signup_form textarea.field_text {
    height: auto;
    min-height: 130px;
    padding: 16px 18px;
    line-height: 1.6;
    resize: vertical;
}

/* Placeholders — one weight and colour everywhere */
.contact-form ::placeholder,
.header_signup_form ::placeholder,
.footer-form-new-box ::placeholder,
.christmas_popup_form ::placeholder {
    color: var(--pwh-muted) !important;
    opacity: 1;
    font-weight: 400;
}

/* Focus: blue border plus a soft ring. Replaces the browser default outline. */
.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus,
.header_signup_form .field_text:focus,
.footer-form-new-box input:focus,
.footer-form-new-box textarea:focus,
.christmas_popup_form_input:focus {
    background-color: #fff;
    border-color: var(--pwh-blue);
    box-shadow: 0 0 0 4px var(--pwh-ring);
}

/* Phone fields use type="number"; hide the spinners so they read as text. */
.contact-form input[type=number],
.header_signup_form input[type=number],
.footer-form-new-box input[type=number] {
    -moz-appearance: textfield;
}

.contact-form input[type=number]::-webkit-outer-spin-button,
.contact-form input[type=number]::-webkit-inner-spin-button,
.header_signup_form input[type=number]::-webkit-outer-spin-button,
.header_signup_form input[type=number]::-webkit-inner-spin-button,
.footer-form-new-box input[type=number]::-webkit-outer-spin-button,
.footer-form-new-box input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Native validation feedback, only after the user has actually typed */
.contact-form input:not(:placeholder-shown):invalid,
.header_signup_form input:not(:placeholder-shown):invalid,
.footer-form-new-box input:not(:placeholder-shown):invalid,
.christmas_popup_form_input:not(:placeholder-shown):invalid {
    border-color: #e0645b;
}

.contact-form input:not(:placeholder-shown):invalid:focus,
.header_signup_form input:not(:placeholder-shown):invalid:focus,
.footer-form-new-box input:not(:placeholder-shown):invalid:focus,
.christmas_popup_form_input:not(:placeholder-shown):invalid:focus {
    box-shadow: 0 0 0 4px rgba(224, 100, 91, .14);
}

/* Keep Chrome's yellow autofill from breaking the palette */
.contact-form input:-webkit-autofill,
.header_signup_form input:-webkit-autofill,
.footer-form-new-box input:-webkit-autofill,
.christmas_popup_form_input:-webkit-autofill {
    -webkit-text-fill-color: var(--pwh-ink);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
}

/* --------------------------------------------------------------------------
   2. Buttons
   -------------------------------------------------------------------------- */

.contact-form .lab-btn,
.header_signup_form .lab-chatsn,
.footer-form-new-box button,
.submit-btn-christmas {
    font-family: Barlow, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: none;
    border-radius: var(--pwh-radius);
    cursor: pointer;
    transition: transform .2s var(--pwh-ease),
                box-shadow .2s var(--pwh-ease),
                background-color .2s var(--pwh-ease);
}

/* Blue buttons on light surfaces */
.contact-form .lab-btn,
.header_signup_form .lab-chatsn,
.submit-btn-christmas {
    background: var(--pwh-blue);
    color: #fff;
    box-shadow: 0 4px 14px rgba(70, 130, 180, .28);
}

.contact-form .lab-btn:hover,
.header_signup_form .lab-chatsn:hover,
.submit-btn-christmas:hover {
    background: var(--pwh-blue-dark);
    transform: translateY(-2px);
    /* overrides the stray orange glow .lab-btn:hover inherits from style.css */
    box-shadow: 0 8px 22px rgba(70, 130, 180, .38);
}

.contact-form .lab-btn:active,
.header_signup_form .lab-chatsn:active,
.submit-btn-christmas:active {
    transform: translateY(0);
    background: var(--pwh-blue-darker);
    box-shadow: 0 2px 8px rgba(70, 130, 180, .3);
}

/* Inverted button on the blue footer box */
.footer-form-new-box button {
    background: #fff;
    color: var(--pwh-blue-dark);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}

.footer-form-new-box button:hover {
    background: #f2f7fc;
    color: var(--pwh-blue-darker);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.footer-form-new-box button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

/* Visible keyboard focus for accessibility */
.contact-form .lab-btn:focus-visible,
.header_signup_form .lab-chatsn:focus-visible,
.footer-form-new-box button:focus-visible,
.submit-btn-christmas:focus-visible {
    outline: 3px solid var(--pwh-blue);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. Contact page form
   -------------------------------------------------------------------------- */

.contact-section .contact-form {
    max-width: 860px;
    margin: 0 auto;
    padding: 44px;
    background: #fff;
    border: 1px solid #eef3f8;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(29, 43, 57, .07);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

/* Two fields per row on desktop, minus the gap */
.contact-section .contact-form .form-group {
    width: calc(50% - 10px);
    margin-bottom: 0;
}

.contact-section .contact-form .form-group.w-100 {
    width: 100%;
}

.contact-section .contact-form .form-group button.lab-btn {
    height: 56px;
    min-width: 250px;
    padding: 0 40px;
}

/* --------------------------------------------------------------------------
   4. Homepage banner signup form

   The card was `background: #4682b417` — steel blue at 9% alpha, with no
   border, radius or shadow. Over a busy banner photo it read as a grey haze
   with no edge. It needs to be an opaque panel that sits ON the banner.
   -------------------------------------------------------------------------- */

.header_form {
    background: #fff;
    padding: 30px 28px 28px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 0 22px 55px rgba(20, 40, 60, .22),
                0 2px 6px rgba(20, 40, 60, .08);
}

/* Thin brand rule across the top edge — anchors the card to the theme.
   Rounded to match the card rather than clipped, so an absolutely
   positioned child like .big_sale is never cut off. */
.header_form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, var(--pwh-blue), #6ba3d0);
}

/* Headings: tighter, with a clear step down instead of two competing lines */
.header_form .formHeading-h2,
.header_form h2 {
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: -.01em;
    margin: 0 0 10px;
}

.header_form .formHeading-h2 span,
.header_form h2 span {
    font-size: 27px;
    display: inline-block;
    margin-top: 2px;
}

.header_form .formHeading-h5,
.header_form h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--pwh-ink);
    margin: 0 0 2px;
}

.header_form .formHeading-h6,
.header_form h6 {
    font-size: 14px;
    color: var(--pwh-muted);
    margin: 0 0 20px;
}

.header_signup_form .form-group {
    margin: 0 0 12px;
}

/* Slightly shorter than the page forms — four fields plus a button have to
   fit the banner without pushing it taller. */
.header_form .form-group input,
.header_signup_form .field_text {
    height: 50px;
}

/* Fields need more edge here: a white field on a white card disappears. */
.header_form .form-group input,
.header_form .form-group textarea,
.header_signup_form .field_text {
    background-color: #f2f7fb;
    border-color: #dbe6f0;
}

.header_form .form-group textarea,
.header_signup_form textarea.field_text {
    height: 96px;
    min-height: 96px;
    /* no drag handle in a fixed-height banner card */
    resize: none;
}

.header_signup_form .lab-chatsn {
    width: 100%;
    height: 52px;
    padding: 0 28px;
    margin: 6px 0 0 !important;
}

/* The hidden inputs nested inside this button must not affect its box */
.header_signup_form .lab-chatsn input[type=hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
   5. Homepage footer box (blue surface)
   -------------------------------------------------------------------------- */

.footer-form-new-box {
    width: 100%;
    max-width: 515px;
    height: auto;
    padding: 38px 34px;
    border-radius: 16px;
    background-color: var(--pwh-blue);
    box-shadow: 0 18px 46px rgba(42, 81, 112, .3);
}

.footer-form-new-box strong,
.footer-form-new-box h3 {
    display: block;
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.footer-form-new-box p {
    margin-bottom: 22px;
    opacity: .9;
    line-height: 1.6;
}

.footer-form-new-box input,
.footer-form-new-box textarea {
    margin: 0 0 14px;
    background-color: #fff;
    border-color: transparent;
}

.footer-form-new-box textarea {
    min-height: 110px;
}

.footer-form-new-box input:focus,
.footer-form-new-box textarea:focus {
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .3);
}

.footer-form-new-box button {
    width: 100%;
    height: 54px;
    padding: 0 42px;
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   6. Footer popup — retheme from the old red to steel blue
   -------------------------------------------------------------------------- */

.christmas_popup_form {
    width: 352px;
    height: auto;
    padding: 26px 24px;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(29, 43, 57, .25);
}

.christmas_popup_form .h3p,
.christmas_popup_form h3 {
    font-size: 24px;
    line-height: 1.25;
    margin: 0 0 16px;
}

.christmas_popup_form .h3p span,
.christmas_popup_form h3 span {
    color: var(--pwh-blue);
    font-size: 20px;
}

.christmas_popup_form .h3p small,
.christmas_popup_form h3 small {
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--pwh-muted);
    margin: 6px 0 0;
}

.christmas_popup_form .control-group {
    margin: 0 0 12px;
}

.christmas_popup_form_input {
    height: 48px;
}

.christmas_popup_form_text_area {
    height: 92px !important;
    min-height: 92px;
    font-size: 16px !important;
}

.submit-btn-christmas {
    width: 100%;
    height: 50px;
    display: block;
    margin: 14px 0 0;
}

/* Close button: match the theme instead of the old red */
.close_christmas {
    background: var(--pwh-blue);
    font-size: 22px;
    line-height: 36px;
    width: 36px;
    height: 36px;
    display: block;
    box-shadow: 0 4px 12px rgba(42, 81, 112, .35);
    transition: background-color .2s var(--pwh-ease), transform .2s var(--pwh-ease);
}

.close_christmas:hover {
    background: var(--pwh-blue-darker);
    transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .footer-form-new-box {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .contact-section .contact-form {
        padding: 26px 20px;
        gap: 16px;
        border-radius: 14px;
    }

    /* Single column — two-up fields are too cramped on phones */
    .contact-section .contact-form .form-group {
        width: 100%;
    }

    .contact-section .contact-form .form-group button.lab-btn {
        width: 100%;
        min-width: 0;
    }

    .footer-form-new-box {
        padding: 28px 20px;
    }

    .header_form {
        padding: 24px 20px 22px;
        border-radius: 14px;
    }

    .header_form::before {
        border-radius: 14px 14px 0 0;
    }

    .header_form .formHeading-h2,
    .header_form h2 {
        font-size: 21px;
    }

    .header_form .formHeading-h2 span,
    .header_form h2 span {
        font-size: 23px;
    }

    .footer-form-new-box strong,
    .footer-form-new-box h3 {
        font-size: 26px;
    }

    /* 16px keeps iOS Safari from zooming in on focus */
    .contact-form .form-group input,
    .contact-form .form-group textarea,
    .header_signup_form .field_text,
    .footer-form-new-box input,
    .footer-form-new-box textarea,
    .christmas_popup_form_input {
        font-size: 16px;
    }
}

@media (max-width: 575px) {
    .christmas_popup_form {
        width: 100%;
        max-width: 340px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-form .lab-btn,
    .header_signup_form .lab-chatsn,
    .footer-form-new-box button,
    .submit-btn-christmas,
    .close_christmas {
        transition: none;
    }

    .contact-form .lab-btn:hover,
    .header_signup_form .lab-chatsn:hover,
    .footer-form-new-box button:hover,
    .submit-btn-christmas:hover {
        transform: none;
    }

    .close_christmas:hover {
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   8. Footer box / contact card overlap

   .footer-form-new-list is absolutely positioned (right: 60px, 247px wide)
   inside .contact-left-col, so the three white cards deliberately sit ON TOP
   of the right edge of the blue box — a layered effect.

   The theme reserved room for them with padding: 25px 100px 25px 25px.
   Section 5 above replaced that with even padding, which pushed the fields
   under the cards. Restore the right gutter, but only at the widths where
   the cards actually overlap: at <=1200px responsive.css sets the list to
   position: unset and they flow inline instead.
   -------------------------------------------------------------------------- */

@media (min-width: 1201px) {
    .footer-form-new-box {
        padding: 38px 105px 38px 34px;
    }
}

/* Below the overlap breakpoint the box is free to use the full column */
@media (max-width: 1200px) {
    .footer-form-new-box {
        max-width: 100%;
        margin: 0 auto;
    }
}
