/*
 * Lead-form state styles for The Courtyard on Dauphin.
 *
 * The class names here are NOT branding — they are the contract that
 * renderVenueLeadFormScript() from @irbygroup/sites-core toggles at runtime
 * (`yh-field__control--error`, `yh-form__status.is-error/.is-success`). Renaming
 * them silently breaks validation feedback. Page layout/appearance still comes
 * from the per-page `lf__*` rules.
 */

.yh-form__honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.yh-field__error {
  display: block;
  min-height: 1em;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  color: #e2564d;
}

.yh-field__error:empty {
  min-height: 0;
  margin-top: 0;
}

/* Applied by the shared runtime to the offending control. */
.lf__field input.yh-field__control--error,
.lf__field select.yh-field__control--error,
.lf__field textarea.yh-field__control--error {
  border-color: #e2564d !important;
  background-color: rgba(226, 86, 77, 0.06) !important;
}

.lf__field input.yh-field__control--error:focus,
.lf__field select.yh-field__control--error:focus,
.lf__field textarea.yh-field__control--error:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(226, 86, 77, 0.25);
}

.yh-form__turnstile {
  margin: 4px 0 0;
}

.yh-form__turnstile:empty {
  margin: 0;
}

.yh-form__status {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 8px;
}

.yh-form__status:empty {
  margin: 0;
}

.yh-form__status.is-error {
  padding: 10px 14px;
  color: #8c2f28;
  background: rgba(226, 86, 77, 0.12);
  border: 1px solid rgba(226, 86, 77, 0.35);
}

.yh-form__status.is-success {
  padding: 10px 14px;
  color: #1f6b3a;
  background: rgba(31, 143, 72, 0.12);
  border: 1px solid rgba(31, 143, 72, 0.35);
}

/* The runtime unhides this wrapper when "Other" is selected. */
[data-other-event-field][hidden] {
  display: none !important;
}

button[type="submit"][disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Keyboard focus. The designer's CSS defines no :focus-visible anywhere, so
   keyboard users would get browser defaults (or nothing, where outline is
   reset). Scoped to :focus-visible so mouse users see no change. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #b8924a;
  outline-offset: 3px;
  border-radius: 2px;
}
