/* Mobile structure only. The original CN files remain available for rollback. */
#mrc-mobile-account,
#mrc-mobile-browse,
#mrc-mobile-categories:not([open]),
.mobile-pages-menu > [class*="mrc-mobile-nav-"] {
	display: none;
}

@media (max-width: 680px) {
	body.mrcoda-mobile-navigation {
		--mrc-account-safe: env(safe-area-inset-bottom, 0px);
	}
	body.mrcoda-mobile-navigation .wd-toolbar {
		display: none !important;
	}
	body.mrcoda-mobile-navigation.sticky-toolbar-on {
		padding-bottom: 0;
	}
	body.mrcoda-mobile-navigation.sticky-toolbar-on.wd-sticky-btn-on-mb {
		padding-bottom: var(--wd-sticky-btn-height);
	}
	body.mrcoda-mobile-navigation .wd-sticky-btn {
		bottom: 0;
	}

	/* Native menu rows, without introducing a new menu design. */
	body.mrcoda-mobile-navigation .mobile-pages-menu > [class*="mrc-mobile-nav-"] {
		display: block;
	}
	body.mrcoda-mobile-navigation .mobile-pages-menu > .mrc-mobile-nav-heading {
		padding: 14px 20px;
		color: var(--color-gray-500);
		font-size: 12px;
		font-weight: 500;
		line-height: 18px;
	}

	body.mrcoda-mobile-navigation :is(#mrc-mobile-account, #mrc-mobile-browse) {
		position: fixed;
		z-index: 200;
		right: max(14px, env(safe-area-inset-right, 0px));
		bottom: calc(14px + var(--mrc-account-safe));
		display: grid;
		place-items: center;
		box-sizing: border-box;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 1px solid #76f229;
		border-radius: 50%;
		background: #76f229;
		color: #0f172a;
		box-shadow: 0 3px 14px #0003;
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
		transition: background-color .16s, color .16s, border-color .16s;
	}
	body.mrcoda-mobile-navigation #mrc-mobile-browse {
		left: max(14px, env(safe-area-inset-left, 0px));
		right: auto;
	}
	.mrc-mobile-float svg {
		display: block;
		width: 21px;
		height: 21px;
	}
	body.mrcoda-mobile-navigation :is(#mrc-mobile-account, #mrc-mobile-browse):focus-visible {
		outline: 2px solid #76f229;
		outline-offset: 3px;
	}
	body.mrcoda-mobile-navigation :is(#mrc-mobile-account, #mrc-mobile-browse):active {
		background: #61d51c;
		color: #0f172a;
		border-color: #61d51c;
	}
	/* Avoid overlapping the existing scroll-to-top and product purchase controls. */
	body.mrcoda-mobile-navigation .scrollToTop {
		bottom: calc(70px + var(--mrc-account-safe));
	}
	body.mrcoda-mobile-navigation:has(.wd-sticky-btn.wd-sticky-btn-shown) :is(#mrc-mobile-account, #mrc-mobile-browse) {
		bottom: calc(14px + var(--mrc-account-safe) + var(--wd-sticky-btn-height));
	}
	body.mrcoda-mobile-navigation:has(.wd-sticky-btn.wd-sticky-btn-shown) .scrollToTop {
		bottom: calc(70px + var(--mrc-account-safe) + var(--wd-sticky-btn-height));
	}
	body.mrc-mobile-categories-open { overflow: hidden; }
	#mrc-mobile-categories {
		position: fixed;
		inset: auto 0 0;
		width: 100%;
		max-width: 452px;
		max-height: calc(100dvh - 30px - env(safe-area-inset-top, 0px));
		box-sizing: border-box;
		margin: 0 auto;
		padding: 0;
		overflow: hidden;
		border: 1px solid #ffffff1c;
		border-bottom: 0;
		border-radius: 14px 14px 0 0;
		background: #0f172a;
		color: #fff;
		color-scheme: dark;
		box-shadow: 0 -10px 32px #0005;
		font: 400 13px/18px Cabin, Arial, sans-serif;
	}
	#mrc-mobile-categories[open] { display: flex; flex-direction: column; }
	#mrc-mobile-categories::backdrop { background: #0006; }
	.mrc-categories-panel {
		min-height: 0;
		overflow: auto;
		overscroll-behavior: contain;
		padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
		scrollbar-width: thin;
		scrollbar-color: #ffffff40 transparent;
	}
	.mrc-categories-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding-left: 10px; border-bottom: 1px solid #ffffff12; }
	.mrc-categories-heading h2 { margin: 0; color: #fff; font: 500 14px/20px Cabin, Arial, sans-serif; }
	.mrc-categories-close { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #ffffffa6; box-shadow: none; cursor: pointer; }
	.mrc-mobile-categories .mrc-nav-icon { display: block; flex: none; width: 18px; height: 18px; color: #ffffffa6; }
	.mrc-categories-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 4px 0; }
	.mrc-mobile-categories :is(.mrc-categories-link, .mrc-categories-all) { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 46px; padding: 8px 10px; box-sizing: border-box; background: transparent; color: #ffffffe0; text-decoration: none; font: inherit; transition: background-color .16s, color .16s; }
	.mrc-mobile-categories .mrc-categories-link { border-bottom: 1px solid #ffffff0d; }
	.mrc-mobile-categories .mrc-categories-link:nth-last-child(-n+2) { border-bottom: 0; }
	.mrc-mobile-categories .mrc-categories-all { margin: 6px 0 0; border-radius: 6px; background: #76f2290e; }
	.mrc-categories-all .mrc-nav-icon { color: #76f229; }
	.mrc-categories-all .mrc-nav-icon:last-child { margin-left: auto; }
	.mrc-mobile-categories :is(a, button):focus-visible { outline: 2px solid #76f229; outline-offset: -3px; }
	.mrc-mobile-categories :is(a, button):active { background: #172b25; color: #76f229; }
}

@media (max-width: 680px) and (hover: hover) and (pointer: fine) {
	body.mrcoda-mobile-navigation :is(#mrc-mobile-account, #mrc-mobile-browse):hover {
		background: #8aff43;
		color: #0f172a;
		border-color: #8aff43;
	}
	body.mrcoda-mobile-navigation :is(#mrc-mobile-account, #mrc-mobile-browse):hover:active { background: #61d51c; border-color: #61d51c; }
	.mrc-mobile-categories :is(a, button):hover { background: #172b25; color: #76f229; }
	.mrc-mobile-categories :is(a, button):hover .mrc-nav-icon { color: inherit; }
}

@media (prefers-reduced-motion: reduce) {
	body.mrcoda-mobile-navigation :is(#mrc-mobile-account, #mrc-mobile-browse),
	.mrc-mobile-categories :is(.mrc-categories-link, .mrc-categories-all) {
		transition: none;
	}
}
