/*
 * OMTRA mega menu - mobile/tablet sliding panels inside the theme sidebar (below 1011px).
 * Same look as the theme sidebar (white uppercase on blue, orange separators), any depth.
 * Selectors start with #om-mmm: the theme sidebar rules on .menu-item / a must not win.
 */

#om-mmm {
	--om-mmm-orange: #f57c00;
	--om-mmm-soft-orange: #ffb36b;
	--om-mmm-speed: 0.28s;
	position: relative;
	margin: 0;
	padding: 0;
	transition: min-height var(--om-mmm-speed) ease;
}

#om-mmm .om-mmm__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

#om-mmm .om-mmm__item {
	position: static;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none; /* the theme gives sidebar li a disc marker */
	overflow: visible; /* the theme clips sidebar li (overflow:hidden) */
	transition: opacity 0.2s ease, visibility 0s;
}

#om-mmm .om-mmm__item::before,
#om-mmm .om-mmm__item::after,
#om-mmm .om-mmm__link::before,
#om-mmm .om-mmm__link::after {
	content: none;
}

/* Rows: big enough for a thumb (48px). */
#om-mmm .om-mmm__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	height: auto;
	margin: 0;
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--om-mmm-orange);
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: #fff;
	font-family: Roboto, "Source Sans Pro", Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 1px;
	text-align: left;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: rgba(255, 255, 255, 0.08);
}

#om-mmm .om-mmm__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}

#om-mmm .om-mmm__chevron {
	flex: 0 0 auto;
	display: block;
	color: #fff;
}

#om-mmm .om-mmm__link .om-external-link-icon-wrap {
	position: static;
	flex: 0 0 auto;
	display: inline-flex;
	width: 14px;
	height: 14px;
	margin: 0;
	transform: none;
}

#om-mmm .om-mmm__link .om-external-link-icon-wrap svg {
	width: 14px;
	height: 14px;
	color: #fff;
}

#om-mmm .om-mmm__link .om-external-link-icon-wrap svg * {
	fill: currentColor;
}

#om-mmm .om-mmm__link[aria-current="page"] .om-mmm__label {
	color: var(--om-mmm-soft-orange);
}

#om-mmm .om-mmm__link:focus {
	outline: none;
}

/* Inside the box: the theme containers clip anything drawn outside. */
#om-mmm .om-mmm__link:focus-visible,
#om-mmm .om-mmm__back:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -2px;
}

/* Items hidden with the theme's "hide" switch stay hidden here too (as on desktop). */
#om-mmm .om-mmm__list--root > .hidden-voice {
	display: none;
}

/* "Vai a ...": the page of the item that opened the panel. */
#om-mmm .om-mmm__item--overview .om-mmm__link {
	color: var(--om-mmm-soft-orange);
}

/* ---------- Panels ---------- */

#om-mmm .om-mmm__panel {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	visibility: hidden;
	opacity: 0;
	transform: translateX(32px);
	pointer-events: none;
	transition: opacity var(--om-mmm-speed) ease, transform var(--om-mmm-speed) ease, visibility 0s linear var(--om-mmm-speed);
}

#om-mmm .om-mmm__item.is-open > .om-mmm__panel {
	visibility: visible;
	opacity: 1;
	transform: none;
	pointer-events: auto;
	transition: opacity var(--om-mmm-speed) ease, transform var(--om-mmm-speed) ease, visibility 0s;
}

/* The level underneath steps aside while a panel is open. */
#om-mmm .om-mmm__list.has-open > .om-mmm__item:not(.is-open),
#om-mmm .om-mmm__list.has-open > .om-mmm__item.is-open > .om-mmm__open,
#om-mmm .om-mmm__panel.is-covered > .om-mmm__back,
#om-mmm .om-mmm__panel.is-covered > .om-mmm__title {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

/* A covered (taller) panel must not catch taps outside the open one. */
#om-mmm .om-mmm__item.is-open > .om-mmm__panel.is-covered,
#om-mmm .om-mmm__list.has-open {
	pointer-events: none;
}

#om-mmm .om-mmm__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 48px;
	min-width: 48px;
	margin: 0 0 2px;
	padding: 0 12px 0 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: rgba(255, 255, 255, 0.85);
	font-family: Roboto, "Source Sans Pro", Arial, sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

#om-mmm .om-mmm__title {
	position: relative;
	margin: 0 0 10px;
	padding: 0 0 14px;
	color: #fff;
	font-family: "Source Sans Pro", Roboto, Arial, sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: none;
	overflow-wrap: anywhere;
}

#om-mmm .om-mmm__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 46px;
	height: 3px;
	background: var(--om-mmm-orange);
}

/* The theme accordion around the menu must grow with the open panel. */
.om-mmm-host {
	max-height: none !important;
	overflow: visible !important;
}

@media (prefers-reduced-motion: reduce) {
	#om-mmm,
	#om-mmm .om-mmm__item,
	#om-mmm .om-mmm__panel {
		transition: none !important;
	}
}
