/* DIGI HAM LINK / BrandMeister account settings: popup scroll fix v3.
   UI ONLY. Native DMR renderer injects #dhlBmLayoutV27 later in the page,
   with overflow:hidden!important on the dialog and form. The selector
   specificity below intentionally exceeds that native selector. */
#brandmeisterDialog.bmSimple.dhlBmCredInstalledV2 {
  height: auto !important;
  max-height: min(92dvh, 760px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

/* A height-limited flex form inside a scrolling dialog still clips its last
   child. Let the form grow to its content height; the DIALOG owns scrolling. */
#brandmeisterDialog.bmSimple.dhlBmCredInstalledV2 #personalDmrForm.bmSimpleForm {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  display: block !important;
}

/* Footer and account settings must participate in form height calculation. */
#brandmeisterDialog.bmSimple.dhlBmCredInstalledV2 .bmFooter {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
#brandmeisterDialog.bmSimple.dhlBmCredInstalledV2 #dhlBmCredentialPanelV2 {
  scroll-margin-block: 14px;
}

/* The native talkgroup list is deliberately left untouched so it retains
   its own compact scrollbar. */
@media (max-width: 600px), (max-height: 720px) {
  #brandmeisterDialog.bmSimple.dhlBmCredInstalledV2 {
    max-height: 92dvh !important;
  }
}
