/* Overlay for the rebuilt Gravity Forms (see /assets/forms.js). The original Gravity Forms
   theme CSS still styles the fields; this only adds what the GF scripts used to provide. */

.amy-turnstile-slot:not(:empty) {
  margin: 0 0 16px;
  min-height: 65px;
}

.amy-form-status {
  margin: 12px 0 0;
  font-size: 0.95em;
  color: #333;
}
.amy-form-status[hidden] {
  display: none;
}

form[data-amy-form].amy-form--loading .gform_footer [type="submit"],
form[data-amy-form].amy-form--loading .gform-footer [type="submit"] {
  opacity: 0.6;
  cursor: progress;
}

/* Error banner (mirrors .gform_validation_errors from the Gravity Forms theme). */
form[data-amy-form] .amy-form-errors {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid #c02b0a;
  border-radius: 3px;
  background: #fff9f9;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
form[data-amy-form] .amy-form-errors:focus {
  outline: 2px solid #c02b0a;
  outline-offset: 2px;
}
form[data-amy-form] .amy-form-errors .gform_submission_error {
  margin: 0;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.4;
  color: #c02b0a;
}

/* Inline field errors. */
form[data-amy-form] .gfield_error .amy-field-error {
  margin-top: 6px;
  padding: 0;
  font-size: 0.9em;
  color: #c02b0a;
  background: none;
  border: 0;
}
form[data-amy-form] .gfield_error input:not([type="radio"]):not([type="checkbox"]),
form[data-amy-form] .gfield_error select,
form[data-amy-form] .gfield_error textarea {
  border-color: #c02b0a;
}
form[data-amy-form] .gfield_error legend,
form[data-amy-form] .gfield_error > .gfield_label {
  color: #c02b0a;
}

/* Confirmation (replaces the form inside #gform_wrapper_N). */
.gform_confirmation_wrapper {
  margin: 16px 0;
}
.gform_confirmation_wrapper .gform_confirmation_message {
  padding: 16px 20px;
  border-left: 4px solid #2e7d32;
  background: #f3f9f3;
  font-size: 1.05em;
  line-height: 1.5;
  color: #1b1b1b;
}
.gform_confirmation_wrapper .gform_confirmation_message:focus {
  outline: 2px solid #2e7d32;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .gform_confirmation_wrapper {
    animation: amy-fade-in 0.25s ease-out;
  }
  @keyframes amy-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* Date fields: the jQuery UI datepicker is gone (the importer strips its toggle button).
   Hide any calendar trigger that slips through so there is never a dead control. */
form[data-amy-form] .gform-datepicker-toggle,
form[data-amy-form] .ui-datepicker-trigger {
  display: none !important;
}

/* Survey Likert: cells are the click targets (see bindLikert in forms.js). */
form[data-amy-form] table.gsurvey-likert td.gsurvey-likert-choice {
  cursor: pointer;
}
form[data-amy-form] table.gsurvey-likert td.gsurvey-likert-choice.amy-likert-focus {
  outline: 2px solid #1a5fb4;
  outline-offset: -2px;
}
