.lead-captcha-slot {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 16px;
  clear: both;
}

.lead-captcha-widget {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 122px;
  overflow: visible;
}

.lead-captcha-loading {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 122px;
  margin: 0;
  padding: 16px;
  border: 1px solid #d9dee1;
  border-radius: 12px;
  background: #fff;
  color: #64747c;
  font: 14px/1.5 Arial, sans-serif;
  text-align: center;
}

.lead-captcha-failed {
  flex-direction: column;
  gap: 10px;
}

.lead-captcha-failed > p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.lead-captcha-widget .lead-captcha-retry {
  box-sizing: border-box;
  display: inline-block;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid #9aa9b1;
  border-radius: 6px;
  background: #f4f7f8;
  color: #36464e;
  font: 14px/1.4 Arial, sans-serif;
  text-transform: none;
  cursor: pointer;
}

.lead-captcha-widget .lead-captcha-retry:hover,
.lead-captcha-widget .lead-captcha-retry:focus-visible {
  border-color: #4f7c42;
  background: #edf5e9;
}

.lead-captcha-slot .lead-captcha-note {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

/* The widget has its own row, outside the input and submit columns. */
.lead-captcha-grid > .lead-captcha-slot {
  flex: 0 0 100%;
  max-width: 100%;
  order: 2;
  padding-right: 15px;
  padding-left: 15px;
}

.lead-captcha-grid > .lead-captcha-slot > .lead-captcha-widget {
  max-width: 400px;
}

.lead-captcha-grid > .lead-captcha-submit {
  order: 1;
  align-self: flex-start;
  margin-left: auto;
}

.lead-captcha-grid > .lead-captcha-privacy {
  flex: 0 0 100%;
  max-width: 100%;
  order: 3;
}

/* Preserve the premium template's single input/button bar on desktop. */
.site_form > .lead-captcha-slot--premium {
  max-width: 980px;
  margin-top: 16px;
  margin-bottom: 0;
}

.lead-captcha-slot--premium > .lead-captcha-widget {
  max-width: 400px;
  margin-right: auto;
  margin-left: auto;
}

/* Existing question forms use the same height allowance for iframe borders. */
#formToUs .smart-captcha {
  height: auto !important;
  min-height: 122px;
  overflow: visible !important;
}

@media (max-width: 1024px) {
  .sf_block > .lead-captcha-slot--premium {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 6px 0;
  }
}

@media (max-width: 767px) {
  /* On narrow screens verify first, then submit. Space is reserved up front. */
  .lead-captcha-grid > .lead-captcha-slot {
    order: 0;
  }
}

@media (max-width: 540px) {
  .sf_block > .lead-captcha-slot--premium {
    flex-basis: auto;
  }
}
