/* Make the new Formidable form visually match legacy CF7 blocks */

#contact-form .sluto-new-form,
#form-modal .sluto-new-form,
#form-page .sluto-new-form {
  margin-top: 1.5rem;
}

#contact-form .sluto-new-form .frm_forms,
#form-modal .sluto-new-form .frm_forms,
#form-page .sluto-new-form .frm_forms {
  margin: 0;
  width: 100%;
  max-width: none;
}

/* Prevent legacy CF7 rule "#contact-form form { display:grid... }"
   from shrinking Formidable to a half-width grid cell. */
#contact-form .sluto-new-form form,
#form-modal .sluto-new-form form,
#form-page .sluto-new-form form {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

#contact-form .sluto-new-form fieldset,
#form-modal .sluto-new-form fieldset,
#form-page .sluto-new-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

#contact-form .sluto-new-form .frm_fields_container,
#form-modal .sluto-new-form .frm_fields_container,
#form-page .sluto-new-form .frm_fields_container {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

/* Desktop structure matching original CF7:
   left: message + GDPR, right: name/email/phone + submit */
#contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(1),
#form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(1),
#form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(1) {
  grid-column: 2;
}

#contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(2),
#form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(2),
#form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(2) {
  grid-column: 2;
}

#contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(3),
#form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(3),
#form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(3) {
  grid-column: 2;
}

#contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(4),
#form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(4),
#form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(4) {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

#contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(5),
#form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(5),
#form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(5) {
  grid-column: 1;
}

#contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(6),
#form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(6),
#form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(6) {
  grid-column: 2;
  align-self: end;
}

#contact-form .sluto-new-form .frm_primary_label,
#form-modal .sluto-new-form .frm_primary_label,
#form-page .sluto-new-form .frm_primary_label {
  color: #fff !important;
  margin-bottom: 0.5rem !important;
}

/* Keep labels white even when Formidable marks a field as .frm_blank_field on validation */
#contact-form .sluto-new-form .frm_blank_field > .frm_primary_label,
#form-modal .sluto-new-form .frm_blank_field > .frm_primary_label,
#form-page .sluto-new-form .frm_blank_field > .frm_primary_label {
  color: #fff !important;
}

/* Override Formidable width utility classes (frm6/frm12/frm_full...) */
#contact-form .sluto-new-form .frm_form_field,
#form-modal .sluto-new-form .frm_form_field,
#form-page .sluto-new-form .frm_form_field {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin-bottom: 0 !important;
  align-self: start;
}

/* Hide auto-generated helper text like "First" under Name */
#contact-form .sluto-new-form .frm_description,
#form-modal .sluto-new-form .frm_description,
#form-page .sluto-new-form .frm_description {
  display: none !important;
}

#contact-form .sluto-new-form .frm_error,
#form-modal .sluto-new-form .frm_error,
#form-page .sluto-new-form .frm_error {
  margin-top: 0.35rem !important;
  padding: 0 !important;
  line-height: 1.2;
}

/* Ensure top Formidable summary error banner is never hidden in contact form wrappers */
#contact-form .sluto-new-form .frm_error_style,
#form-modal .sluto-new-form .frm_error_style,
#form-page .sluto-new-form .frm_error_style {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#contact-form .sluto-new-form input[type="text"],
#contact-form .sluto-new-form input[type="email"],
#contact-form .sluto-new-form textarea,
#form-modal .sluto-new-form input[type="text"],
#form-modal .sluto-new-form input[type="email"],
#form-modal .sluto-new-form textarea,
#form-page .sluto-new-form input[type="text"],
#form-page .sluto-new-form input[type="email"],
#form-page .sluto-new-form textarea {
  width: 100% !important;
  border-radius: 0.25rem;
  border: 1px solid #ced4da !important;
}

#contact-form .sluto-new-form textarea,
#form-modal .sluto-new-form textarea,
#form-page .sluto-new-form textarea {
  height: 100%;
  min-height: 222px;
}

#contact-form .sluto-new-form .frm_checkbox,
#form-modal .sluto-new-form .frm_checkbox,
#form-page .sluto-new-form .frm_checkbox {
  margin: 0;
  min-height: 2.2rem;
  padding: 0.15rem 0 0.15rem 0;
}

#contact-form .sluto-new-form .frm_checkbox label,
#form-modal .sluto-new-form .frm_checkbox label,
#form-page .sluto-new-form .frm_checkbox label {
  display: block !important;
  color: #fff !important;
  font-size: 18px;
  line-height: 1.25em;
  margin: 0;
  position: relative;
  padding-left: 1.6rem;
}

#contact-form .sluto-new-form .frm_checkbox input[type="checkbox"],
#form-modal .sluto-new-form .frm_checkbox input[type="checkbox"],
#form-page .sluto-new-form .frm_checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0 !important;
  float: none !important;
  position: absolute;
  top: 0.12rem;
  left: 0;
  vertical-align: top !important;
  display: block !important;
}

#contact-form .sluto-new-form .frm_checkbox label::after,
#form-modal .sluto-new-form .frm_checkbox label::after,
#form-page .sluto-new-form .frm_checkbox label::after {
  content: "";
  display: block;
  clear: both;
}

#contact-form .sluto-new-form .frm_checkbox a,
#form-modal .sluto-new-form .frm_checkbox a,
#form-page .sluto-new-form .frm_checkbox a {
  color: #fff !important;
  text-decoration: underline;
}

/* Hide Formidable's standalone required asterisk label above GDPR checkbox */
#contact-form .sluto-new-form #frm_field_64_container > .frm_primary_label,
#form-modal .sluto-new-form #frm_field_64_container > .frm_primary_label,
#form-page .sluto-new-form #frm_field_64_container > .frm_primary_label,
#contact-form .sluto-new-form #frm_field_65_container > .frm_primary_label,
#form-modal .sluto-new-form #frm_field_65_container > .frm_primary_label,
#form-page .sluto-new-form #frm_field_65_container > .frm_primary_label {
  display: none !important;
}

#contact-form .sluto-new-form #frm_field_64_container,
#form-modal .sluto-new-form #frm_field_64_container,
#form-page .sluto-new-form #frm_field_64_container {
  min-height: 4.1rem;
  padding-top: 0.15rem;
}

#contact-form .sluto-new-form .frm_submit,
#form-modal .sluto-new-form .frm_submit,
#form-page .sluto-new-form .frm_submit {
  margin: 0;
}

#contact-form .sluto-new-form .frm_button_submit,
#form-modal .sluto-new-form .frm_button_submit,
#form-page .sluto-new-form .frm_button_submit {
  min-width: 120px;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
  font-family: "Roboto", "Helvetica Neue", sans-serif !important;
  text-transform: uppercase;
  color: #fff !important;
  background: linear-gradient(#fbc100, #fd8e1b) !important;
  transition: 0.2s ease-in-out;
}

#contact-form .sluto-new-form .frm_button_submit:hover,
#contact-form .sluto-new-form .frm_button_submit:focus,
#form-modal .sluto-new-form .frm_button_submit:hover,
#form-modal .sluto-new-form .frm_button_submit:focus,
#form-page .sluto-new-form .frm_button_submit:hover,
#form-page .sluto-new-form .frm_button_submit:focus {
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  background: #3b4084 !important;
}

/* Hide anti-spam honeypot row */
#contact-form .sluto-new-form .frm_verify,
#form-modal .sluto-new-form .frm_verify,
#form-page .sluto-new-form .frm_verify {
  display: none !important;
}

@media (max-width: 992px) {
  #contact-form .sluto-new-form .frm_fields_container,
  #form-modal .sluto-new-form .frm_fields_container,
  #form-page .sluto-new-form .frm_fields_container {
    grid-template-columns: 1fr;
  }

  #contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(1),
  #contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(2),
  #contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(3),
  #contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(4),
  #contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(5),
  #contact-form .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(6),
  #form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(1),
  #form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(2),
  #form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(3),
  #form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(4),
  #form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(5),
  #form-modal .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(6),
  #form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(1),
  #form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(2),
  #form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(3),
  #form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(4),
  #form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(5),
  #form-page .sluto-new-form .frm_fields_container > .frm_form_field.form-field:nth-of-type(6) {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Global Formidable submit style parity with legacy CF7 button */
.frm_forms.frm_style_formidable-style.with_frm_style .frm_button_submit,
.frm_forms.frm_style_formidable-style.with_frm_style input[type="submit"],
.frm_forms.frm_style_formidable-style.with_frm_style .frm_submit button {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
  font-family: "Roboto", "Helvetica Neue", sans-serif !important;
  text-transform: uppercase;
  color: #fff !important;
  background-image: linear-gradient(#fbc100, #fd8e1b) !important;
  background-color: transparent !important;
  transition-property: background-image, color !important;
  transition-duration: 0.2s !important;
  transition-timing-function: ease-in-out !important;
}

.frm_forms.frm_style_formidable-style.with_frm_style .frm_button_submit:hover,
.frm_forms.frm_style_formidable-style.with_frm_style .frm_button_submit:focus,
.frm_forms.frm_style_formidable-style.with_frm_style input[type="submit"]:hover,
.frm_forms.frm_style_formidable-style.with_frm_style input[type="submit"]:focus,
.frm_forms.frm_style_formidable-style.with_frm_style .frm_submit button:hover,
.frm_forms.frm_style_formidable-style.with_frm_style .frm_submit button:focus {
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  background-image: linear-gradient(#4b51a7, #3b4084) !important;
  background-color: transparent !important;
}
