/* Shared screen-only containment for Bootstrap, native and GIC overlays. */
:root{--gx-overlay-height:100svh;--gx-overlay-top:0px;--gx-overlay-gap-top:max(12px,env(safe-area-inset-top,0px));--gx-overlay-gap-bottom:max(12px,env(safe-area-inset-bottom,0px))}
@supports(height:100dvh){:root{--gx-overlay-height:100dvh}}
@media screen and (max-width:991px),screen and (max-height:600px) and (pointer:coarse){
 html.gx-overlay-scroll-lock{scroll-behavior:auto!important;overscroll-behavior:none;overflow:hidden}
 body.gx-overlay-scroll-lock{position:fixed!important;top:var(--gx-overlay-scroll-y)!important;left:var(--gx-overlay-scroll-x)!important;right:0;width:100%;overflow:hidden!important;overscroll-behavior:none}
 body .modal{position:fixed;inset:var(--gx-overlay-top) 0 auto;box-sizing:border-box;width:100%;height:var(--gx-overlay-height);max-height:var(--gx-overlay-height);overflow:hidden!important;overscroll-behavior:contain}
 body .modal .modal-dialog{display:flex;align-items:center;box-sizing:border-box;min-height:0!important;height:calc(var(--gx-overlay-height) - var(--gx-overlay-gap-top) - var(--gx-overlay-gap-bottom));max-height:calc(var(--gx-overlay-height) - var(--gx-overlay-gap-top) - var(--gx-overlay-gap-bottom));max-width:calc(100% - 24px);margin:var(--gx-overlay-gap-top) auto var(--gx-overlay-gap-bottom)}
 body .modal.fade .modal-dialog{transform:none!important}
 body .modal .modal-content{display:flex;flex-direction:column;flex:0 1 auto;box-sizing:border-box;width:100%;min-width:0;min-height:0;max-height:100%!important;overflow:hidden;overflow-anchor:none}
 /* Some pages wrap header/body/footer inside a form instead of using form.modal-content. */
 body .modal .modal-content>form{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;max-height:100%;overflow:hidden;margin:0}
 body .modal .modal-content :is(.modal-body,.transaction-modal-body,.application-modal-body){flex:1 1 auto;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;overflow-wrap:anywhere}
 body .modal .modal-content :is(.modal-header,.modal-footer,.transaction-modal-header,.application-modal-header){flex:0 0 auto;min-width:0}
 body .modal .modal-content :is(.modal-header,.transaction-modal-header,.application-modal-header)>div{min-width:0}
 body .modal .modal-content :is(.btn-close,[data-bs-dismiss=modal]){flex-shrink:0;touch-action:manipulation}
 body .modal .modal-content :is(.btn-close,.modal-close-btn){min-width:44px;min-height:44px}
 body .modal .modal-content :is(input,select,textarea){min-width:0;max-width:100%;font-size:16px}
 body dialog[open]{position:fixed;inset-block:var(--gx-overlay-top) calc(100% - var(--gx-overlay-top) - var(--gx-overlay-height));box-sizing:border-box;max-width:calc(100% - 24px);max-height:calc(var(--gx-overlay-height) - var(--gx-overlay-gap-top) - var(--gx-overlay-gap-bottom))!important;overscroll-behavior:contain}
 /* These dialogs intentionally scroll as one sheet; specialised role/export dialogs
    retain their own inner scroller and the member-card print composition is untouched. */
 body dialog[open]:is(.gx-card-dialog,.ie-applicant-dialog){overflow-y:auto;-webkit-overflow-scrolling:touch}
 body dialog[open]:is(.gx-card-dialog,.ie-applicant-dialog)>:is(.gx-card-toolbar,.ie-popup-heading){position:sticky;top:0;z-index:2;background:#effaf6}
 body .gae-modal{box-sizing:border-box;inset:var(--gx-overlay-top) 0 auto!important;height:var(--gx-overlay-height)!important;max-height:var(--gx-overlay-height);padding-top:var(--gx-overlay-gap-top)!important;padding-bottom:var(--gx-overlay-gap-bottom)!important;overscroll-behavior:contain}
 body .gae-modal :is(.gae-confirm-dialog,.gae-proof-dialog){max-height:calc(var(--gx-overlay-height) - var(--gx-overlay-gap-top) - var(--gx-overlay-gap-bottom))!important}
}
@media screen and (max-width:600px){
 body .modal .modal-content :is(.transaction-modal-header,.application-modal-header,.transaction-modal-body,.application-modal-body){padding:16px}
}
@media print{body.gx-overlay-scroll-lock{position:static!important;top:auto!important;left:auto!important;right:auto!important;width:auto!important;overflow:visible!important}}
