/* Lock only the document; dialog panels and their inner scrollers keep scrolling. */
html.aow-modal-scroll-lock {overflow:hidden!important;overscroll-behavior:none;scroll-behavior:auto!important;}
html.aow-modal-scroll-lock body {position:fixed!important;top:var(--aow-modal-lock-top)!important;left:var(--aow-modal-lock-left)!important;width:100%!important;box-sizing:border-box!important;overflow:hidden!important;padding-right:var(--aow-modal-lock-padding)!important;}
body.aow-masters-theme :is([role="dialog"],dialog[open],.chat-member-sidebar.open) {overscroll-behavior:contain;max-height:calc(100dvh - 24px);}
body.aow-masters-theme [role="dialog"] {overflow-y:auto;}

#portal-team-modal {z-index:1000001;}
#portal-team-modal [hidden] {display:none!important;}

/* The calendar has one main scroll area and a footer that stays visible. */
body.aow-masters-theme #portal-datetime-picker .portal-dt-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    max-height: min(760px, calc(100dvh - 36px)) !important;
    overflow: hidden !important;
}
#portal-datetime-picker .portal-dt-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    touch-action: pan-y pinch-zoom;
}
#portal-datetime-picker .portal-dt-time-list { overscroll-behavior-y: auto; }
#portal-datetime-picker .portal-dt-actions {
    position: static;
    flex: none;
    margin: 8px 0 0;
    padding: 10px 0 env(safe-area-inset-bottom);
}
@media (max-width: 680px) {
    body.aow-masters-theme #portal-datetime-picker .portal-dt-card {
        max-height: min(760px, 96dvh) !important;
    }
}
