/* Всплывающие окна сайта (ИБ site_popups), движок: js/hg-popups.js. Править вместе с hg-popups.min.css */

.hg-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.55);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.hg-popup-overlay--visible {
	opacity: 1;
}

.hg-popup {
	position: relative;
	background: #fff;
	border-radius: 12px;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	outline: none;
	box-sizing: border-box;
	transform: translateY(12px);
	transition: transform 0.25s ease;
}

.hg-popup-overlay--visible .hg-popup {
	transform: translateY(0);
}

.hg-popup__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	line-height: 0;
	z-index: 1;
}

.hg-popup__close:before,
.hg-popup__close:after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	background: #333;
}

.hg-popup__close:before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.hg-popup__close:after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.hg-popup__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px 12px 0 0;
}

.hg-popup__body {
	padding: 24px;
}

.hg-popup__title {
	font-size: 22px;
	font-weight: 500;
	color: #292929;
	margin: 0 0 12px;
	padding-right: 24px;
}

.hg-popup__text {
	font-size: 15px;
	line-height: 1.5;
	color: #444;
	margin: 0 0 20px;
}

.hg-popup__text:last-child,
.hg-popup__title:last-child {
	margin-bottom: 0;
}

/* !important и утяжелённый селектор — защита от глобальных стилей
   сайта (a:hover и пр.), поп-ап рендерится поверх любых страниц */
.hg-popup .hg-popup__btn,
.hg-popup .hg-popup__btn:hover,
.hg-popup .hg-popup__btn:focus,
.hg-popup .hg-popup__btn:active,
.hg-popup .hg-popup__btn:visited {
	display: block;
	width: 100%;
	text-align: center;
	background: #FFE400 !important;
	color: #292929 !important;
	font-size: 16px !important;
	font-weight: 500;
	border: none;
	border-radius: 8px;
	padding: 14px 20px;
	cursor: pointer;
	text-decoration: none !important;
	box-sizing: border-box;
	transition: background 0.3s;
	opacity: 1 !important;
}

.hg-popup .hg-popup__btn:hover {
	background: #ECC80E !important;
}

/* Мобильные: карточка прижата к низу */
@media (max-width: 767px) {
	.hg-popup-overlay {
		align-items: flex-end;
		padding: 0;
	}

	.hg-popup {
		max-width: 100%;
		border-radius: 12px 12px 0 0;
		max-height: 85vh;
	}

	.hg-popup__body {
		padding: 20px 16px 24px;
	}

	.hg-popup__title {
		font-size: 19px;
	}
}
