/* Contact form of the static site.
   1. What Gravity Forms' four stylesheets did for this form, and nothing more: the fields look as they did.
   2. The submit button, as the site's own stylesheet describes it (its rules were written for an <input>
      the form never had, so they never applied), with focus, sending and disabled states.
   3. New parts: the Turnstile widget, messages, the calendar of a date field, the hidden honeypot.
   The site's own form rules (in its custom CSS on every page) still apply and are not repeated here.
   Source: tools/static/contact/page/contact-form.css, copied by tools/static/transform.mjs, which leaves out the
   "@date" blocks on a site whose form has no date field and "@only <site>" blocks on the other site. */

/* ---------- 1. As Gravity Forms had it ---------- */
.contact-form .gfield { line-height: 16px; min-width: 0; }
.contact-form .gfield_label { margin-bottom: 8px; vertical-align: baseline; cursor: auto; }
.contact-form .gfield_contains_required .gform-field-label__text { padding-right: 6px; }
.contact-form .ginput_container input,
.contact-form .ginput_container select,
.contact-form .ginput_container textarea { display: block; -webkit-appearance: none; appearance: none; cursor: auto; }
.contact-form .ginput_container input,
.contact-form .ginput_container select { max-width: 100%; }
.contact-form .ginput_container textarea { resize: vertical; }
.contact-form .ginput_container select { white-space: normal; align-items: normal; }
/* A label the form keeps for screen readers only (the drop-down's). */
.contact-form .hidden_label .gfield_label { width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); }
/* ---------- 2. The submit button ---------- */
.contact-form--mati { --contact-accent: #efe7d2; --contact-link: var(--Mati-Gold, #B79562); }
.contact-form--evoo { --contact-accent: #B6C53F; --contact-link: #B6C53F; }
.contact-form .gform_footer { display: block; }
/* The icon the site draws on the button sits above it; clicks go through it to the button. */
.contact-form .gform_footer::before { pointer-events: none; z-index: 1; }
.contact-form .gform_footer button.gform_button {
  display: block; box-sizing: border-box; margin: 0; width: 100%; min-height: 46px;
  border: 1px solid; border-radius: 4px; padding: 14px 56px 14px 23px;
  font-family: "Inter", Sans-serif; font-size: 13px; font-weight: 400; line-height: normal;
  letter-spacing: 2.21px; text-transform: uppercase; text-align: center;
  cursor: pointer; transition: background-color 0.3s, color 0.3s, border-color 0.3s, opacity 0.3s;
  outline: none; box-shadow: none;
}
.contact-form--mati .gform_footer button.gform_button,
.contact-form--mati .gform_footer button.gform_button:focus { background-color: #FFE8E800; color: var(--e-global-color-text); border-color: currentColor; }
.contact-form--mati .gform_footer button.gform_button:hover,
.contact-form--mati .gform_footer button.gform_button:focus-visible { background-color: #efe7d2; color: var(--Mati-Gold, #B79562); }
.contact-form--evoo .gform_footer button.gform_button,
.contact-form--evoo .gform_footer button.gform_button:focus { background-color: #B6C53F; color: #000; border-color: currentColor; }
.contact-form--evoo .gform_footer button.gform_button:hover,
.contact-form--evoo .gform_footer button.gform_button:focus-visible { background-color: transparent; color: #B6C53F; border-color: #B6C53F; }
.contact-form .gform_footer button.gform_button:focus-visible { outline: 2px solid var(--contact-accent); outline-offset: 3px; }
/* Before the script is ready (or with JavaScript off) the button is disabled. */
.contact-form .gform_footer button.gform_button:disabled,
.contact-form .gform_footer button.gform_button:disabled:hover { opacity: 0.45; cursor: not-allowed; }
.contact-form--mati .gform_footer button.gform_button:disabled:hover { background-color: #FFE8E800; color: var(--e-global-color-text); }
.contact-form--evoo .gform_footer button.gform_button:disabled:hover { background-color: #B6C53F; color: #000; border-color: currentColor; }
/* Sending: the button keeps its resting colours whatever the pointer does, the label says so, the pointer
   waits, and a small ring in the label's colour turns where the icon was. */
.contact-form .gform_footer button.gform_button[data-state="sending"] { cursor: progress; opacity: 0.8; }
.contact-form--mati .gform_footer button.gform_button[data-state="sending"] { background-color: #FFE8E800; color: var(--e-global-color-text); border-color: currentColor; }
.contact-form--evoo .gform_footer button.gform_button[data-state="sending"] { background-color: #B6C53F; color: #000; border-color: currentColor; }
.contact-form .gform_footer:has(button[data-state="sending"])::before { opacity: 0; }
.contact-form .gform_footer:has(button[data-state="sending"])::after {
  content: ""; position: absolute; right: 28px; top: 16px; width: 14px; height: 14px; box-sizing: border-box;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; pointer-events: none;
  animation: contact-form-spin 0.8s linear infinite;
}
.contact-form--mati .gform_footer:has(button[data-state="sending"])::after { color: #efe7d2; }
.contact-form--evoo .gform_footer:has(button[data-state="sending"])::after { color: #000; }
@keyframes contact-form-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .contact-form .gform_footer:has(button[data-state="sending"])::after { animation: none; border-right-color: currentColor; } }

/* ---------- 3. New parts ---------- */
/* Turnstile: room for the widget is kept once the script runs; without JavaScript the row is not there. */
.contact-form .contact-form__turnstile { min-height: 65px; line-height: normal; }
.contact-form .contact-form__turnstile[data-size="compact"] { min-height: 140px; }
.contact-form:not(.contact-form--ready) .contact-form__turnstile { display: none; }
/* The honeypot: out of sight and out of the tab order; people never see it, form-filling robots do. */
.contact-form .contact-form__extra { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* The note for a script that never starts: no room taken and nothing for a screen reader while the page loads,
   shown 8 seconds after load if the script has still not started, gone as soon as it does. */
.contact-form .contact-form__status--fallback { visibility: hidden; margin-top: 0; max-height: 0; overflow: hidden; animation: contact-form-fallback 0s linear 8s forwards; }
@keyframes contact-form-fallback { to { visibility: visible; margin-top: 20px; max-height: 40em; } }
.contact-form--ready .contact-form__status--fallback { display: none; }

/* Messages: validation notes keep the site's own red; the failure and no-JavaScript notes are a quiet box. */
.contact-form .gfield.gfield_error .ginput_container + .validation_message { margin-top: 6px; }
.contact-form__status:empty { display: none; }
.contact-form__status { margin-top: 20px; }
.contact-form__message,
.contact-form__noscript {
  margin: 0; padding: 14px 18px; border: 1px solid rgba(239, 231, 210, 0.15); border-radius: 10px;
  color: var(--text-default, #EFE7D2); font-family: Inter, sans-serif; font-size: 16px; font-weight: 300; line-height: 1.6;
}
.contact-form__status--error .contact-form__message,
.contact-form__status--fallback .contact-form__message { border-color: rgba(255, 92, 92, 0.75); }
.contact-form__noscript { margin-top: 20px; }
.contact-form__message a,
.contact-form__noscript a { color: var(--contact-link); text-decoration: underline; text-underline-offset: 2px; }
.contact-form__message a:focus-visible,
.contact-form__noscript a:focus-visible { outline: 2px solid var(--contact-accent); outline-offset: 2px; }
.contact-form__confirmation .gform_confirmation_message:focus { outline: none; }

