/* Fluent Forms in the site's look (the plugin's own "default" style is switched off in functions.php;
   its small base stylesheet stays for columns, hidden fields and states). Any Fluent form gets this
   look: labels in Montserrat, soft inputs, checkboxes as chips, red submit button. */
.fluentform {
  --navy: #183B56; --navy2: #1F538A; --red: #D9230F; --red-h: #B81C0B; --muted: #5B6576;
  /* used by the plugin's base stylesheet (normally set by its default style) */
  --fluentform-danger: #B81C0B; --fluentform-primary: #1F538A;
  font-family: "Inter", system-ui, sans-serif; color: var(--navy);
}
.fluentform .ff-el-group { margin-bottom: 14px; }
.fluentform .ff-t-container { gap: 14px; }
.fluentform .ff-t-container .ff-t-cell { min-width: 0; }
.fluentform .ff-el-input--label { margin-bottom: 6px; }
.fluentform .ff-el-input--label label { display: block; margin: 0; color: var(--navy); font: 700 13px/1.4 "Montserrat", system-ui, sans-serif; }
.fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label::after { content: " *"; margin: 0; color: var(--red); }

.fluentform .ff-el-form-control {
  display: block; width: 100%; max-width: 100%; padding: 11px 13px; border: 1.5px solid #D2D9E2; border-radius: 10px; background: #FBFCFD;
  color: var(--navy); font: 15px/1.4 "Inter", system-ui, sans-serif; box-shadow: none; transition: border-color .2s, box-shadow .2s;
}
.fluentform .ff-el-form-control::placeholder { color: #8892A0; }
.fluentform .ff-el-form-control:focus { outline: none; border-color: var(--navy2); box-shadow: 0 0 0 3px rgba(31, 83, 138, .18); background: #fff; }
.fluentform textarea.ff-el-form-control { min-height: 84px; line-height: normal; resize: vertical; }

/* Checkboxes and radios as chips */
.fluentform .ff-el-input--content:has(> .ff-el-form-check) { display: flex; flex-wrap: wrap; gap: 8px; }
.fluentform .ff-el-form-check { display: flex; margin: 0; }
/* inline-flex drops the space Fluent puts between the hidden box and its text */
.fluentform .ff-el-form-check-label { position: relative; display: inline-flex; margin: 0; padding: 0; cursor: pointer; }
.fluentform .ff-el-form-check-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fluentform .ff-el-form-check-label > span {
  display: inline-block; padding: 8px 15px; border: 1.5px solid #D2D9E2; border-radius: 999px; background: #fff;
  color: var(--navy); font: 700 13px/1.4 "Montserrat", system-ui, sans-serif; transition: background .2s, border-color .2s, color .2s;
}
.fluentform .ff-el-form-check-input:checked + span { border-color: var(--navy2); background: #EAF0F7; color: var(--navy2); }
.fluentform .ff-el-form-check-input:checked + span::before { content: "✓ "; }
.fluentform .ff-el-form-check-input:focus-visible + span { outline: 3px solid rgba(31, 83, 138, .35); outline-offset: 2px; }

/* Errors and success */
.fluentform .ff-el-group.ff-el-is-error .ff-el-form-control { border-color: var(--red); }
.fluentform .ff-el-is-error .ff-el-form-check-label > span { border-color: var(--red); }
.fluentform .error.text-danger, .fluentform .ff-el-group.ff-el-is-error .text-danger { margin-top: 6px; color: var(--red-h); font: 600 13px/1.4 "Inter", system-ui, sans-serif; }
.ff-message-success { margin: 0; padding: 14px 16px; border: 0; border-radius: 12px; background: #E8F5EE; color: #1E6B45; font: 14px/1.5 "Inter", system-ui, sans-serif; box-shadow: none; }
.ff-message-success p { margin: 0; }
.ff-errors-in-stack { margin-top: 12px; color: var(--red-h); font-size: 13px; }

/* Submit: red button with 8px corners */
.fluentform .ff_submit_btn_wrapper { margin: 4px 0 0; }
.fluentform .ff-btn-submit, .fluentform .ff-btn-submit:not(.ff_btn_no_style) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 0; border-radius: 8px;
  background: var(--red); color: #fff; font: 700 14px/1 "Montserrat", system-ui, sans-serif; cursor: pointer; box-shadow: none; opacity: 1; transition: background .2s;
}
.fluentform .ff-btn-submit:is(:hover, :focus-visible) { background: var(--red-h); color: #fff; opacity: 1; }
.fluentform .ff-btn-submit:focus-visible { outline: 3px solid var(--navy2); outline-offset: 3px; }
.fluentform .ff-btn-submit:disabled { opacity: .6; cursor: default; }

@media (max-width: 640px) {
  .fluentform .ff-t-container { display: block; }
  .fluentform .ff-t-container .ff-t-cell { width: 100%; flex-basis: 100% !important; }
}

/* Dropdowns: the field look with a chevron */
.fluentform select.ff-el-form-control {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: #FBFCFD url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23183B56' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center / 16px;
}
.fluentform select.ff-el-form-control:focus { background-color: #fff; }
