/* Mobile off-canvas menu (Astra side panel). Scoped to #ast-mobile-popup so the desktop menu is untouched. */

/* Slide + overlay */
#ast-mobile-popup.ast-mobile-popup-drawer {
	transition: opacity .3s ease .05s, left 0s linear .4s, right 0s linear .4s;
}
#ast-mobile-popup.ast-mobile-popup-drawer.active {
	transition: opacity .25s ease-out;
}
#ast-mobile-popup .ast-mobile-popup-inner {
	width: 86vw;
	max-width: 400px;
	height: 100%;
	height: 100dvh;
	transition: transform .35s cubic-bezier(.22, .61, .36, 1);
	will-change: transform;
	box-shadow: 0 0 24px rgba(0, 0, 0, .18);
}
#ast-mobile-popup .ast-mobile-popup-overlay {
	background-color: rgba(0, 0, 0, .5);
	transition: opacity .3s ease;
}
#ast-mobile-popup .ast-mobile-popup-content {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}
body.ast-popup-nav-open {
	overflow: hidden;
}

/* No arrows: Astra's arrow icons are hidden, +/- is drawn on the toggle button */
#ast-mobile-popup .ast-icon.icon-arrow,
#ast-mobile-popup .dropdown-menu-toggle {
	display: none !important;
}
#ast-mobile-popup .main-header-menu .menu-item-has-children {
	position: relative;
}
#ast-mobile-popup .main-header-menu .menu-item-has-children > .ast-menu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 0;
	right: 0;
	width: 48px;
	height: 48px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 0;
	color: inherit;
	cursor: pointer;
	z-index: 2;
}
#ast-mobile-popup .main-header-menu .menu-item-has-children > .ast-menu-toggle::before {
	content: "+";
	font-family: 'Roboto', sans-serif;
	font-size: 24px;
	font-weight: 300;
	line-height: 1;
}
#ast-mobile-popup .main-header-menu .menu-item-has-children > .ast-menu-toggle[aria-expanded="true"]::before,
#ast-mobile-popup .main-header-menu .menu-item-has-children.ast-submenu-expanded > .ast-menu-toggle::before {
	content: "\2212";
}

/* Rows, indent and fonts per level: Unbounded Black / Bold / Regular (self-hosted, see fonts.css) */
#ast-mobile-popup .main-header-menu > .menu-item > .menu-link,
#ast-mobile-popup .main-header-menu .sub-menu .menu-link {
	display: block;
	box-sizing: border-box;
	padding-right: 52px;
	font-family: 'Unbounded', sans-serif;
	line-height: 1.4;
	letter-spacing: 0;
}
#ast-mobile-popup .main-header-menu > .menu-item > .menu-link {
	padding-top: 14px;
	padding-bottom: 14px;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
}
#ast-mobile-popup .main-header-menu .sub-menu {
	margin: 0 0 6px 18px;
	padding: 0;
	border: 0;
	border-left: 1px solid #e4e4e4;
	background: transparent;
	width: auto;
	position: static;
}
#ast-mobile-popup .main-header-menu .sub-menu .menu-link {
	padding-top: 10px;
	padding-bottom: 10px;
	padding-left: 14px;
	text-transform: none;
}
#ast-mobile-popup .main-header-menu .sub-menu > .menu-item > .menu-link {
	font-size: 13px;
	font-weight: 400;
}
#ast-mobile-popup .main-header-menu .sub-menu .sub-menu > .menu-item > .menu-link {
	font-size: 13px;
	font-weight: 400;
}
#ast-mobile-popup .main-header-menu .sub-menu .menu-item-has-children > .ast-menu-toggle {
	height: 40px;
}

/* Header avatar after login: always a circle, whatever the uploaded image's proportions (global: loaded for logged-in users too) */
.ast-header-account-link img.avatar {
	box-sizing: border-box;
	aspect-ratio: 1 / 1;
	height: auto !important;
	max-width: none;
	border-radius: 50% !important;
	object-fit: cover;
}

/* +/- follows the real visibility of the submenu (set by vcl-mobile-menu.js), so a closed row never keeps the minus */
#ast-mobile-popup.vcl-sync .main-header-menu .menu-item-has-children > .ast-menu-toggle::before,
#ast-mobile-popup.vcl-sync .main-header-menu .menu-item-has-children.ast-submenu-expanded > .ast-menu-toggle::before,
#ast-mobile-popup.vcl-sync .main-header-menu .menu-item-has-children > .ast-menu-toggle[aria-expanded="true"]::before {
	content: "+";
}
#ast-mobile-popup.vcl-sync .main-header-menu .menu-item-has-children > .ast-menu-toggle.vcl-open::before {
	content: "\2212";
}

/* Account entries at the end of the menu */
#ast-mobile-popup .main-header-menu > .vcl-mm-account > .menu-link {
	display: flex;
	align-items: center;
	min-height: 48px;
}
#ast-mobile-popup .main-header-menu > .vcl-mm-myaccount {
	margin-top: 8px;
	border-top: 1px solid #e4e4e4;
}
#ast-mobile-popup .main-header-menu > .vcl-mm-logout > .menu-link {
	font-weight: 500;
	color: #8b1a1a;
}
#ast-mobile-popup .ast-mobile-popup-content {
	padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Language switcher sits at the end of the menu (moved by vcl_mobile_menu_account_items) */
#ast-mobile-popup .main-header-menu > .lang-item > .menu-link {
	display: flex;
	align-items: center;
	min-height: 48px;
}
