/* HubSpot embedded estimate forms: HubSpotResearchEstimateForm,
   HubSpotHeirResearchForm and HubSpotTravelInterestForm. HubSpot renders the
   fields, title and pricing inside its own iframe, so only the slot and the
   content kept around it are styled here. */

/* HubSpot's Submit button has 96px of side padding inside the cross-origin
   iframe, which page CSS cannot reach, so it needs an iframe of about 320px
   or the label wraps ("Sub / mit"). Slot spacing and the rail width match the
   legacy Drupal theme and progen-content's hubspot-estimate-form.js. */

/* Desktop matches Drupal. Mobile keeps Drupal's top spacing but drops its
   20px side padding, which wrapped Submit on 360-375px phones. The
   `--mobile` selector covers the lone slot on /free-estimate and
   /heir-research-heckerling, which sits outside #estimateFormConMobile. */
#estimateFormCon .hsFormSlot {
  padding: 30px 20px 0 0;
}

#estimateFormConMobile .hsFormSlot,
.hsEstimateForm--mobile .hsFormSlot {
  padding: 30px 0 0;
}

.hsEstimateForm .hs-form-frame {
  width: 100%;
}

/* Reserve space until HubSpot mounts its iframe, so the content below
   doesn't jump. */
.hsFormSlot .hs-form-frame {
  min-height: 600px;
}

.hsFormSlot .hs-form-frame:has(iframe) {
  min-height: 0;
}

/* The theme's rail is 25% of the viewport up to 1600px and 20% above, which
   leaves the iframe 217-303px at many desktop widths. Pages whose rail
   carries the embed
   (body.hs-rail, see hasHubSpotRail in templates/Layout.js) fix it at 380px,
   the width it reaches at 1900px, and the main column and footer give up the
   same space. Drupal starts this at 769px, but core.css hides the rail
   (hide768) below 1006px, which left an empty 380px strip beside the main
   column on tablets. */
@media (min-width: 1006px) and (max-width: 1899px) {
  .hs-rail #estimateFormCon.newMainSidebar {
    width: 380px;
  }

  .hs-rail .newMainContent.w80 {
    width: calc(100% - 380px);
  }

  .hs-rail #footer {
    max-width: calc(100% - 380px);
  }
}

/* Carried over from heir-research-form.css, where it was scoped to the old
   form id (#estimateform-heir-interest). */
.hsEstimateForm--heir .heir-footer-grid {
  margin-top: 0;
}

/* Carried over from research-estimate-form.css. */
.hsEstimateForm .project-influence .pi-list li > img {
  margin-right: 10px;
}
