/* ============================================================
   Skydive Tandem — Fluent Forms.
   Fluent Forms renders plain markup, so unlike the block areas
   of this theme its look has to come from CSS. Selectors carry
   .frm-fluent-form on purpose: it lifts them one class above
   the plugin's own .ff-default rules so they win regardless of
   stylesheet order.
   ============================================================ */

.fluentform{
  --sd-ff-line:var(--wp--preset--color--line, #e3e8f0);
  /* field outlines are UI components: they need 3:1 (WCAG 1.4.11), which line is not */
  --sd-ff-field:#7a879b;
  --sd-ff-line-hover:var(--wp--preset--color--slate, #516079);
  --sd-ff-focus:var(--wp--preset--color--navy, #243571);
  --sd-ff-focus-ring:rgba(36,53,113,.13);
  --sd-ff-danger:#d92d20;
  --sd-ff-radius:12px;
  --sd-ff-gap:22px;
  --sd-ff-body:'Open Sans', system-ui, sans-serif;

  /* remap the plugin's own tokens so rules we don't touch still follow the theme */
  --fluentform-primary:var(--sd-ff-focus);
  --fluentform-secondary:var(--wp--preset--color--slate, #516079);
  --fluentform-danger:var(--sd-ff-danger);
  --fluentform-border-color:var(--sd-ff-field);
  --fluentform-border-radius:var(--sd-ff-radius);
}

.fluentform{ font-family:var(--sd-ff-body); color:var(--wp--preset--color--ink, #0f1720); }
.fluentform .frm-fluent-form,
.fluentform .frm-fluent-form *{ box-sizing:border-box; }

/* ---------- groups + column containers ---------- */
.fluentform .frm-fluent-form .ff-el-group{ margin-bottom:var(--sd-ff-gap); }
.fluentform .frm-fluent-form .ff-el-group:last-child{ margin-bottom:0; }
.fluentform .frm-fluent-form .ff-t-container{ gap:20px; }
.fluentform .frm-fluent-form .ff-t-cell > .ff-el-group:last-child{ margin-bottom:var(--sd-ff-gap); }
/* the plugin bottom-aligns name/address cells, which drops a column out of line
   as soon as its neighbour grows an error message */
.fluentform .frm-fluent-form .ff-name-field-wrapper .ff-t-cell,
.fluentform .frm-fluent-form .ff-name-address-wrapper .ff-t-cell{ justify-content:flex-start; }

/* ---------- labels, help text, tooltip ---------- */
.fluentform .frm-fluent-form .ff-el-input--label{ margin-bottom:8px; }
.fluentform .frm-fluent-form .ff-el-input--label label{
  font:600 15px/1.4 var(--sd-ff-body);
  color:var(--wp--preset--color--ink, #0f1720);
  margin:0;
}
.fluentform .frm-fluent-form .ff-el-input--label.ff-el-is-required.asterisk-right label:after,
.fluentform .frm-fluent-form .ff-el-input--label.ff-el-is-required.asterisk-left label:before{
  color:var(--wp--preset--color--accent, #cf2e2e);
}
.fluentform .frm-fluent-form .ff-el-help-message{
  font:400 13px/1.55 var(--sd-ff-body);
  font-style:normal;
  color:var(--wp--preset--color--slate, #516079);
  margin-top:7px;
}
.fluentform .frm-fluent-form .ff-el-tooltip svg{ fill:var(--wp--preset--color--muted, #8794a8); }
.fluentform .frm-fluent-form .ff-el-tooltip:hover svg{ fill:var(--sd-ff-focus); }
.ff-el-pop-content{
  font:400 13px/1.5 'Open Sans', system-ui, sans-serif;
  background:var(--wp--preset--color--ink, #0f1720);
  border-radius:10px; padding:10px 13px; max-width:260px;
  box-shadow:0 10px 28px rgba(15,23,32,.22);
}

/* ---------- text inputs, textarea, select ---------- */
.fluentform .frm-fluent-form .ff-el-form-control{
  width:100%;
  padding:14px 16px;
  font:400 16px/1.5 var(--sd-ff-body);
  color:var(--wp--preset--color--ink, #0f1720);
  background:#fff;
  border:1.5px solid var(--sd-ff-field);
  border-radius:var(--sd-ff-radius);
  box-shadow:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.fluentform .frm-fluent-form .ff-el-form-control:hover:not(:focus):not(:disabled){
  border-color:var(--sd-ff-line-hover);
}
.fluentform .frm-fluent-form .ff-el-form-control:focus{
  border-color:var(--sd-ff-focus);
  box-shadow:0 0 0 3px var(--sd-ff-focus-ring);
  outline:none;
}
.fluentform .frm-fluent-form .ff-el-form-control::placeholder{
  color:var(--wp--preset--color--slate, #516079); opacity:1;
}
.fluentform .frm-fluent-form .ff-el-form-control:disabled,
.fluentform .frm-fluent-form .ff-el-form-control[readonly]:not(.ff-el-datepicker){
  background:var(--wp--preset--color--mist, #f6f8fb);
  color:var(--wp--preset--color--slate, #516079);
  cursor:not-allowed;
}
.fluentform .frm-fluent-form .ff-el-form-control:-webkit-autofill{
  -webkit-box-shadow:0 0 0 1000px #fff inset;
  -webkit-text-fill-color:var(--wp--preset--color--ink, #0f1720);
}

.fluentform .frm-fluent-form textarea.ff-el-form-control{
  min-height:150px; line-height:1.6; resize:vertical;
}

.fluentform .frm-fluent-form select.ff-el-form-control{
  height:auto; cursor:pointer;
}
.fluentform .frm-fluent-form select.ff-el-form-control:not([multiple]):not([size]){
  -webkit-appearance:none; appearance:none;
  padding-right:46px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpath d='M1.4 1.4 6.5 6.5l5.1-5.1' fill='none' stroke='%23516079' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 17px center;
}
.fluentform .frm-fluent-form select.ff-el-form-control[multiple]{
  min-height:150px; padding:10px;
}
.fluentform .frm-fluent-form select.ff-el-form-control[multiple] option{
  padding:8px 10px; border-radius:8px;
}

/* ---------- multi-select / searchable select (choices.js) ---------- */
.fluentform .frm-fluent-form .choices{ margin-bottom:0; }
.fluentform .frm-fluent-form .choices__inner{
  display:block;
  width:100%;
  min-height:54px;
  padding:8px 46px 8px 14px;
  font:400 16px/1.5 var(--sd-ff-body);
  color:var(--wp--preset--color--ink, #0f1720);
  background:#fff;
  border:1.5px solid var(--sd-ff-field);
  border-radius:var(--sd-ff-radius);
  overflow:visible;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.fluentform .frm-fluent-form .choices:hover .choices__inner{ border-color:var(--sd-ff-line-hover); }
.fluentform .frm-fluent-form .choices.is-focused .choices__inner,
.fluentform .frm-fluent-form .choices.is-open .choices__inner{
  border-color:var(--sd-ff-focus);
  border-radius:var(--sd-ff-radius);
  box-shadow:0 0 0 3px var(--sd-ff-focus-ring);
}
.fluentform .frm-fluent-form .choices__placeholder{
  color:var(--wp--preset--color--slate, #516079); opacity:1; font-size:16px;
}

/* dropdown indicator — same chevron as the native selects */
.fluentform .frm-fluent-form .choices[data-type*="select-one"]:after,
.fluentform .frm-fluent-form .choices[data-type*="select-multiple"]:after{
  content:"";
  width:13px; height:8px;
  right:17px; top:50%; margin-top:-4px;
  border:0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpath d='M1.4 1.4 6.5 6.5l5.1-5.1' fill='none' stroke='%23516079' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  transition:transform .18s ease;
}
.fluentform .frm-fluent-form .choices.is-open:after{ transform:rotate(180deg); }

/* selected values, rendered as pills */
.fluentform .frm-fluent-form .choices__list--multiple .choices__item{
  display:inline-flex; align-items:center; gap:6px;
  font:600 13px/1 var(--sd-ff-body);
  color:#fff;
  background-color:var(--sd-ff-focus);
  border:0; border-radius:100px;
  margin:3px 6px 3px 0;
  padding:8px 13px;
}
.fluentform .frm-fluent-form .choices__list--multiple .choices__item.is-highlighted{
  background-color:var(--wp--preset--color--accent, #cf2e2e); border:0;
}
.fluentform .frm-fluent-form .choices__list--multiple .choices__item[data-deletable]{ padding-right:10px; }
.fluentform .frm-fluent-form .choices__list--multiple .choices__button{
  width:9px; height:9px;
  margin:0 0 0 3px; padding:0;
  border-left:0;
  background-size:9px 9px;
  opacity:.7;
}
.fluentform .frm-fluent-form .choices__list--multiple .choices__button:hover{ opacity:1; }
.fluentform .frm-fluent-form .choices[data-type*="select-multiple"] .choices__input{
  width:auto; min-width:120px; max-width:100%;
  padding:5px 0;
  font:400 16px/1.5 var(--sd-ff-body);
}
.fluentform .frm-fluent-form .choices__list--single{ padding:0; }
.fluentform .frm-fluent-form .choices__list--single .choices__item{ font-size:16px; line-height:1.5; }

/* search box inside the dropdown */
.fluentform .frm-fluent-form .choices[data-type*="select-one"] .choices__input{
  margin:10px !important;
  width:calc(100% - 20px);
  padding:10px 13px;
  font:400 15px/1.4 var(--sd-ff-body);
  border:1.5px solid var(--sd-ff-field) !important;
  border-radius:10px;
}
.fluentform .frm-fluent-form .choices[data-type*="select-one"] .choices__input:focus{
  border-color:var(--sd-ff-focus) !important;
}

.fluentform .frm-fluent-form .choices__list--dropdown{
  margin-top:6px;
  border:1.5px solid var(--sd-ff-line);
  border-radius:var(--sd-ff-radius);
  box-shadow:0 14px 40px rgba(15,23,32,.14);
  overflow:hidden;
}
.fluentform .frm-fluent-form .choices__list--dropdown .choices__item{
  min-height:0;
  padding:12px 16px;
  font:400 15px/1.45 var(--sd-ff-body);
  color:var(--wp--preset--color--ink, #0f1720);
}
.fluentform .frm-fluent-form .choices__list--dropdown .choices__item--selectable{ padding-right:16px; }
.fluentform .frm-fluent-form .choices__list--dropdown .choices__item--selectable:after{ display:none; }
.fluentform .frm-fluent-form .choices__list--dropdown .choices__item--selectable.is-highlighted{
  background-color:var(--wp--preset--color--iceblue, #eaf2fb);
}

/* ---------- checkboxes + radios ---------- */
.fluentform .frm-fluent-form .ff-el-form-check{ margin-bottom:11px; }
.fluentform .frm-fluent-form .ff-el-form-check:last-child{ margin-bottom:0; }
.fluentform .frm-fluent-form .ff-el-form-check label.ff-el-form-check-label:not(.ff_tc_label){
  display:flex; align-items:flex-start; gap:11px;
  margin:0;
  font:400 16px/1.5 var(--sd-ff-body);
  color:var(--wp--preset--color--ink, #0f1720);
  cursor:pointer;
}
.fluentform .frm-fluent-form .ff-el-form-check-label .ff-el-form-check-input{
  flex:0 0 auto;
  width:19px; height:19px;
  margin:2px 0 0;
  position:static; top:auto;
  accent-color:var(--wp--preset--color--accent, #cf2e2e);
  cursor:pointer;
}
.fluentform .frm-fluent-form .ff-el-form-check-label .ff-el-form-check-input:focus-visible{
  outline:2px solid var(--sd-ff-focus); outline-offset:2px;
}
.fluentform .frm-fluent-form .ff-el-form-check span.ff_span{ margin-left:0; }

/* inline + multi-column choice lists */
.fluentform .frm-fluent-form .ff-el-group.ff_list_inline .ff-el-form-check{ margin:0 22px 11px 0; }
.fluentform .frm-fluent-form .ff-el-group[class*="ff_list_"]:not(.ff_list_inline):not(.ff_list_buttons) .ff-el-form-check{
  padding-right:22px; margin-bottom:11px;
}

/* choices rendered as buttons */
.fluentform .frm-fluent-form .ff-el-group.ff_list_buttons .ff-el-form-check{ margin:0 8px 10px 0; }
.fluentform .frm-fluent-form .ff-el-group.ff_list_buttons .ff-el-form-check label > span{
  font:600 15px/1 var(--sd-ff-body);
  color:var(--wp--preset--color--ink, #0f1720);
  background:#fff;
  border:1.5px solid var(--sd-ff-field) !important;
  border-radius:100px !important;
  padding:14px 24px;
  transition:border-color .18s ease, background-color .18s ease, color .18s ease;
}
.fluentform .frm-fluent-form .ff-el-group.ff_list_buttons .ff-el-form-check label > span:hover{
  color:var(--wp--preset--color--ink, #0f1720);
  border-color:var(--sd-ff-line-hover) !important;
  background:var(--wp--preset--color--mist, #f6f8fb);
}
.fluentform .frm-fluent-form .ff-el-group.ff_list_buttons .ff-el-form-check.ff_item_selected label > span{
  color:#fff;
  background:var(--wp--preset--color--accent, #cf2e2e);
  border-color:var(--wp--preset--color--accent, #cf2e2e) !important;
  box-shadow:none !important;
}

/* ---------- ratings ---------- */
.fluentform .frm-fluent-form .ff-el-ratings{ gap:6px; line-height:1; }
.fluentform .frm-fluent-form .ff-el-ratings label{ margin-right:0; }
.fluentform .frm-fluent-form .ff-el-ratings label .ff-rating-icon-svg{ width:26px; height:26px; }

/* ---------- section break ---------- */
.fluentform .frm-fluent-form .ff-el-section-break{ margin-top:10px; }
.fluentform .frm-fluent-form .ff-el-section-break .ff-el-section-title{
  font:700 21px/1.25 'Prompt', 'Open Sans', system-ui, sans-serif;
  letter-spacing:-0.01em;
  color:var(--wp--preset--color--ink, #0f1720);
  margin:0 0 6px;
}
.fluentform .frm-fluent-form .ff-el-section-break .ff-section_break_desk{
  font:400 15px/1.6 var(--sd-ff-body);
  color:var(--wp--preset--color--slate, #516079);
}
.fluentform .frm-fluent-form .ff-el-section-break hr{
  background-color:var(--sd-ff-line);
  height:1px; border:0; margin:18px 0 0;
}

/* ---------- terms & conditions / GDPR ---------- */
.fluentform .frm-fluent-form .ff-el-tc{ display:block; }
.fluentform .frm-fluent-form .ff-el-tc label.ff_tc_label{
  display:flex; align-items:flex-start; gap:11px; margin:0;
  font:400 15px/1.6 var(--sd-ff-body);
  cursor:pointer;
}
.fluentform .frm-fluent-form .ff-el-tc label.ff_tc_label > span{
  display:block; width:auto; padding-top:1px !important;
}
.fluentform .frm-fluent-form .ff-el-tc label.ff_tc_label > div{ display:block; }
.fluentform .frm-fluent-form .ff_t_c p{ margin:0 0 10px; }
.fluentform .frm-fluent-form .ff_t_c p:last-child{ margin-bottom:0; }

/* ---------- links + custom html ---------- */
.fluentform .frm-fluent-form a{
  color:var(--wp--preset--color--accent, #cf2e2e);
  text-decoration:underline; text-underline-offset:3px;
}
.fluentform .frm-fluent-form a:hover{ text-decoration-thickness:2px; }
.fluentform .frm-fluent-form .ff-custom_html p{ margin:0 0 12px; }
.fluentform .frm-fluent-form .ff-custom_html p:last-child{ margin-bottom:0; }

/* ---------- tabular grid ---------- */
.fluentform .frm-fluent-form table.ff-table{
  width:100%;
  border-collapse:separate; border-spacing:0;
  border:1.5px solid var(--sd-ff-line);
  border-radius:var(--sd-ff-radius);
  overflow:hidden;
  font:400 15px/1.5 var(--sd-ff-body);
}
.fluentform .frm-fluent-form .ff-checkable-grids thead > tr > th{
  font:600 14px/1.4 var(--sd-ff-body);
  color:var(--wp--preset--color--ink, #0f1720);
  background:var(--wp--preset--color--mist, #f6f8fb);
  padding:13px 12px;
}
.fluentform .frm-fluent-form .ff-checkable-grids tbody > tr > td{
  padding:13px 12px;
  background:#fff;
  border-bottom:1px solid var(--sd-ff-line);
}
.fluentform .frm-fluent-form .ff-checkable-grids tbody > tr:last-child > td{ border-bottom:0; }
.fluentform .frm-fluent-form .ff-checkable-grids tbody > tr > td.ff_grid_header{
  font-weight:600; text-align:left;
}
.fluentform .frm-fluent-form .ff-checkable-grids input[type="checkbox"],
.fluentform .frm-fluent-form .ff-checkable-grids input[type="radio"]{
  width:19px; height:19px; margin:0;
  accent-color:var(--wp--preset--color--accent, #cf2e2e);
  cursor:pointer;
}

/* ---------- error states ---------- */
.fluentform .frm-fluent-form .ff-el-is-error .ff-el-form-control{
  border-color:var(--sd-ff-danger);
}
.fluentform .frm-fluent-form .ff-el-is-error .ff-el-form-control:focus{
  box-shadow:0 0 0 3px rgba(217,45,32,.14);
}
.fluentform .frm-fluent-form .ff-el-is-error .text-danger,
.fluentform .frm-fluent-form .error.text-danger{
  font:600 13px/1.5 var(--sd-ff-body);
  color:var(--sd-ff-danger);
  margin-top:7px;
}
.fluentform .ff-errors-in-stack{
  font:400 15px/1.6 'Open Sans', system-ui, sans-serif;
  color:var(--sd-ff-danger);
  background:#fdf3f2;
  border:1.5px solid #f4c7c3;
  border-radius:var(--sd-ff-radius, 12px);
  padding:16px 18px;
  margin-top:18px;
}
.fluentform .ff-errors-in-stack .error{ font-size:15px; line-height:1.6; }

/* ---------- success message ---------- */
.fluentform .ff-message-success{
  font:400 16px/1.6 'Open Sans', system-ui, sans-serif;
  color:#1f5133;
  background:#f1f8f3;
  border:1.5px solid #c6e2ce;
  border-radius:14px;
  padding:20px 22px;
  margin-top:0;
  box-shadow:none;
}
.fluentform .ff-message-success p{ margin:0 0 10px; }
.fluentform .ff-message-success p:last-child{ margin-bottom:0; }
.fluentform .ff-message-success a{ color:#1f5133; }

/* ---------- submit button ---------- */
.fluentform .frm-fluent-form .ff_submit_btn_wrapper{ margin-top:30px; }
.fluentform .frm-fluent-form .ff-btn-submit{
  font:700 16px/1 var(--sd-ff-body);
  color:#fff;
  background:var(--wp--preset--color--accent, #cf2e2e);
  padding:18px 34px;
  border:0; border-radius:100px;
  cursor:pointer;
  text-align:center;
  transition:background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fluentform .frm-fluent-form .ff-btn-submit:hover,
.fluentform .frm-fluent-form .ff-btn-submit:focus-visible{
  color:#fff; background:#c02b2b;
  box-shadow:0 8px 24px rgba(221,51,51,.3);
  transform:translateY(-1px);
  opacity:1;
}
.fluentform .frm-fluent-form .ff-btn-submit:focus-visible{
  outline:2px solid var(--wp--preset--color--ink, #0f1720); outline-offset:3px;
}
.fluentform .frm-fluent-form .ff-btn-submit:disabled,
.fluentform .frm-fluent-form .ff-btn-submit.disabled{
  transform:none; box-shadow:none; cursor:not-allowed;
}

/* ---------- flatpickr (rendered at the end of <body>, so unscoped) ---------- */
.flatpickr-calendar{
  font-family:'Open Sans', system-ui, sans-serif;
  border-radius:14px;
  border:1.5px solid var(--wp--preset--color--line, #e3e8f0);
  box-shadow:0 14px 40px rgba(15,23,32,.16);
  overflow:hidden;
}
.flatpickr-calendar .flatpickr-months{
  background:var(--wp--preset--color--mist, #f6f8fb);
  padding:6px 0;
}
.flatpickr-calendar .flatpickr-current-month,
.flatpickr-calendar .flatpickr-weekday{
  font-weight:600; color:var(--wp--preset--color--ink, #0f1720);
}
.flatpickr-calendar .flatpickr-day{ border-radius:9px; }
.flatpickr-calendar .flatpickr-day:hover{ background:var(--wp--preset--color--iceblue, #eaf2fb); border-color:transparent; }
/* navy for today so it doesn't read as the accent-red selection */
.flatpickr-calendar .flatpickr-day.today:not(.selected){
  border-color:var(--wp--preset--color--navy, #243571);
}
.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.selected:hover,
.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange{
  color:#fff;
  background:var(--wp--preset--color--accent, #cf2e2e);
  border-color:var(--wp--preset--color--accent, #cf2e2e);
}

/* ---------- narrow screens ---------- */
@media (max-width:600px){
  .fluentform{ --sd-ff-gap:18px; }
  .fluentform .frm-fluent-form .ff-btn-submit{ width:100%; padding:17px 28px; }
}
