/* Demo Form Card module */
.demo-form-card {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.demo-form-title {
  font-size: 30px;          /* adjust if needed */
  line-height: 1.25;
  font-weight: 600;
  margin-top: 0px;
  margin-bottom: 8px;
  text-align: center;       /* 👈 this is the key */
}

.demo-reassurance {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.4;
  color: #727686;
}

/* Form wrapper (optional spacing) */
.demo-form-wrap {
  margin-top: 8px;
}

/* Empty state */
.demo-form-empty {
  padding: 14px;
  border: 1px dashed rgba(0,0,0,0.25);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(0,0,0,0.65);
}

/* Fallback: SHOW by default */
.demo-form-editor-fallback {
  display: block;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(0,0,0,0.25);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(0,0,0,0.65);
}

/* Hide fallback once the form is actually rendered */
.demo-form-card.has-rendered-form .demo-form-editor-fallback {
  display: none;
}

@media (max-width: 767px) {
  .demo-form-card { padding: 24px; }
}
/* Force HubSpot 2-column name fields to stack (First Name above Last Name) */
.demo-form-card .hs-form fieldset.form-columns-2 {
  display: block !important;
}

.demo-form-card .hs-form fieldset.form-columns-2 .hs-form-field,
.demo-form-card .hs-form .hs_firstname,
.demo-form-card .hs-form .hs_lastname {
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

/* Remove column gutter/margins HubSpot adds */
.demo-form-card .hs-form fieldset.form-columns-2 .hs-form-field .input,
.demo-form-card .hs-form .hs_firstname .input,
.demo-form-card .hs-form .hs_lastname .input {
  margin-right: 0 !important;
}
(function () {
  function tagSection() {
    const card = document.querySelector('.demo-form-card');
    if (!card) return;

    // HubSpot DnD sections commonly use .dnd-section
    const section = card.closest('.dnd-section');
    if (section) section.classList.add('demo-form-section');

    // Optional: also tag the row (sometimes the padding lives there)
    const row = card.closest('.dnd-row');
    if (row) row.classList.add('demo-form-row');
  }

/* Force single-column layout for HubSpot forms inside Demo Form Card */
.demo-form-card .hs-form .hs-form-field {
  width: 100% !important;
  float: none !important;
}

/* Fix legacy inline styles HubSpot injects */
.demo-form-card .hs-form .hs-form-field > .input {
  width: 100% !important;
}

/* Ensure first/last name don’t go side-by-side */
.demo-form-card .hs-form .hs-form-field.hs_firstname,
.demo-form-card .hs-form .hs-form-field.hs_lastname {
  display: block !important;