/*
 * RIT website forms - validation states only.
 * Nothing here changes the size, spacing, colours or layout of the existing fields;
 * it only adds a red outline to invalid fields and the small message under them.
 */

/* Invalid field: colour change only (box-shadow draws the line without changing the field size) */
.rit-invalid,
.rit-invalid:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px #dc2626 !important;
}

/* Message under the field */
.rit-field-error {
  display: block;
  margin-top: 6px;
  color: #dc2626;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

/* Message box at the top of the form (server errors, "please correct the fields", success) */
.rit-form-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
.rit-form-alert[hidden] { display: none !important; }
.rit-form-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.rit-form-alert--success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Button while sending */
form[data-rit-form] [type="submit"][aria-busy="true"],
form[data-rit-form] button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.75;
}

/* Hidden anti-spam field */
.rit-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
