/* =============================================
   03_WIDGETS / w-popup
   Модальные окна (SMS, email, восстановление пароля).
   ============================================= */

/* ── Overlay ── */

body::after {
	content: "";
	background-color: rgba(0, 0, 0, 0.5);
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	opacity: 0;
	transition: opacity 0.8s ease 0s;
	pointer-events: none;
	z-index: 149;
}
[data-fls-popup-open] body::after {
	opacity: 1;
}

/* ── Popup container ── */

[data-fls-popup] {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	padding: 30px 10px;
	transition: visibility 0.8s ease 0s;
	visibility: hidden;
	pointer-events: none;
}
[data-fls-popup][data-fls-popup-active] {
	z-index: 150;
	visibility: visible;
	overflow: auto;
	pointer-events: auto;
}
[data-fls-popup-active] [data-fls-popup-body] {
	visibility: visible;
	transform: scale(1);
}
[data-fls-popup-wrapper] {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100%;
	flex: 1 1 auto;
	width: 100%;
	justify-content: center;
}
[data-fls-popup-body] {
	visibility: hidden;
	transform: scale(0);
	transition: transform 0.3s ease 0s, visibility 0.3s ease 0s;
	background-color: var(--grayColor);
	width: 100%;
	max-width: 463px;
	border-radius: 20px;
}
.popup-recpass [data-fls-popup-body] {
	max-width: 513px;
}
[data-fls-popup-youtube-place] iframe {
	width: 100%;
	aspect-ratio: 16/9;
}

/* ── Popup content ── */

.popup__cont {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.popup__top {
	text-align: center;
}
.popup__top:not(:last-child) {
	margin-bottom: 40px;
}
.popup__title:not(:last-child) {
	margin-bottom: 20px;
}
.popup__toptext {
	font-size: 16px;
	line-height: 125%;
	font-weight: 300;
	color: var(--greenColor5);
}
.popup__inps {
	display: flex;
	gap: 10px;
	justify-content: center;
}
.popup__inps:not(:last-child) {
	margin-bottom: 20px;
}
.popup__inps .input {
	padding: 11px 10px;
	text-align: center;
	width: 38px;
	flex: 0 0 38px;
	border-radius: 10px;
}
.popup__bottom {
	display: flex;
	align-items: center;
	gap: 2px;
	justify-content: space-between;
	font-size: 14px;
	line-height: 121.428571%;
	width: 100%;
}
.popup__bottom:not(:last-child) {
	margin-bottom: 20px;
}
.popup__bottleft span {
	color: var(--greenColor4);
}
.popup__bottleft.popup__bottleft--icon-again {
	display: flex;
	flex-direction: row-reverse;
	gap: 10px;
	font-size: 14px;
	line-height: 121.428571%;
	color: var(--greenColor4);
	transition: color 0.3s;
}
.popup__bottleft.popup__bottleft--icon-again::before {
	font-size: 18px;
}
.popup__changetel {
	display: flex;
	flex-direction: row-reverse;
	gap: 10px;
	color: var(--greenColor5);
	transition: color 0.3s;
}
.popup__changetel::before {
	font-size: 18px;
}
.popup__footbutton {
	width: 100%;
}
.popup__form {
	width: 100%;
}

/* ── Responsive ── */

@media (max-width: 63.99875em) {
	.popup__cont {
		padding: 20px;
	}
	.popup__bottom:has(.popup__bottleft--icon-again) .popup__changetel {
		font-size: 12px;
	}
	.popup__bottleft.popup__bottleft--icon-again {
		font-size: 12px;
	}
	.popup__bottleft.popup__bottleft--icon-again::before {
		font-size: 14px;
	}
}
@media (width <= 23.3125em) {
	.popup__bottom {
		font-size: 12px;
	}
}
@media (min-width: 63.99875em) {
	.popup__cont {
		padding: 40px;
	}
	.popup__form .formblock__rows:not(:last-child) {
		margin-bottom: 40px;
	}
}

/* ── Hover ── */

@media (any-hover: hover), (pointer: fine) {
	html:not([data-fls-touch]) .popup__bottleft.popup__bottleft--icon-again:hover {
		color: var(--greenColor1);
	}
	html:not([data-fls-touch]) .popup__changetel:hover {
		color: var(--greenColor4);
	}
}
