/*!
 * contact-form.css — the only new UI the contact form needs: the explicit
 * hCaptcha widget, the submission status line and the honeypot. It is loaded
 * by every page that carries a contact form and deliberately reuses the
 * site's existing custom properties where they exist.
 */

form[data-contact-form] {
  position: relative;
}

/* --- hCaptcha ------------------------------------------------------------ */

form[data-contact-form] .h-captcha {
  margin: 0.25rem 0 0.5rem;
}

form[data-contact-form] .h-captcha-note {
  color: #b42318;
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0.4rem 0 0;
}

form[data-contact-form] .h-captcha-note[hidden] {
  display: none;
}

/* --- Honeypot ------------------------------------------------------------ */

.contact-honeypot {
  height: 1px;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

/* --- Status line --------------------------------------------------------- */

form[data-contact-form] .contact-form-status {
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
  min-height: 0.9rem;
}

form[data-contact-form] .contact-form-status:not(:empty) {
  margin-top: 0.8rem;
}

form[data-contact-form] .contact-form-status[data-state='pending'] {
  color: #475467;
}

form[data-contact-form] .contact-form-status[data-state='success'] {
  color: #067647;
}

form[data-contact-form] .contact-form-status[data-state='error'] {
  color: #b42318;
}

/* --- States -------------------------------------------------------------- */

form[data-contact-form] [aria-invalid='true'] {
  border-color: #b42318 !important;
}

form[data-contact-form] button[type='submit'][disabled] {
  cursor: progress;
  opacity: 0.72;
}

/* --- Visible keyboard focus ---------------------------------------------- */

form[data-contact-form] :is(input, select, textarea, button):focus-visible {
  outline: 3px solid var(--violet, #8a00e5);
  outline-offset: 2px;
}
