/* Contact Form 7 forms inside the design (see inc/forms.php). The form markup is the design's own
   (.form / .form__row / .field …); these rules only neutralise what Contact Form 7 adds around it. */

/* Contact Form 7 wraps the <form> in div.wpcf7 and every control in span.wpcf7-form-control-wrap.
   display: contents keeps the design's grids and flex columns exactly as with the static form. */
.wpcf7,
.wpcf7-form-control-wrap {
  display: contents;
}

/* Error under a field, and the field itself. */
.wpcf7-not-valid-tip {
  font-size: var(--fs-meta);
  line-height: 1.45;
  color: #ffb4a8;
}

.field .wpcf7-not-valid {
  border-color: #ff8f7d;
}

/* The message after sending: last item of the form, styled for the navy panels. */
.wpcf7 form .wpcf7-response-output {
  margin: 0;
  padding: 12px 14px;
  border-width: 1px;
  border-radius: var(--r-ctrl);
  font-size: var(--fs-meta);
  line-height: 1.45;
  color: var(--on-navy);
}

.newsletter__row .wpcf7-response-output {
  flex-basis: 100%;
}

/* While sending: the design's <button> stands in for Contact Form 7's submit input. */
.wpcf7 form.submitting button[type="submit"] {
  opacity: 0.6;
  pointer-events: none;
}

/* Privacy consent (Contact form): a custom checkbox for the navy panel, above the button.
   The text wraps beside the box; the box keeps a 44px touch target through the whole label. */
.form__consent label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--on-navy-mut);
}

.form__consent .wpcf7-list-item {
  display: block;
  margin: 0;
}

.form__consent input[type="checkbox"] {
  flex: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08) center / 14px 14px no-repeat;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.form__consent input[type="checkbox"]:hover {
  border-color: var(--white);
}

.form__consent input[type="checkbox"]:checked {
  border-color: var(--magenta);
  background-color: var(--magenta);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.form__consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.form__consent .wpcf7-not-valid input[type="checkbox"] {
  border-color: #ff8f7d;
}

.form__consent .wpcf7-not-valid-tip {
  display: block;
  margin: 6px 0 0 32px;
}

.form__consent + .form__foot {
  margin-top: 0;
}

/* Footer newsletter: the Subscribe button (btn--sm, 44px) and the email field (~51.6px from its text size)
   get the same height, so their edges line up. */
.newsletter__row .field input,
.newsletter__row .btn {
  height: 52px;
  min-height: 52px;
}
