/**
 * 手机端侧滑菜单：二级菜单项过多时允许纵向滚动
 * 与 functions.php 中 creamz_child_get_mobile_menu_css() 保持一致
 */
body .mobile-menu,
body .mobile-menu > ul,
body .mobile-menu > ul ul.children,
body .mobile-menu > ul ul.sub-menu,
body .mobile-menu > ul ul.children > li > ul,
body .mobile-menu > ul ul.sub-menu > li > ul {
	height: 100vh !important;
	height: 100dvh !important;
	max-height: 100vh !important;
	max-height: 100dvh !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	overscroll-behavior: contain;
}

body .mobile-menu {
	overflow: hidden !important;
}

body.logged-in.admin-bar .mobile-menu,
body.logged-in.admin-bar .mobile-menu > ul,
body.logged-in.admin-bar .mobile-menu > ul ul.sub-menu {
	height: calc(100dvh - 32px) !important;
	max-height: calc(100dvh - 32px) !important;
}

@media screen and (max-width: 782px) {
	body.logged-in.admin-bar .mobile-menu,
	body.logged-in.admin-bar .mobile-menu > ul,
	body.logged-in.admin-bar .mobile-menu > ul ul.sub-menu {
		height: calc(100dvh - 46px) !important;
		max-height: calc(100dvh - 46px) !important;
	}

	body.logged-in.admin-bar .mobile-menu {
		overflow: hidden !important;
	}
}
