/* drawer_cuon.css — sua loi CUON cua drawer menu trai (J22 PR-1, muc 2a). KHONG phu thuoc co.
 *
 * Loi: man dung hep (~350x510) / dien thoai thap (iPhone SE): drawer la 1 cot flex, nhung khoi Doi mat khau /
 * Dang xuat + chon giao dien + Tim tinh nang co dinh chiem ~nua chieu cao => danh sach bi cat o nhom "Du an",
 * khong cuon toi duoc; bottom nav de len day drawer. base.html con luat "overflow:hidden !important"
 * (khoi MENU-CHOT 20/08) chan cuon, va bottom:46px khong du khi thanh duoi cao hon.
 *
 * Cach sua: drawer cao 100dvh, TU cuon (overflow-y:auto), vung menu (.uvx-nav) co chieu cao toi thieu
 * de khong bi ep ve 0, day drawer chua cho cho bottom nav + safe-area. Khong them JS, khong khoa cuon body
 * (repo khong co listener khoa cuon khi mo menu). Nap SAU man_gap.css o ca base.html va base_uvx.html.
 * Chon "html body .uvx-sidebar.is-open.is-open" de thang ca luat !important trong mobile_compact.css
 * (html:is(.uv-mobile-app,.uv-ios-shell) ...) va cac <style> nhung trong template.
 */
:root { --uvx-bn-h: 56px; }

@media (max-width: 1100px) {
  html body .uvx-sidebar.is-open.is-open {
    display: flex !important; flex-direction: column !important;
    top: 0 !important; bottom: 0 !important;
    height: 100dvh !important; max-height: 100dvh !important;
    box-sizing: border-box;
    overflow-x: hidden !important; overflow-y: auto !important;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    /* day vung cuon = chieu cao bottom nav + safe-area: muc cuoi khong bi thanh duoi de */
    padding-bottom: calc(var(--uvx-bn-h) + env(safe-area-inset-bottom, 0px)) !important;
    scroll-padding-bottom: calc(var(--uvx-bn-h) + env(safe-area-inset-bottom, 0px));
  }
  html body .uvx-sidebar.is-open.is-open .uvx-nav {
    flex: 1 1 auto !important;
    min-height: min(40dvh, 260px) !important;   /* chong bi ep ve 0 boi cac khoi co dinh phia duoi */
    overflow-y: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  html body .uvx-sidebar.is-open.is-open > *:not(.uvx-nav) { flex: 0 0 auto !important; }
}
