.mega-menu-popup-wrapper {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(#000, 0.7);
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
	z-index: 999;

	&:not([aria-expanded='true']) {
		opacity: 0;
		visibility: hidden;
	}
}

.mega-menu-popup-container {
	max-height: calc(100svh - 166px + 16px);
	padding: 20px 0 37px;
	background-color: $color-white;
	box-shadow: 0px 8px 40px rgba(#000, 0.08);
	box-sizing: border-box;
	overflow: auto;
}

.mega-menu-popup-main {
	display: grid;
	grid-template-columns: 297px 1fr;
	gap: 20px;
	width: 100%;
	max-width: $width-desktop;
	margin: 0 auto;
	padding: 0 16px;
}

.mega-menu-popup-list {
	display: flex;
	flex-flow: column;
}

.mega-menu-popup-btn {
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	gap: 10px;
	height: 56px;
	padding: 16px 20px;
	border-radius: 16px;
	box-sizing: border-box;
	transition:
		color 0.3s ease,
		background-color 0.3s ease;

	&.active {
		color: $color-white;
		background-color: $color-green;

		.mega-menu-popup-btn__icon {
			color: $color-white;
		}
	}

	@include desktop {
		&:not(.active):hover {
			background-color: $color-surface;

			.mega-menu-popup-btn__icon:last-child {
				transform: translateX(2px);
			}
		}
	}
}

.mega-menu-popup-btn__icon {
	width: 24px;
	height: 24px;
	color: $color-green;
	transition:
		color 0.3s ease,
		transform 0.3s ease;
}

.mega-menu-popup-btn__label {
	flex: 1;
	font-weight: 500;
	text-align: left;
}

.mega-menu-popup-content {
	display: flex;
	flex-flow: row wrap;
	gap: 16px;
}

.mega-menu-popup-block-group {
	display: flex;
	flex-flow: column;
	gap: 16px;

	&--popular {
		flex: 0 0 291px;
	}
}

.mega-menu-popup-block {
	display: flex;
	flex-flow: column;
	gap: 12px;
	padding: 24px;
	border-radius: 32px;
	background-color: $color-surface;
	box-sizing: border-box;

	&--country {
		flex: 0 0 312px;
	}

	&--brand {
		flex-basis: calc(100% - 312px - 16px);
	}

	&--capacity {
		flex-basis: calc(100% - 291px - 16px);
	}
}

.mega-menu-popup-block__title {
	font-weight: 500;
	line-height: 18px;
}

.mega-menu-popup-block__links {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(9, auto);
	column-gap: 24px;
	row-gap: 8px;
	list-style: none;
	padding: 0;
}

.mega-menu-popup-block__links__item {
}

.mega-menu-popup-block__links__item-link {
	line-height: 18px;
	color: $color-gray-md;

	@include desktop {
		&:hover {
			color: $color-green;
		}
	}
}

.mega-menu-popup-block__labels {
	display: flex;
	flex-flow: row wrap;
	gap: 10px;
}

.mega-menu-popup-block__labels__item {
}

.mega-menu-popup-block__labels__item-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 43px;
	height: 28px;
	padding: 0 12px;
	border-radius: 16px;
	background-color: $color-white;
	line-height: 18px;
	box-sizing: border-box;

	@include desktop {
		&:hover {
			color: $color-white;
			background-color: $color-green;
		}
	}
}

.mega-menu-popup-catalog-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0px 24px;
	height: 64px;
	border-radius: 16px;
	background-color: rgba($color-green, 0.1);
	font-weight: 500;
	line-height: 18px;
	color: $color-green;
	text-align: center;

	@include desktop {
		&:hover {
			color: $color-white;
			background-color: $color-green;
		}
	}
}
