/**
 * Mobile / adaptive menu UI — Export Precision.
 * Content-height sheet + stable row alignment (no float on expand) + accordion.
 */

/* --------------------------------------------------------------------------
   Drawer shell — hug content, dim the page below
   -------------------------------------------------------------------------- */

.ast-mobile-popup-drawer.ast-mobile-popup-full-width {
	align-items: flex-start;
}

.ast-mobile-popup-drawer .ast-mobile-popup-overlay {
	background: rgba(11, 18, 32, 0.48);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	transition: opacity 0.32s ease;
}

.ast-mobile-popup-drawer.ast-mobile-popup-full-width .ast-mobile-popup-inner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: auto !important;
	width: 100%;
	height: auto !important;
	max-height: min(92vh, 100%);
	min-height: 0 !important;
	margin: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--b2b-white, #fff);
	border-radius: 0 0 16px 16px;
	box-shadow: 0 18px 48px rgba(11, 18, 32, 0.22);
	transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.ast-mobile-popup-drawer .ast-mobile-popup-header {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	height: 3.25rem;
	min-height: 3.25rem !important;
	max-height: 3.25rem;
	padding: 0 0.75rem !important;
	box-sizing: border-box;
	border-bottom: 1px solid var(--b2b-border, #dde3ea);
	background: var(--b2b-white, #fff);
}

.ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close,
.ast-mobile-popup-drawer .menu-toggle-close {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: center !important;
	width: 2.5rem !important;
	height: 2.5rem !important;
	min-width: 2.5rem;
	min-height: 2.5rem;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 8px;
	outline: none !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	line-height: 1 !important;
	font-size: 0 !important;
	background: var(--b2b-bg-light, #f3f5f7);
	color: var(--b2b-primary, #0b1220);
	transition: background 0.2s ease, color 0.2s ease;
}

.ast-mobile-popup-drawer .menu-toggle-close .ast-svg-iconset,
.ast-mobile-popup-drawer .menu-toggle-close .ahfb-svg-iconset,
.ast-mobile-popup-drawer .menu-toggle-close .ast-inline-flex {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.ast-mobile-popup-drawer .menu-toggle-close svg,
.ast-mobile-popup-drawer .menu-toggle-close .ast-mobile-svg {
	width: 1.25rem !important;
	height: 1.25rem !important;
	display: block !important;
	margin: 0 !important;
}

.ast-mobile-popup-drawer .menu-toggle-close:hover,
.ast-mobile-popup-drawer .menu-toggle-close:focus,
.ast-mobile-popup-drawer .menu-toggle-close:focus-visible {
	background: rgba(58, 122, 140, 0.12);
	color: var(--b2b-accent, #3a7a8c);
	outline: none !important;
	box-shadow: none !important;
	border-style: none !important;
}

.ast-mobile-popup-drawer .ast-mobile-popup-content {
	padding-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   Menu list — kill Astra column+center (that caused the float on expand)
   -------------------------------------------------------------------------- */

.ast-builder-menu-mobile .main-header-menu,
.ast-mobile-popup-content .main-header-menu,
#ast-mobile-header .main-header-menu,
.ast-mobile-popup-drawer .main-header-menu {
	display: block !important;
	padding: 0.15rem 0 0.5rem;
	margin: 0;
	line-height: normal !important;
}

.ast-builder-menu-mobile .main-header-menu > .menu-item,
.ast-mobile-popup-content .main-header-menu > .menu-item,
#ast-mobile-header .main-header-menu > .menu-item,
.ast-mobile-popup-drawer .main-header-menu > .menu-item {
	display: block !important;
	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	line-height: normal !important;
	flex-direction: unset !important;
	justify-content: unset !important;
	align-items: unset !important;
	border-bottom: 1px solid rgba(15, 39, 68, 0.06);
}

.ast-builder-menu-mobile .main-header-menu > .menu-item:last-child,
.ast-mobile-popup-content .main-header-menu > .menu-item:last-child,
.ast-mobile-popup-drawer .main-header-menu > .menu-item:last-child {
	border-bottom: none;
}

/* Top-level row: text vertically centered */
.ast-builder-menu-mobile .main-header-menu > .menu-item > .menu-link,
.ast-mobile-popup-content .main-header-menu > .menu-item > .menu-link,
#ast-mobile-header .main-header-menu > .menu-item > .menu-link,
.ast-mobile-popup-drawer .main-header-menu > .menu-item > .menu-link {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	width: 100%;
	height: 3.25rem;
	min-height: 3.25rem;
	max-height: 3.25rem;
	padding: 0 1.25rem !important;
	margin: 0 !important;
	font-family: var(--b2b-font-body, inherit);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2 !important;
	color: var(--b2b-primary, #0b1220);
	background: transparent;
	box-sizing: border-box;
	transition: background 0.2s ease, color 0.2s ease;
}

.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .menu-link,
.ast-mobile-popup-content .main-header-menu > .menu-item-has-children > .menu-link,
.ast-mobile-popup-drawer .main-header-menu > .menu-item-has-children > .menu-link {
	padding-right: 3.5rem !important;
}

.ast-builder-menu-mobile .main-header-menu > .menu-item > .menu-link:hover,
.ast-builder-menu-mobile .main-header-menu > .menu-item > .menu-link:focus,
.ast-mobile-popup-content .main-header-menu > .menu-item > .menu-link:hover,
.ast-mobile-popup-drawer .main-header-menu > .menu-item > .menu-link:hover {
	background: var(--b2b-bg-light, #f3f5f7);
	color: var(--b2b-accent, #3a7a8c);
}

.ast-builder-menu-mobile .main-header-menu > .current-menu-item > .menu-link,
.ast-mobile-popup-content .main-header-menu > .current-menu-item > .menu-link,
.ast-mobile-popup-drawer .main-header-menu > .current-menu-item > .menu-link {
	background: rgba(58, 122, 140, 0.08);
	color: var(--b2b-accent, #3a7a8c);
	box-shadow: inset 3px 0 0 var(--b2b-accent, #3a7a8c);
}

/* Hide Astra in-link duplicate arrow */
.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .menu-link .ast-header-navigation-arrow,
.ast-mobile-popup-content .main-header-menu > .menu-item-has-children > .menu-link .ast-header-navigation-arrow,
.ast-mobile-popup-drawer .main-header-menu > .menu-item-has-children > .menu-link .ast-header-navigation-arrow {
	display: none !important;
}

/*
 * Chevron: pinned to the 3.25rem top row, vertically centered.
 * Never transform the button itself (Astra rotateX caused the float).
 * Only rotate the inner icon.
 */
.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .ast-menu-toggle,
.ast-mobile-popup-content .main-header-menu > .menu-item-has-children > .ast-menu-toggle,
#ast-mobile-header .main-header-menu > .menu-item-has-children > .ast-menu-toggle,
.ast-mobile-popup-drawer .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle {
	position: absolute !important;
	top: 0.375rem !important; /* (3.25rem - 2.5rem) / 2 */
	right: 0.55rem !important;
	left: auto !important;
	bottom: auto !important;
	width: 2.5rem !important;
	height: 2.5rem !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 8px;
	outline: none !important;
	box-shadow: none !important;
	background: transparent;
	color: var(--b2b-body-muted, #5c6b7a);
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	transform: none !important;
	transition: background 0.2s ease, color 0.2s ease;
	z-index: 3;
}

.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .ast-menu-toggle:hover,
.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .ast-menu-toggle:focus,
.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .ast-menu-toggle:focus-visible,
.ast-mobile-popup-content .main-header-menu > .menu-item-has-children > .ast-menu-toggle:hover,
.ast-mobile-popup-drawer .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle:focus-visible {
	background: var(--b2b-bg-light, #f3f5f7);
	color: var(--b2b-accent, #3a7a8c);
	outline: none !important;
	border-style: none !important;
	box-shadow: none !important;
	transform: none !important;
}

.ast-builder-menu-mobile .main-header-menu > .ast-submenu-expanded > .ast-menu-toggle,
.ast-mobile-popup-content .main-header-menu > .ast-submenu-expanded > .ast-menu-toggle,
.ast-mobile-popup-drawer .main-header-bar-navigation .ast-submenu-expanded > .ast-menu-toggle,
.ast-mobile-popup-content .ast-submenu-expanded > .ast-menu-toggle {
	color: var(--b2b-accent, #3a7a8c);
	background: rgba(58, 122, 140, 0.1);
	transform: none !important;
}

.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .ast-menu-toggle .ast-icon,
.ast-mobile-popup-content .main-header-menu > .menu-item-has-children > .ast-menu-toggle .ast-icon,
.ast-mobile-popup-drawer .main-header-bar-navigation .menu-item-has-children > .ast-menu-toggle .ast-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transform: rotate(0deg);
	transition: transform 0.28s ease;
}

.ast-builder-menu-mobile .main-header-menu > .ast-submenu-expanded > .ast-menu-toggle .ast-icon,
.ast-mobile-popup-content .main-header-menu > .ast-submenu-expanded > .ast-menu-toggle .ast-icon,
.ast-mobile-popup-drawer .main-header-bar-navigation .ast-submenu-expanded > .ast-menu-toggle .ast-icon {
	transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Products accordion panel
   -------------------------------------------------------------------------- */

.ast-builder-menu-mobile .insole-nav-products > .sub-menu,
.ast-mobile-popup-content .insole-nav-products > .sub-menu,
#ast-mobile-header .insole-nav-products > .sub-menu,
.ast-mobile-popup-drawer .insole-nav-products > .sub-menu {
	position: static !important;
	left: auto !important;
	top: auto !important;
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0.1rem 0 0.35rem !important;
	border: none !important;
	border-radius: 0;
	background: rgba(243, 245, 247, 0.95) !important;
	box-shadow: none !important;
	opacity: 1;
	visibility: visible;
	transform: none !important;
	overflow: hidden;
	line-height: normal !important;
}

.ast-builder-menu-mobile .insole-nav-product-cat,
.ast-mobile-popup-content .insole-nav-product-cat,
.ast-mobile-popup-drawer .insole-nav-product-cat {
	display: block !important;
	margin: 0;
	padding: 0;
	line-height: normal !important;
	flex-direction: unset !important;
	justify-content: unset !important;
}

.ast-builder-menu-mobile .insole-nav-product-cat > .menu-link,
.ast-mobile-popup-content .insole-nav-product-cat > .menu-link,
#ast-mobile-header .insole-nav-product-cat > .menu-link,
.ast-mobile-popup-drawer .insole-nav-product-cat > .menu-link {
	display: flex !important;
	align-items: center !important;
	height: 2.65rem;
	min-height: 2.65rem;
	padding: 0 1.25rem 0 1.85rem !important;
	border-bottom: none !important;
	font-size: 0.92rem !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	color: var(--b2b-text, #121820) !important;
	background: transparent;
	transition: background 0.2s ease, color 0.2s ease;
}

.ast-builder-menu-mobile .insole-nav-product-cat > .menu-link:hover,
.ast-mobile-popup-content .insole-nav-product-cat > .menu-link:hover,
.ast-mobile-popup-drawer .insole-nav-product-cat > .menu-link:hover {
	background: rgba(255, 255, 255, 0.85) !important;
	color: var(--b2b-accent, #3a7a8c) !important;
}

.ast-builder-menu-mobile .insole-nav-product-cat > .ast-menu-toggle,
.ast-mobile-popup-content .insole-nav-product-cat > .ast-menu-toggle,
.ast-builder-menu-mobile .insole-nav-product-cat > .menu-link .ast-icon,
.ast-mobile-popup-content .insole-nav-product-cat > .menu-link .ast-icon {
	display: none !important;
}

/* Staggered entrance when drawer opens */
.ast-mobile-popup-drawer.active .main-header-menu > .menu-item.insole-nav-enter {
	animation: insoleNavItemIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(var(--insole-nav-i, 0) * 40ms);
}

@keyframes insoleNavItemIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ast-mobile-popup-drawer .ast-mobile-popup-inner,
	.ast-mobile-popup-drawer .ast-mobile-popup-overlay,
	.ast-builder-menu-mobile .main-header-menu > .menu-item-has-children > .ast-menu-toggle .ast-icon,
	.ast-mobile-popup-drawer.active .main-header-menu > .menu-item.insole-nav-enter {
		transition: none !important;
		animation: none !important;
	}
}
