/*
 * A field's error message, hint and "optional" marker on the sign-in and
 * sign-up forms (includes/auth-form-keep.php, assets/js/form-errors.js).
 * Every theme's copy of those forms gets these classes, so the colours come
 * from tokens a theme can set: --px-error, --ink-soft.
 */
.px-field-error {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--px-error, #dc2626);
  overflow-wrap: anywhere;
}
.px-field-error[hidden] { display: none; }
.px-field-error a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.px-field-hint {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--ink-soft, #6b7280);
}
.px-optional {
  font-weight: 400;
  color: var(--ink-soft, #6b7280);
}
.px-form-summary {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--px-error, #dc2626);
  border-inline-start-width: 4px;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--px-error, #dc2626);
  background: color-mix(in srgb, var(--px-error, #dc2626) 6%, transparent);
}
.px-form-summary[hidden] { display: none; }
.px-form-summary:focus { outline: 2px solid var(--px-error, #dc2626); outline-offset: 2px; }
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--px-error, #dc2626) !important;
  box-shadow: 0 0 0 1px var(--px-error, #dc2626);
}
input[type="checkbox"][aria-invalid="true"] {
  outline: 2px solid var(--px-error, #dc2626);
  outline-offset: 2px;
  box-shadow: none;
}
form[aria-busy="true"] [type="submit"] { opacity: 0.7; cursor: progress; }

/* The pages set .dark on <html> from the visitor's choice or the system's. */
:where(html.dark) { --px-error: #f87171; }
