/* Mobile Menu — defaults follow the Figma tokens, everything is overridable
   from the widget's Style tab. */

.cgs-mm {
	--cgs-mm-speed: 360ms;
	--cgs-mm-ease: cubic-bezier(.22, .61, .36, 1);
}

/* -------------------------------- Trigger -------------------------------- */

.cgs-mm__trigger-wrap {
	display: flex;
	justify-content: flex-end;
}

.cgs-mm__trigger {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px;
	font: inherit;
	line-height: 1;
	color: #ef4132;
	cursor: pointer;
	background-color: #fff;
	border: 0;
	border-radius: 999px;
}

/* --------------------------- Closed navigation bar ------------------------ */

.cgs-mm__closed {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 12px 20px;
	background-color: transparent;
	border: 0;
	border-radius: 999px;
}

.cgs-mm-closed-bar .cgs-mm__trigger-wrap {
	justify-content: stretch;
}

.cgs-mm__closed-logo {
	display: inline-flex;
	flex: 0 1 auto;
	align-items: center;
	justify-content: flex-start;
	height: 50px;
	max-width: calc(100% - 70px);
	overflow: hidden;
	border-radius: 12px;
}

.cgs-mm__closed-logo img {
	display: block;
	width: auto;
	height: 50px;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}

.cgs-mm__closed-logo--empty {
	min-width: 120px;
}

.cgs-mm__trigger-icon,
.cgs-mm__close,
.cgs-mm__caret,
.cgs-mm__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.cgs-mm__trigger-icon svg,
.cgs-mm__close svg,
.cgs-mm__caret svg,
.cgs-mm__cta-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---------------------------- Overlay and panel --------------------------- */

.cgs-mm__overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background-color: rgba(0, 0, 0, .8);
	-webkit-backdrop-filter: blur(8.65px);
	backdrop-filter: blur(8.65px);
	opacity: 0;
	transition: opacity var(--cgs-mm-speed) var(--cgs-mm-ease);
}

.cgs-mm__panel {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: 100dvh;
	overflow-y: auto;
	overscroll-behavior: contain;
	background-color: #fff;
	border-radius: 0 0 30px 30px;
	transform: translateY(-100%);
	transition: transform var(--cgs-mm-speed) var(--cgs-mm-ease);
	-webkit-overflow-scrolling: touch;
}

.cgs-mm-from-right .cgs-mm__panel {
	right: 0;
	left: auto;
	height: 100dvh;
	max-height: none;
	border-radius: 30px 0 0 30px;
	transform: translateX(100%);
}

.cgs-mm-from-left .cgs-mm__panel {
	height: 100dvh;
	max-height: none;
	border-radius: 0 30px 30px 0;
	transform: translateX(-100%);
}

.cgs-mm.is-open .cgs-mm__overlay {
	opacity: 1;
}

.cgs-mm.is-open .cgs-mm__panel {
	transform: none;
}

/* Editor helper. Never applies on the published page. */
.cgs-mm--preview .cgs-mm__overlay,
.cgs-mm--preview .cgs-mm__panel {
	position: absolute;
	transform: none;
	opacity: 1;
}

.cgs-mm--preview .cgs-mm__panel {
	max-height: none;
}

/* ------------------------------ Panel header ------------------------------ */

.cgs-mm__bar {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 20px;
	background-color: #ef4132;
}

.cgs-mm__logo {
	display: inline-flex;
	align-items: center;
	max-width: 70%;
}

.cgs-mm__logo img {
	display: block;
	width: auto;
	height: 50px;
	max-width: 100%;
	object-fit: contain;
}

.cgs-mm__logo--empty {
	min-height: 0;
}

.cgs-mm__close {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	padding: 0;
	font-size: 20px;
	color: #ef4132;
	cursor: pointer;
	background-color: #fff;
	border: 0;
	border-radius: 50%;
	transition: transform var(--cgs-mm-speed) var(--cgs-mm-ease);
}

.cgs-mm__close:hover {
	transform: rotate(90deg);
}

/* --------------------------------- Body ---------------------------------- */

.cgs-mm__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 28px 20px;
}

.cgs-mm__nav {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-end;
	text-align: right;
}

.cgs-mm__divider {
	display: block;
	width: 100%;
	height: 1px;
	background-color: rgba(0, 0, 0, .12);
}

/* ----------------------------- Dropdown group ----------------------------- */

.cgs-mm__group {
	width: 100%;
}

.cgs-mm__group-toggle {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	padding: 0;
	font: inherit;
	font-size: 24px;
	font-weight: 700;
	color: #ef4132;
	text-align: inherit;
	cursor: pointer;
	background: none;
	border: 0;
}

.cgs-mm__caret {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	font-size: 12px;
	color: #fff;
	background-color: #ef4132;
	border-radius: 50%;
	transition: transform var(--cgs-mm-speed) var(--cgs-mm-ease);
}

.cgs-mm__group:not(.is-open) .cgs-mm__caret {
	transform: rotate(180deg);
}

/* Height animation without hardcoding a height. */
.cgs-mm__sub {
	display: grid;
	grid-template-rows: 0fr;
	width: 100%;
	transition: grid-template-rows var(--cgs-mm-speed) var(--cgs-mm-ease);
}

.cgs-mm__group.is-open .cgs-mm__sub {
	grid-template-rows: 1fr;
}

.cgs-mm__sub-inner {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	overflow: hidden;
}

.cgs-mm__group.is-open .cgs-mm__sub-inner {
	padding: 10px 0;
}

/* ------------------------------- Image cards ------------------------------ */

.cgs-mm__card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	min-height: 64px;
	overflow: hidden;
	color: #000a1b;
	text-decoration: none;
	background-color: #f3f2f2;
	border-radius: 15px;
	transition: background-color .25s ease, color .25s ease;
}

.cgs-mm__card.is-active {
	color: #fff;
	background-color: #ef4132;
}

.cgs-mm__card-media {
	display: flex;
	flex: 0 0 74px;
	align-items: flex-end;
	align-self: stretch;
	justify-content: center;
	width: 74px;
	overflow: hidden;
}

.cgs-mm__card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: bottom center;
}

.cgs-mm__card-label {
	flex: 1 1 auto;
	padding: 0 20px 0 10px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

/* ------------------------------- Plain links ------------------------------ */

.cgs-mm__link {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	min-height: 48px;
	font-size: 24px;
	font-weight: 700;
	color: rgba(0, 0, 0, .7);
	text-decoration: none;
	transition: color .25s ease;
}

/* ---------------------------------- CTA ----------------------------------- */

.cgs-mm__cta {
	display: flex;
	gap: 4px;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 16px 20px;
	margin-top: 10px;
	font-size: 16px;
	color: #fff;
	text-decoration: none;
	text-transform: uppercase;
	background-color: #ef4132;
	border-radius: 999px;
	transition: background-color .25s ease, color .25s ease;
}

.cgs-mm__cta-icon {
	transform: rotate(45deg);
}

/* ------------------------------ Scroll lock ------------------------------- */

html.cgs-mm-locked,
body.cgs-mm-locked {
	overflow: hidden;
	touch-action: none;
}

@media (prefers-reduced-motion: reduce) {

	.cgs-mm__overlay,
	.cgs-mm__panel,
	.cgs-mm__caret,
	.cgs-mm__sub,
	.cgs-mm__close {
		transition: none;
	}
}
