:root.sgw-popup-is-open {
	overflow: hidden;
}

.sgw-popup-overlay[hidden] {
	display: none !important;
}

.sgw-popup-overlay {
	--sgw-popup-radius: 24px;
	--sgw-popup-image-width: 44%;
	--sgw-popup-mobile-image-height: 280px;
	--sgw-popup-image-scale: 100%;
	--sgw-popup-title-size: 38px;
	--sgw-popup-title-mobile-size: 32px;
	--sgw-popup-content-size: 17px;
	--sgw-popup-content-mobile-size: 16px;
	--sgw-popup-content-line-height: 1.5;
	--sgw-popup-content-mobile-line-height: 1.45;
	--sgw-popup-paragraph-spacing: 10px;
	--sgw-popup-paragraph-mobile-spacing: 8px;
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 24px;
	overflow-y: auto;
	background: rgba(12, 25, 38, 0.68);
	opacity: 0;
	transition: opacity 0.22s ease;
}

.sgw-popup-overlay.is-visible {
	opacity: 1;
}

.sgw-popup-dialog {
	position: relative;
	display: grid;
	grid-template-columns: var(--sgw-popup-image-width) minmax(0, 1fr);
	width: min(920px, 100%);
	max-height: calc(100vh - 48px);
	overflow: hidden auto;
	border-radius: var(--sgw-popup-radius);
	background: #fff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
	color: #20303c;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.sgw-popup-overlay.is-visible .sgw-popup-dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.sgw-popup-dialog.no-image {
	display: block;
	width: min(680px, 100%);
}

.sgw-popup-close {
	position: absolute;
	z-index: 2;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(24, 44, 58, 0.16);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 5px 18px rgba(24, 44, 58, 0.18);
	color: #20303c;
	cursor: pointer;
	transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.sgw-popup-close:hover {
	background: #fff;
	box-shadow: 0 7px 22px rgba(24, 44, 58, 0.24);
	transform: rotate(7deg) scale(1.05);
}

.sgw-popup-close:focus-visible {
	outline: 3px solid #157dc3;
	outline-offset: 3px;
}

.sgw-popup-close svg {
	display: block;
	width: 23px;
	height: 23px;
	fill: currentColor;
}

.sgw-popup-image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 420px;
	overflow: hidden;
	background: #e9eef1;
}

.sgw-popup-image img {
	display: block;
	width: var(--sgw-popup-image-scale);
	height: var(--sgw-popup-image-scale);
	max-width: none;
	max-height: none;
	min-height: 0;
	object-fit: contain;
}

.sgw-popup-body {
	align-self: center;
	box-sizing: border-box;
	padding: 62px 48px 46px;
	font-family: var(--sgw-popup-font-family, inherit);
}

.sgw-popup-dialog.no-image .sgw-popup-body {
	padding-right: 58px;
}

.sgw-popup-body h2 {
	margin: 0 0 18px;
	padding: 0;
	color: var(--sgw-popup-title-color, #173042);
	font-family: inherit;
	font-size: var(--sgw-popup-title-size);
	font-style: var(--sgw-popup-title-style, normal);
	font-weight: var(--sgw-popup-title-weight, 750);
	line-height: 1.18;
	text-transform: none;
	letter-spacing: -0.02em;
}

.sgw-popup-dialog.title-align-left .sgw-popup-body h2 {
	text-align: left;
}

.sgw-popup-dialog.title-align-center .sgw-popup-body h2 {
	text-align: center;
}

.sgw-popup-dialog.title-align-right .sgw-popup-body h2 {
	text-align: right;
}

.sgw-popup-content {
	color: var(--sgw-popup-content-color, #465966);
	font-family: inherit;
	font-size: var(--sgw-popup-content-size, 17px);
	font-style: var(--sgw-popup-content-style, normal);
	font-weight: var(--sgw-popup-content-weight, 400);
	line-height: var(--sgw-popup-content-line-height, 1.5);
}

.sgw-popup-content > :first-child {
	margin-top: 0;
}

.sgw-popup-content > :last-child {
	margin-bottom: 0;
}

.sgw-popup-content p {
	margin-top: 0;
	margin-bottom: var(--sgw-popup-paragraph-spacing, 10px);
	line-height: inherit;
}

.sgw-popup-content p:last-child {
	margin-bottom: 0;
}

.sgw-popup-content li {
	line-height: inherit;
}

.sgw-popup-content a {
	color: #126da8;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sgw-popup-actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 11px;
	margin-top: 28px;
}

.sgw-popup-button {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 20px;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 5px 14px rgba(23, 48, 66, 0.12);
	color: var(--sgw-popup-button-text-color, #fff) !important;
	font-family: inherit;
	font-size: 16px;
	font-style: var(--sgw-popup-button-style, normal);
	font-weight: var(--sgw-popup-button-weight, 700);
	line-height: 1.25;
	text-align: center;
	text-decoration: none !important;
	transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sgw-popup-button:hover {
	box-shadow: 0 7px 18px rgba(23, 48, 66, 0.2);
	color: var(--sgw-popup-button-text-color, #fff) !important;
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.sgw-popup-button:focus-visible {
	outline: 3px solid var(--sgw-popup-title-color, #173042);
	outline-offset: 3px;
}

.sgw-popup-button.is-whatsapp {
	background: var(--sgw-popup-whatsapp-color, #168f4e);
}

.sgw-popup-button.is-telegram {
	background: var(--sgw-popup-telegram-color, #2188c9);
}

.sgw-popup-button.is-link {
	background: var(--sgw-popup-link-color, #34495a);
}

@media (max-width: 720px) {
	.sgw-popup-overlay {
		align-items: flex-start;
		padding: 14px;
	}

	.sgw-popup-dialog {
		grid-template-columns: 1fr;
		max-height: none;
		margin: auto 0;
	}

	.sgw-popup-image {
		height: var(--sgw-popup-mobile-image-height);
		min-height: 0;
	}

	.sgw-popup-image img {
		width: var(--sgw-popup-image-scale);
		height: var(--sgw-popup-image-scale);
		min-height: 0;
	}

	.sgw-popup-body,
	.sgw-popup-dialog.no-image .sgw-popup-body {
		padding: 34px 24px 28px;
	}

	.sgw-popup-dialog.has-image .sgw-popup-body {
		padding-top: 28px;
	}

	.sgw-popup-dialog.no-image .sgw-popup-body h2 {
		padding-right: 24px;
	}

	.sgw-popup-body h2 {
		font-size: var(--sgw-popup-title-mobile-size);
	}

	.sgw-popup-content {
		font-size: var(--sgw-popup-content-mobile-size, 16px);
		line-height: var(--sgw-popup-content-mobile-line-height, 1.45);
	}

	.sgw-popup-content p {
		margin-bottom: var(--sgw-popup-paragraph-mobile-spacing, 8px);
	}

	.sgw-popup-close {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sgw-popup-overlay,
	.sgw-popup-dialog,
	.sgw-popup-close,
	.sgw-popup-button {
		transition: none;
	}
}
