/* Force the widget to break flex row and take full width */
.divi-turnstile-widget {
  display: block !important;
  width: 100% !important;
  flex-basis: 100% !important;
  order: 0 !important;
  margin-bottom: 14px !important;
  clear: both;
}

/* Ensure the button wrapper is below the widget */
.et_pb_button_wrapper,
.et_pb_contact_form_submit,
button[type="submit"] {
  display: block !important;
  width: auto;
  order: 1 !important;
  margin-top: 0 !important;
  clear: both;
}

/* Force the widget and its siblings to stack vertically in any flex/grid parent */
.divi-turnstile-widget:not(:only-child),
.divi-turnstile-widget + * {
  display: block !important;
  width: 100% !important;
}
.divi-turnstile-widget,
.divi-turnstile-widget ~ * {
  flex-basis: 100% !important;
  width: 100% !important;
}
.divi-turnstile-widget,
.divi-turnstile-widget ~ * {
  flex-direction: column !important;
}

/* Force stacking of widget and button in Divi contact form */
.et_contact_bottom_container {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

/* Make the widget only as wide as needed in compact mode */
.divi-turnstile-widget[data-size="compact"] {
  width: auto !important;
  align-self: flex-start !important;
  min-width: 0 !important;
}

/* Always make the button full width */
.et_contact_bottom_container button[type="submit"] {
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
}
