/* ==========================================================================
   Fluent Forms → the design's form look (site/src/styles/components/forms.css).
   Hand-written for WordPress (not synced from site/). Fluent Forms' own
   stylesheets are switched off (inc/fluentforms.php), so everything the form
   needs is here. Spacing reproduces the design's fieldsets:
     legend (18px) + 6px → first row · rows 18px · between fieldsets 28px · before the
     send button 28px.
   ========================================================================== */

.fluentform fieldset { display: block; }
.fluentform fieldset > * { margin: 0 0 18px; }
.fluentform fieldset > :last-child { margin-bottom: 0; }

/* Fieldset headings (section breaks) → .form-legend */
.fluentform .ff-el-section-break { display: block; margin-bottom: 6px; } /* like a legend: the fieldset gap does not apply */
.fluentform .ff-el-section-break ~ .ff-el-section-break { margin-top: 28px; }
.fluentform .ff-el-section-title { margin: 0; font: 700 var(--fs-label)/1 var(--font); letter-spacing: .08em; color: var(--ink-2); }
.fluentform .ff-el-section-break hr,
.fluentform .ff-section_break_desk:empty { display: none; }

/* Two-column rows → .form-grid */
.fluentform .ff-t-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.fluentform .ff-t-cell { min-width: 0; }
.fluentform .ff-t-cell > .ff-el-group { margin: 0; }

/* Field: label above control, error below → .form-field / .form-label */
.fluentform .ff-el-group { display: flex; flex-direction: column; gap: 8px; }
.fluentform .ff-el-input--label label { display: block; font: 700 .8125rem/1 var(--font); letter-spacing: .06em; color: var(--text); }
.fluentform .ff-el-is-required.asterisk-right label::after { content: " *"; }
.fluentform .ff-el-input--content { display: flex; flex-direction: column; gap: 8px; }

/* Controls → .form-input / .form-select / .form-textarea */
.fluentform .ff-el-form-control {
  width: 100%; height: 52px;
  border: 1px solid var(--border); border-radius: 0; background: var(--white);
  padding: 0 16px;
  font: 400 1.0625rem/1 var(--font); color: var(--ink);
}
.fluentform select.ff-el-form-control { padding: 0 12px; }
.fluentform textarea.ff-el-form-control { height: auto; min-height: 140px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.fluentform .ff-el-is-error .ff-el-form-control { border-color: var(--red-dark); }
.fluentform .ff-el-form-control:focus { border-color: var(--ink); }

/* Errors → .form-error */
.fluentform .error.text-danger { margin: 0; font: 400 var(--fs-small)/1.3 var(--font); color: var(--red-dark); }

/* "What can we do for you?" → sub-legend + chips (.form-choices / .form-choice) */
.fluentform .form-choices { gap: 10px; }
.fluentform .form-choices .ff-el-input--label label { font-size: .8125rem; letter-spacing: .06em; color: var(--text); }
.fluentform .form-choices .ff-el-input--content { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.fluentform .form-choices .ff-el-form-check { margin: 0; }
.fluentform .form-choices .ff-el-form-check-label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 16px; border: 1px solid var(--border);
  background: var(--white); color: var(--ink);
  font: 700 var(--fs-small)/1 var(--font); cursor: pointer;
}
.fluentform .form-choices .ff-el-form-check-input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); cursor: pointer; }
.fluentform .form-choices .ff-el-form-check-label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--white); }

/* Consent → .form-check */
.fluentform .ff-el-tc { margin: 0; }
.fluentform .ff_tc_label { display: flex; gap: 12px; align-items: flex-start; font: 400 var(--fs-ui)/1.5 var(--font); color: var(--text); cursor: pointer; }
.fluentform .ff_tc_checkbox { flex-shrink: 0; display: flex; }
.fluentform .ff_tc_checkbox input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--red); cursor: pointer; }
.fluentform .ff_t_c a:hover { color: var(--red); }
/* Consent error sits under the consent text (checkbox 22px + gap 12px), 4px below it. */
.fluentform .ff-el-tc ~ .error.text-danger { margin-top: -4px; padding-left: 34px; }

/* Send row → .form-actions (button already carries .btn .form-submit) */
.fluentform .ff_submit_btn_wrapper { margin-top: 28px; flex-direction: row; flex-wrap: wrap; gap: 16px; align-items: center; }
.fluentform .ff-btn-submit { border-radius: 0; }
.fluentform .ff-btn-submit:disabled { opacity: .6; cursor: wait; }

/* Success message: Fluent Forms wraps the confirmation (which holds the
   design's .form-success markup) in .ff-message-success. */
.ff-message-success { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.ff-errors-in-stack:empty { display: none; }
.ff-errors-in-stack { margin-top: 16px; border-left: 4px solid var(--red); background: #fdf2f3; padding: 16px 20px; font: 400 var(--fs-ui)/1.5 var(--font); color: var(--ink); }
