.reviews-viewer-popup {
	position: fixed;
	inset: 0;
	display: flex;
	flex-flow: column;
	background-color: $color-black;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
	overflow: auto;
	z-index: 999999;

	&:not(.visible) {
		opacity: 0;
		visibility: hidden;
	}
}

.reviews-viewer-popup__container {
	position: relative;
	display: flex;
	flex-flow: column;
	gap: 20px;
	align-self: center;
	width: calc(100% - 32px);
	max-width: 1250px;
	margin: 86px 0 60px;
}

.reviews-viewer-popup__close-btn {
	position: absolute;
	top: -54px;
	right: -54px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background-color: rgba($color-white, 0.1);
	box-shadow: 0px 8px 40px rgba(0, 0, 0, 0.08);
	color: $color-white;
	z-index: 1;

	svg {
		width: 24px;
		height: 24px;
	}
}

[data-reviews-viewer-popup-content] {
	overflow: hidden;
	border-radius: 32px;
}

[data-reviews-viewer-popup-gallery] {
	overflow: hidden;
}

.reviews-viewer-popup__content {
	position: relative;
	display: grid;
	grid-template-columns: 520px 1fr;
	gap: 24px;
	padding: 24px;
	background-color: $color-white;
}

.reviews-viewer-popup__nav-btn {
	position: absolute;
	top: calc((50% - 24px / 2) - 59px);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: $color-white;
	box-shadow: 0px 8px 40px rgba(0, 0, 0, 0.08);
	transition:
		opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
		visibility 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
		transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	z-index: 9;

	&:disabled {
		opacity: 0;
		visibility: hidden;
		transform: scale(0);
	}

	svg {
		width: 24px;
		height: 24px;
		color: $color-green;
	}

	&--prev {
		left: calc(-64px / 2);
	}

	&--next {
		right: calc(-64px / 2);
	}

	@include desktop {
		&:hover {
			transform: scale(1.2);

			svg {
				transform: scale(0.9);
			}
		}
	}
}

.reviews-viewer-popup__content__cover {
	width: 100%;
	aspect-ratio: 2 / 2;
	border-radius: 24px;
	pointer-events: none;
	object-fit: cover;
	object-position: center;
}

.reviews-viewer-popup__content__main {
	display: flex;
	flex-flow: column;
	align-items: flex-start;
	gap: 20px;
}

.reviews-viewer-popup__content__head {
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	gap: 16px;
}

.reviews-viewer-popup__content__head__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	aspect-ratio: 2 / 2;
	background-color: $color-green;
	color: $color-white;
	font-weight: 700;
	font-size: 24px;
	letter-spacing: -0.03em;
	border-radius: 50%;
	overflow: hidden;

	img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
		pointer-events: none;
	}
}

.reviews-viewer-popup__content__head__user {
	display: flex;
	flex-flow: column;
	gap: 6px;
}

.reviews-viewer-popup__content__head__user-name {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.03em;
}

.reviews-viewer-popup__content__head__user-date {
	font-size: 16px;
	line-height: 18px;
	color: $color-gray-md;
}

.reviews-viewer-popup__content__text {
	font-size: 16px;
	line-height: 150%;
}

.reviews-viewer-popup__content__photos {
	display: flex;
	flex-flow: row wrap;
	gap: 10px;
}

.reviews-viewer-popup__content__photo-item {
	width: 100px;
	aspect-ratio: 2 / 2;
	border-radius: 20px;
	overflow: hidden;

	img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
		pointer-events: none;
	}
}

.reviews-viewer-popup__content__social-link {
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	padding: 6px 16px;
	margin-top: auto;
	border-radius: 12px;
	background-color: $color-surface;
	font-size: 16px;
	font-weight: 500;
	line-height: 18px;
	box-sizing: border-box;

	svg {
		width: 24px;
		height: 24px;
	}
}

.reviews-viewer-popup__photo-slide {
	width: 100% !important;
	max-width: 145px;
	height: unset !important;
	aspect-ratio: 145 / 98;
	border-radius: 24px;
	overflow: hidden;

	img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
		pointer-events: none;
	}

	&:not(.swiper-slide-thumb-active) {
		opacity: 0.3;
	}
}
