/* In the site layer with main.css, so the links layer above both can revert to it. */
@layer site {
.contact-form { background-color: var(--form-bg); }
.contact-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--text);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin: 5px 0 20px 0;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background-color: var(--surface);
  color: var(--input-text);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  background-color: var(--input-focus-bg);
  border-color: var(--blue-600);
}
.contact-form input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  -webkit-text-fill-color: var(--input-text);
}
.contact-form ::placeholder {
  color: var(--placeholder);
  opacity: 1;
}
.hidden-field { display: none !important; }

.contact-required { font-weight: normal; color: var(--text-muted); }
/* An invalid field says so in text below it (linked by aria-describedby) and with a thicker border, not by colour alone. */
.contact-form [aria-invalid="true"] { border-color: var(--danger-border); border-width: 2px; margin-bottom: 6px; }
.contact-field-error {
  margin: 0 0 20px; padding: 6px 10px; border-radius: 4px; border-inline-start: 4px solid var(--danger-border);
  background-color: var(--danger-bg); color: var(--danger-text); font-size: 0.9rem;
}
.contact-field-hint { margin: -12px 0 20px; color: var(--text-muted); font-size: 0.875rem; }
.contact-field-error[hidden], .contact-field-hint[hidden] { display: none; }
.contact-form button + .contact-field-hint { margin: 8px 0 12px; }
.contact-check { margin: 20px 0 24px; }
.contact-check__label { margin: 0 0 6px; font-weight: bold; color: var(--text); }
.contact-check .contact-field-error { margin: 8px 0 0; }
.cf-turnstile { min-height: 65px; }
.contact-status:empty { display: none; }
.contact-status { margin: 12px 0; border-radius: 6px; }
.contact-status:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
.contact-status .contact-status__error {
  margin: 0; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--danger-border);
  background-color: var(--danger-bg); color: var(--danger-text);
}
.contact-form button[aria-disabled="true"] { opacity: 0.75; cursor: progress; }
.contact-privacy { margin: 16px 0 0; color: var(--text-muted); font-size: 0.875rem; }
/* The form's grey ground needs a darker link than the page's for 4.5:1. */
/* Underlined, so the link stands out from the muted notice text in both themes. */
.contact-form { --link-text: var(--focus); --link-hover-text: var(--focus); --link-line: underline; }
.contact-form a { color: var(--focus); text-decoration: underline; }

.contact-noscript-notice {
  margin: 1.5rem 0; padding: 1rem 1.25rem; border-radius: 6px;
  border: 1px solid var(--border-strong); background-color: var(--surface); color: var(--text);
}
.contact-noscript-notice h2 { margin-top: 0; font-size: 1.1rem; }
.contact-direct-links { margin-bottom: 0; }
.contact-direct-links a { display: inline-block; min-height: 24px; padding: 2px 0; }
.form-success-message {
  padding: 1rem 1.25rem; background: var(--success-bg);
  border-radius: 8px; color: var(--success-text);
}
.form-success-message h3 { margin: 0 0 0.25rem; font-size: 1.05rem; color: inherit; }
.form-success-message p { margin: 0; }
}
