/**
 * Mobile menu sheet — layout and link styles.
 *
 * main.css sets `a,button { display:flex; justify-content:center; min-height:44px }`
 * which breaks vertical nav links in the hamburger sheet.
 *
 * @package AscoltaNews
 */

/* Must beat #mobile-menu-sheet { display:flex } when closed — .hidden alone loses to ID. */
#mobile-menu-sheet.hidden {
	display: none !important;
}

#mobile-menu-sheet:not(.hidden) {
	display: flex !important;
	flex-direction: column;
	height: 100dvh;
	max-height: 100dvh;
	overflow: hidden;
}

#mobile-menu-sheet:not(.hidden) .ascolta-mobile-menu-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

#mobile-menu-sheet .ascolta-mobile-menu-nav {
	display: block !important;
	visibility: visible !important;
	height: auto !important;
	overflow: visible !important;
	opacity: 1 !important;
	width: 100%;
}

#mobile-menu-sheet .ascolta-mobile-menu-nav a {
	display: block !important;
	width: 100% !important;
	max-width: 100%;
	min-height: 44px;
	box-sizing: border-box;
	padding: 0.375rem 0;
	text-align: left !important;
	line-height: 1.4;
	white-space: normal;
	word-break: break-word;
	justify-content: flex-start !important;
	align-items: flex-start !important;
}

#mobile-menu-sheet .ascolta-mobile-menu-scroll > div > a[href] {
	display: block !important;
	width: 100% !important;
	text-align: left !important;
}

#mobile-menu-sheet #mobile-menu-search form {
	display: block;
	width: 100%;
}

#mobile-menu-sheet #mobile-menu-search button[type="submit"] {
	display: inline-flex !important;
	min-height: auto;
	width: auto;
	justify-content: center !important;
}

#mobile-menu-sheet #mobile-menu-theme-toggle {
	display: flex !important;
	width: 100%;
	justify-content: flex-start !important;
	align-items: center !important;
}
