/* Contact Form 7 styling to match the site's existing Webflow form look.
   Owned by inc/forms.php (enqueued there). Do not put this in previvo-additions.css.

   The client's original bug report on /contact-us was fields getting visibly cut
   when focused. That traced to the intl-tel-input wrapper around the phone field on
   live clipping the input's focus ring. The CF7 fields below use plain inputs (no
   intl-tel-input) with box-sizing:border-box and an outline that stays inside the
   field's own box, plus overflow:visible on every ancestor, so focus can never clip. */

.wpcf7-form,
.wpcf7-form * {
    box-sizing: border-box;
}

.wpcf7 form.wpcf7-form {
    overflow: visible;
}

.form_component .wpcf7-form-control,
.form_component select.wpcf7-form-control,
.form_component textarea.wpcf7-form-control {
    width: 100%;
    line-height: 1.6; /* www.previvo.com measured 25.6px at 16px */
    padding: 0.9em 1em;
    overflow: visible;
}

.form_component .wpcf7-form-control:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.form_field-wrapper,
.form_component,
.form-wrapper {
    overflow: visible;
}

/* "How can we help" note field: hidden until "Other (Please specify)" is selected. */
.form_field-wrapper textarea.wpcf7-form-control[name="service_note"] {
    display: none;
}
.form_field-wrapper.previvo-show-note textarea.wpcf7-form-control[name="service_note"] {
    display: block;
}

/* Honeypot: visually hidden, still focusable-avoided, never clipped from tab order
   in a way that trips accessibility linters (off-screen, not display:none). */
.previvo-hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Waitlist CF7 form: reuse live's full-field ("new-waitlist-form") look. */
.waitlist_form-contain .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.waitlist_form-contain .wpcf7-form-control.waitlist_field {
    width: 100%;
}
.waitlist_form-contain input[type="submit"].waitlist_submit {
    cursor: pointer;
}

/* www.previvo.com measured the waitlist controls at 22.8571px (1.42857)
   for 16px text and the submit at 24px (1.5). */
input.email-text-field,
input.email-text-field.full-width.with-effects,
input.email-text-field.footer-fname,
input.email-text-field.footer-lname,
input.wpcf7-form-control.waitlist_field,
input.waitlist_field {
    line-height: 1.42857;
}
input[type="submit"].waitlist_submit {
    line-height: 1.5;
}

/* CF7's default response wrapper, restyled to match the site's own success/error
   message treatment instead of CF7's default look (its stylesheet is dequeued). */
.wpcf7-response-output {
    margin-top: 1rem;
    padding: .625rem 1.5rem;
    border-radius: 6.25rem;
    font-size: 0.9em;
}
/* Same tokens as production's .form_message-success / .form_message-error
   (www.previvo.com shared Webflow CSS). */
.wpcf7-mail-sent-ok {
    background-color: var(--_primitives---colors--green);
    color: var(--color-scheme-1--text-white);
    border: 0;
}
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng,
.wpcf7-spam-blocked {
    border: 1px solid var(--_primitives---colors--gray);
    color: var(--_primitives---colors--green);
    background-color: #9b755533;
}
.wpcf7-not-valid-tip {
    color: var(--_primitives---colors--green);
    font-size: 0.85em;
    margin-top: 0.25em;
}

/* Contact form layout (2026-10-03 mobile bug report: labels jammed against the field
   above, clipped Submit, doubled focus ring).
   Root cause: on www.previvo.com the field wrappers sit inside a Webflow .form_form
   grid (row-gap 1.5rem); the CF7 <form> doesn't carry that class, so the wrappers
   stacked with 0px between them. The Submit <input> is .submit-transparent-button
   (position:absolute; inset:0) inside a .button div that has no in-flow content,
   so the div collapsed to its own padding (34px) while the input needed 54px and
   its text was cut off. Scoped to CF7 forms that use .form_field-wrapper only. */
.wpcf7-form:has(.form_field-wrapper) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.5rem;
}
.wpcf7-form:has(.form_field-wrapper) > .wpcf7-response-output {
    margin-top: 0;
}
.wpcf7-form .form_field-wrapper > .form_field-label {
    display: block;
    margin-bottom: 0.5rem;
}
.wpcf7-form .form_field-wrapper > .wpcf7-form-control-wrap {
    display: block;
}

/* One focus ring: the site's brown outline (previvo-additions.css), without
   Webflow's dark border swap underneath it. */
.wpcf7-form .form_field-wrapper .form_input:focus,
.wpcf7-form .form_field-wrapper .form_input:focus-visible {
    border-color: #9b755533;
}

/* Submit: in-flow olive pill, same tokens as the site's green .button. */
.wpcf7-form .button.is-icon.is-relative:has(> .wpcf7-submit) {
    padding: 0;
    border-radius: 6.25rem;
    overflow: visible;
}
.wpcf7-form .button.is-icon.is-relative > input.wpcf7-submit.submit-transparent-button {
    position: static;
    inset: auto;
    display: block;
    width: 100%;
    min-height: 3rem;
    margin: 0;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: 6.25rem;
    background-color: transparent;
    color: var(--_primitives---colors--white);
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
}
.wpcf7-form .button.is-icon.is-relative > .wpcf7-spinner {
    position: absolute;
    right: 1rem;
    top: 50%;
    margin: -12px 0 0;
}
