/**
 * Yandex SmartCaptcha container inside theme forms.
 */

.anik-captcha {
  margin: 0 0 1.6rem;
}

.anik-captcha .smart-captcha {
  min-height: 100px;
}

/* The size is set by the Yandex script; keep the container from collapsing. */
.anik-captcha iframe {
  width: 100%;
  min-height: 100px;
  border: 0;
}

.form-box__content-form-action .anik-captcha + .mui-checkbox-group {
  margin-top: 1.3rem;
}

/*
 * The form card (.form-box) has a fixed height on >=768px and clips its content
 * (overflow: hidden), while the form grew with the SmartCaptcha widget and the
 * two consent checkboxes. Instead of scrolling inside the form we compact it,
 * so the whole form fits the card without an inner scrollbar.
 */
@media (min-width: 768px) {
  /* inner paddings of the card and of the form itself: 2.4rem -> 1.6rem */
  .form-box {
    --mui-p: 1.6rem;
  }

  /* vertical rhythm between the fields: 1.6rem -> 1.2rem
     (selectors are scoped to .form-box because some themes load their CSS
     after wp_head() and win at equal specificity) */
  .form-box .form-box__content-form-inputs .cell {
    margin-bottom: 1.2rem;
  }

  .form-box .anik-captcha {
    margin-bottom: 1.2rem;
  }

  /* consent checkboxes: tighter gap, slightly smaller text */
  .form-box .mui-checkbox-group {
    gap: 0.2rem;
    margin-top: 1rem;
  }

  .form-box .form-box__content-form .mui-checkbox__label {
    font-size: 1.1rem;
    line-height: 1.5rem;
  }

  /* some themes add margin-top: 1.3rem to every checkbox inside the form action */
  .form-box .form-box__content-form-action .mui-checkbox-group .mui-checkbox {
    margin-top: 0;
  }
}


