/* Cloudflare Turnstile CAPTCHA styling fixes */

/* General CAPTCHA container styling */
.js-captcha,
.cf-turnstile {
  display: block;
  margin: 12px 0;
  clear: both;
  width: 100%;
  max-width: 100%;
  text-align: left;
}

/* Ensure CAPTCHA doesn't float */
.js-captcha {
  float: none;
}

/* Popup form specific fixes - ONLY target elements inside popup form */
#contact_form_pop .wpcf7-form .js-captcha,
#contact_form_pop .wpcf7-form .cf-turnstile {
  display: block;
  width: 100%;
  margin: 15px 0;
  clear: both;
  text-align: left;
  float: none;
}

/* Fix submit button paragraph in popup */
#contact_form_pop .wpcf7-form p:last-child {
  display: block;
  width: 100%;
  clear: both;
  text-align: left;
  margin: 15px 0 10px 0;
  float: none;
}

/* Fix submit button in popup */
#contact_form_pop .wpcf7-form input[type="submit"],
#contact_form_pop .wpcf7-form .wpcf7-submit,
#contact_form_pop .wpcf7-form button[type="submit"] {
  display: inline-block;
  margin: 0;
  clear: both;
  float: none;
  width: auto;
}

/* Regular page forms */
.wpcf7-form .js-captcha,
.wpcf7-form .cf-turnstile {
  display: block !important;
  margin: 15px 0 !important;
  clear: both !important;
}

/* Ensure Turnstile iframe doesn't break layout */
.cf-turnstile iframe {
  max-width: 100% !important;
  display: block !important;
}

/* Mobile responsive */
@media (max-width: 768px) {

  .js-captcha,
  .cf-turnstile {
    margin: 10px 0 !important;
  }

  #contact_form_pop .js-captcha,
  #contact_form_pop .cf-turnstile {
    margin: 12px 0 !important;
  }
}