/* HAOLLA v1.36.3 — pre-focus iOS form viewport stability
   The legacy v1.35.4 stylesheet intentionally gave fields a 42vh bottom
   scroll margin. Safari/WebKit can apply that margin before focusin fires,
   causing the page to jump a full screen when the keyboard opens. This
   override is active before focus so native focus scrolling stays minimal. */

/* Neutralize legacy focus scroll clearance before the browser focuses a field. */
form :is(input,textarea,select),
.leadForm :is(input,textarea,select),
.r1290LeadForm :is(input,textarea,select),
.sgForm :is(input,textarea,select){
  scroll-margin-top:0!important;
  scroll-margin-bottom:0!important;
  scroll-margin-block:0!important;
}

@media (max-width:900px){
  /* Keep mobile controls large enough to prevent iOS focus zoom. */
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea{
    font-size:16px!important;
  }

  html:has(body.haolla-form-focus){scroll-behavior:auto!important}
  body.haolla-form-focus,
  body.haolla-form-focus main,
  body.haolla-form-focus form,
  body.haolla-form-focus .v122LeadBox,
  body.haolla-form-focus .v122LeadForm,
  body.haolla-form-focus .formPanelV4{
    overflow-anchor:none!important;
  }

  body.haolla-form-focus textarea,
  body.haolla-keyboard-open textarea{
    max-height:none!important;
  }

  /* Hide floating chrome without changing document flow. */
  body.haolla-form-focus .haollaUtilityRail,
  body.haolla-keyboard-open .haollaUtilityRail,
  body.haolla-form-focus .localStickyCtaV1346,
  body.haolla-keyboard-open .localStickyCtaV1346,
  body.haolla-form-focus .conversionSticky,
  body.haolla-keyboard-open .conversionSticky,
  body.haolla-form-focus .bottomBar,
  body.haolla-keyboard-open .bottomBar,
  body.haolla-form-focus > .messageLauncher,
  body.haolla-keyboard-open > .messageLauncher,
  body.haolla-form-focus > .learningOsLauncher,
  body.haolla-keyboard-open > .learningOsLauncher,
  body.haolla-form-focus > .v122ActionRail,
  body.haolla-keyboard-open > .v122ActionRail,
  body.haolla-form-focus > .messageDock,
  body.haolla-keyboard-open > .messageDock{
    visibility:hidden!important;
    pointer-events:none!important;
  }
}
