/* ==========================================================================
   Fluent Forms — Ag360 form design
   --------------------------------------------------------------------------
   Fluent Forms ships a blue-accented default that reads as a third-party
   widget dropped into the page. This restates the site's own form rules —
   the ones .field, .form__grid and .btn already carry in ui.css — against
   Fluent Forms' class names, so a Fluent form is visually the same form the
   static site designed.

   Nothing here is new design. Every value is a token or a copy of an existing
   ui.css declaration; if a form rule changes there, change it here too.
   Loaded only on pages that render a form; see inc/forms.php.
   ========================================================================== */

.fluentform .ff-el-group {
  display: grid;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

/* Labels — .field label */
.fluentform .ff-el-input--label label {
  font-family: var(--font-body);
  font-size: var(--t-small);
  font-weight: 650;
  color: var(--ink);
  margin: 0;
}

.fluentform .ff-el-is-required.asterisk-right label:after,
.fluentform .ff-el-is-required.asterisk-left label:before {
  color: var(--green-text);
  font-weight: 650;
}

/* Controls — .field input, .field select, .field textarea */
.fluentform .ff-el-form-control {
  width: 100%;
  padding: 0.85rem 0.95rem;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(11, 20, 32, 0.3);
  border-radius: var(--radius-card);
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.fluentform textarea.ff-el-form-control {
  resize: vertical;
  min-height: 7rem;
}

.fluentform .ff-el-form-control::placeholder {
  color: #5A6A61;
  opacity: 1;
}

.fluentform .ff-el-form-control:focus,
.fluentform .ff-el-form-control:focus-visible {
  border-color: var(--ag-forest);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

/* Two-up rows — .form__grid */
.fluentform .ff-t-cell {
  padding-inline: 0;
}

.fluentform .ff-t-container {
  gap: var(--s-5);
}

/* Help and error text — .field__help, .field__error */
.fluentform .ff-el-help-message {
  font-size: var(--t-micro);
  color: #4A574F;
  margin: 0;
}

.fluentform .error.text-danger,
.fluentform .ff-el-is-error .error {
  font-size: var(--t-micro);
  color: #A3231B;
}

.fluentform .ff-el-is-error .ff-el-form-control {
  border-color: #A3231B;
}

/* Checkboxes and radios — .consent */
.fluentform .ff-el-form-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  align-items: start;
}

.fluentform .ff-el-form-check input[type="checkbox"],
.fluentform .ff-el-form-check input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.3rem 0 0;
  accent-color: var(--ag-forest);
}

.fluentform .ff-el-form-check label {
  font-size: var(--t-small);
  font-weight: 400;
  color: #3A4A41;
}

/* Submit — .btn.btn--primary.btn--wide, the pill the rest of the site uses */
.fluentform .ff-btn-submit,
.fluentform .ff_btn_style {
  width: 100%;
  padding: 0.95rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--ag-forest);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.fluentform .ff-btn-submit:hover,
.fluentform .ff_btn_style:hover {
  background: var(--green-text);
}

.fluentform .ff-btn-submit:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Messages — .form__note */
.ff-message-success,
.fluentform .ff-errors-in-stack {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  padding: var(--s-4);
  border-radius: var(--radius-card);
}

.ff-message-success {
  color: var(--green-text);
  background: rgba(72, 213, 134, 0.16);
  border: 1px solid rgba(0, 133, 64, 0.3);
}

.fluentform .ff-errors-in-stack {
  color: #A3231B;
  background: rgba(163, 35, 27, 0.08);
  border: 1px solid rgba(163, 35, 27, 0.3);
}

/* --------------------------------------------------------------------------
   The subscriber form sits in a light prose band rather than a card, and is
   one row: field then button. Scoped so it cannot reach the contact form.
   -------------------------------------------------------------------------- */
.ag360-subscribe .fluentform .ff-el-group:last-of-type,
.ag360-subscribe .fluentform .ff-el-group.ff-text-left {
  margin-bottom: 0;
}

@media (min-width: 620px) {
  .ag360-subscribe .fluentform form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--s-4);
    align-items: end;
  }

  .ag360-subscribe .fluentform .ff-btn-submit {
    width: auto;
  }
}
