/* Persistent success state: shared by both Contact pages. */
[data-bd-contact-success].form__reply.centered {
  position: relative;
  inset: auto;
  transform: none;
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  overflow-wrap: anywhere;
}
[data-bd-contact-success][hidden], #contact-form[hidden] { display: none !important; }
[data-bd-contact-success] ol { list-style: decimal; }
[data-bd-contact-success] li { margin-block: 0.8rem; }
[data-bd-contact-success] a { text-decoration: underline; }
[data-bd-contact-success] [data-bd-contact-reset] { margin-top: 2rem; max-width: 100%; white-space: normal; }

/* Shared action spacing: Contact/Home/Business Audit and Free Audit, EN + BG.
   Keep the action on its existing grid row. No button dimensions or form logic change.
   No !important here: the Free Audit's existing inline 3rem (30px) gap is retained. */
:is(form#contact-form, form#audit-form) .row > .mxd-grid-item:has(> button[type="submit"]) {
  margin-top: 32px;
}

/* Homepage Systems paragraph -> Business Audit CTA. Override only its known
   inline 1.5rem wrapper gap, not all buttons or other page CTA groups. */
body[data-bd-page="index"] #growth-system .mxd-services-list + .anim-uni-in-up > p.t-large + div:has(> a.btn:is([href="/business-audit"], [href="/bg/business-audit"])) {
  margin-top: 32px !important;
}

/* Mobile contact-form labels may need more than one line. The template creates
   two animated copies and clips the caption to 3.3rem. Stack the copies in one
   grid cell and roll the complete block, so neither the second line nor a
   duplicate label leaks out. Preserve font/color/radius and arrow animation. */
@media (max-width: 767px) {
  form#contact-form button.btn-default[type="submit"] {
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 5.6rem;
    padding-block: .9rem;
    white-space: normal;
  }
  form#contact-form button.btn-default[type="submit"] > .btn-caption {
    display: grid !important;
    min-width: 0;
    height: auto;
    line-height: 1.5;
    white-space: normal;
    overflow: hidden;
  }
  form#contact-form button.btn-default[type="submit"] > i { flex: 0 0 auto; }
  form#contact-form button.btn-default[type="submit"] > .btn-caption > .btn-anim__block {
    grid-area: 1 / 1;
    transition: transform .5s var(--_animbezier);
  }
  form#contact-form button.btn-default[type="submit"] > .btn-caption > .btn-anim__block + .btn-anim__block {
    transform: translateY(100%);
  }
  form#contact-form button.btn-default[type="submit"] > .btn-caption .btn-anim__letter {
    transform: none !important;
  }
  form#contact-form button.btn-default[type="submit"]:is(:hover, .play) > .btn-caption > .btn-anim__block:first-child {
    transform: translateY(-100%);
  }
  form#contact-form button.btn-default[type="submit"]:is(:hover, .play) > .btn-caption > .btn-anim__block + .btn-anim__block {
    transform: translateY(0);
  }
}
