/* The enquiry form (Fluent Forms) in the site's form style. Fluent's own
   stylesheet is off for it (inc/form.php); site.css styles .field, its label
   and its input, select and textarea, so this only lays out Fluent's markup.
   Matches the static form: two columns, one under 600px. */

.frm-fluent-form fieldset { display: grid; gap: 1.25rem; min-width: 0; }
.frm-fluent-form .ff-el-group { margin: 0; }
/* Fluent wraps the label and the input in a div each; without the wrappers
   they sit in .field's grid, as on the static form. */
.frm-fluent-form .field > .ff-el-input--label,
.frm-fluent-form .field > .ff-el-input--content { display: contents; }

/* Section headings, in place of the static form's legends: 1rem above the
   fields, and a fieldset's margin (.field-set) before the second one. */
.frm-fluent-form .form-legend { margin-bottom: -0.25rem; }
.frm-fluent-form .form-legend ~ .form-legend { margin-top: calc(clamp(1.75rem, 3vw, 2.5rem) - 1.25rem); }
.frm-fluent-form .form-legend .ff-el-section-title { margin: 0; font: 500 0.875rem/1.35 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; }
.frm-fluent-form .form-legend hr,
.frm-fluent-form .ff-section_break_desk:empty { display: none; }

/* Two fields side by side. */
.frm-fluent-form .ff-t-container { display: flex; gap: 1.25rem 1.5rem; }
.frm-fluent-form .ff-t-cell { flex: 1 1 0 !important; min-width: 0; }

.frm-fluent-form .ff-el-is-required label::after { content: " *"; color: var(--teal-ink); }

/* Errors, as .field .err on the static form. */
.frm-fluent-form .error { font-size: 0.9375rem; color: var(--error); }
.frm-fluent-form .ff-el-is-error .ff-el-form-control { border-color: var(--error); }

.frm-fluent-form .form-submit { margin-top: calc(clamp(1.75rem, 3vw, 2.5rem) - 1.25rem); }
.frm-fluent-form .ff-btn-submit:disabled { opacity: 0.7; cursor: progress; }

/* The thank-you, and errors that aren't about one field: as .form-status. */
.fluentform .ff-message-success,
.fluentform .ff-errors-in-stack:not(:empty) {
  margin-top: 1.5rem; padding: 1.25rem 1.4rem;
  border-left: 3px solid var(--teal-ink);
  background: var(--stone);
}
.fluentform .ff-message-success p { margin: 0; }
.fluentform .ff-errors-in-stack:not(:empty) { border-left-color: var(--error); }
.fluentform .ff-errors-in-stack .error { color: var(--ink); }

@media (max-width: 600px) {
  .frm-fluent-form .ff-t-container { flex-direction: column; }
  .frm-fluent-form .ff-t-cell { flex-basis: auto !important; }
}
