/* RetroPlus mobile menu — off-canvas drawer with sliding nested panels.
 * Mobile-only: hidden at >=768px. Desktop menu is built separately.
 */

.rps-mobile-menu-wrap {
	display: contents;
}

.rps-mobile-menu__toggle {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: auto;
	padding: 0;
	background: transparent;
	color: #000;
	border: 0;
	cursor: pointer;
}

.rps-mobile-menu__toggle:hover,
.rps-mobile-menu__toggle:focus {
	color: #000;
	background: transparent;
}

.rps-mobile-menu__toggle:focus-visible {
	outline: 2px solid var(--primary, #0088ff);
	outline-offset: 2px;
}

.rps-mobile-menu__toggle-icon {
	width: 42px;
	height: 28px;
	display: block;
	flex-shrink: 0;
}

.rps-mobile-menu__toggle-label {
	font-size: 12px;
	line-height: 15px;
	font-weight: 700;
	text-transform: uppercase;
}

@media (min-width: 1025px) {
	.rps-mobile-menu-wrap,
	.rps-mobile-menu {
		display: none !important;
	}
}

.rps-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 9998;
}

.rps-mobile-menu[hidden] {
	display: none;
}

.rps-mobile-menu__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.rps-mobile-menu[data-rp-open="true"] .rps-mobile-menu__backdrop {
	opacity: 1;
}

.rps-mobile-menu__drawer {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(calc(100vw - 76px), 360px);
	background: #ffffff;
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform 0.25s cubic-bezier(.22, .61, .36, 1);
	/* overflow: hidden; */
}

.rps-mobile-menu[data-rp-open="true"] .rps-mobile-menu__drawer {
	transform: translateX(0);
}

.rps-mobile-menu__close {
	position: absolute;
	top: 20px;
	right: -60px;
	width: 44px;
	height: 44px;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	color: #000;
	border: 0;
	cursor: pointer;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.rps-mobile-menu[data-rp-open="true"] .rps-mobile-menu__close {
	opacity: 1;
}

.rps-mobile-menu__close:hover,
.rps-mobile-menu__close:focus {
	background: #ffffff;
	color: #000;
}

.rps-mobile-menu__close:focus-visible {
	outline: 2px solid var(--primary, #0088ff);
	outline-offset: 2px;
}

.rps-mobile-menu__close-icon {
	width: 36px;
	height: 36px;
}

.rps-mobile-menu__panels {
	position: relative;
	flex: 1;
	width: 100%;
	overflow: hidden;
}

.rps-mobile-menu__panel {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	transform: translateX(100%);
	transition: transform 0.25s cubic-bezier(.22, .61, .36, 1);
}

.rps-mobile-menu__panel[data-rp-state="active"] {
	transform: translateX(0);
}

.rps-mobile-menu__panel[data-rp-state="left"] {
	transform: translateX(-100%);
}

.rps-mobile-menu__back {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 16px;
	font-size: 16px;
	line-height: 19px;
	background: #F6F8FA;
	border: 0;
	border-bottom: 0.5px solid var(--border);
	cursor: pointer;
	font-weight: 700;
	text-transform: uppercase;
	width: 100%;
	text-align: left;
	color: #000;
}

.rps-mobile-menu__back:hover,
.rps-mobile-menu__back:focus {
	color: #000;
	background: #F6F8FA;
}

.rps-mobile-menu__back:focus-visible {
	outline: 2px solid var(--primary, #0088ff);
	outline-offset: -2px;
}

.rps-mobile-menu__back-icon {
	width: 18px;
	height: 19px;
	flex: 0 0 auto;
	margin-left: -4px;
}

.rps-mobile-menu__section-heading {
	margin: 0;
	padding: 16px;
	background: #F6F8FA;
	font-size: 16px;
	line-height: 19px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #000;
	border-bottom: 0.5px solid var(--border);
}

.rps-mobile-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rps-mobile-menu__item {
	display: flex;
	align-items: stretch;
	border-bottom: 0.5px solid var(--border);
}

.rps-mobile-menu__link {
	flex: 1;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 16px;
	color: inherit;
	text-decoration: none;
	min-height: 48px;
}

.rps-mobile-menu__link:focus-visible {
	outline: 2px solid var(--primary, #0088ff);
	outline-offset: -2px;
}

.rps-mobile-menu__icon {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: -1px 0;
}

.rps-mobile-menu__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.rps-mobile-menu__label {
	flex: 1;
	font-size: 14px;
	line-height: 16px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.rps-mobile-menu__expand {
	flex: 0 0 48px;
	display: inline-flex;
	align-items: flex-start;
	justify-content: center;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: #000;
	padding:16px;
}

.rps-mobile-menu__expand:hover,
.rps-mobile-menu__expand:focus {
	color: #000;
	background: transparent;
}

.rps-mobile-menu__expand:focus-visible {
	outline: 2px solid var(--primary, #0088ff);
	outline-offset: -2px;
}

.rps-mobile-menu__expand-icon {
	width: 18px;
	height: 18px;
	margin-top: -1px;
}

body.rps-no-scroll {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.rps-mobile-menu__drawer,
	.rps-mobile-menu__panels,
	.rps-mobile-menu__backdrop,
	.rps-mobile-menu__close {
		transition: none !important;
	}
}
