/**
 * Popup подписки на канал MAX.
 */

.ea-max-widget {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.ea-max-widget[hidden] {
	display: none !important;
}

.ea-max-widget__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	-webkit-backdrop-filter: blur(16px) saturate(1.1);
	backdrop-filter: blur(16px) saturate(1.1);
}

.ea-max-widget__card {
	position: relative;
	z-index: 1;
	overflow: hidden;
	width: 100%;
	max-width: 416px;
	padding: 0 20px 32px;
	box-sizing: border-box;
	text-align: center;
	background: linear-gradient(180deg, #ffffff 0%, #fafaff 100%);
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 24px;
	box-shadow:
		0 0 0 1px rgba(109, 94, 252, 0.06),
		0 20px 50px rgba(15, 23, 42, 0.16),
		0 4px 16px rgba(109, 94, 252, 0.08);
	animation: ea-max-widget-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ea-max-widget-pop {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.97);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.ea-max-widget__glow {
	position: absolute;
	top: -48px;
	left: 50%;
	z-index: 0;
	width: 224px;
	height: 224px;
	transform: translateX(-50%);
	pointer-events: none;
	background: radial-gradient(circle, rgba(109, 94, 252, 0.22) 0%, rgba(139, 92, 246, 0.08) 45%, transparent 70%);
}

.ea-max-widget__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
	color: #64748b;
	font-size: 22px;
	line-height: 36px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ea-max-widget__close:hover {
	background: #fff;
	color: #334155;
}

.ea-max-widget__hero {
	position: relative;
	z-index: 1;
	margin: 0 -20px 24px;
	padding: 32px 20px 0;
}

.ea-max-widget__logos {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
}

.ea-max-widget__logo {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.ea-max-widget__logo--brand {
	position: relative;
	z-index: 2;
	margin-right: -10px;
	object-fit: cover;
}

.ea-max-widget__logo--max {
	position: relative;
	z-index: 1;
	margin-left: -10px;
	object-fit: contain;
	box-shadow: none;
	background: none;
}

.ea-max-widget__kicker {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 20px;
	color: #64748b;
}

.ea-max-widget__title {
	position: relative;
	z-index: 1;
	margin: 0 0 20px;
	font-size: 26px;
	line-height: 35px;
	font-weight: 700;
	color: var(--ea-brand-primary, #17a48b);
	letter-spacing: -0.5px;
}

.ea-max-widget__subtitle {
	position: relative;
	z-index: 1;
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 22px;
	font-weight: 500;
	color: #6d5efc;
}

.ea-max-widget__pitch {
	position: relative;
	z-index: 1;
	margin: 0 0 40px;
	font-size: 15px;
	line-height: 25px;
	color: #475569;
}

.ea-max-widget__benefits {
	position: relative;
	z-index: 1;
	margin: 0 0 40px;
	padding: 14px 16px;
	text-align: left;
	background: rgba(109, 94, 252, 0.05);
	border: 1px solid rgba(109, 94, 252, 0.08);
	border-radius: 16px;
}

.ea-max-widget__benefits p {
	margin: 0;
	padding: 5px 0;
	font-size: 14px;
	line-height: 20px;
	color: #334155;
}

.ea-max-widget__benefits p + p {
	border-top: 1px solid rgba(109, 94, 252, 0.08);
	margin-top: 5px;
	padding-top: 9px;
}

.ea-max-widget__btn,
.ea-max-widget__btn:hover,
.ea-max-widget__btn:focus,
.ea-max-widget__btn:visited,
.ea-max-widget__btn:active {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	padding: 18px 20px;
	border-radius: 16px;
	text-decoration: none;
	color: #ffffff;
	box-sizing: border-box;
	background: linear-gradient(135deg, #6d5efc 0%, #8b5cf6 50%, #a78bfa 100%);
	box-shadow: 0 12px 28px rgba(109, 94, 252, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ea-max-widget__btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 32px rgba(109, 94, 252, 0.4);
	color: #ffffff;
}

.ea-max-widget__btn-logo {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.ea-max-widget__btn-label {
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
	color: #ffffff;
}

.ea-max-widget__dismiss {
	position: relative;
	z-index: 1;
	display: inline-block;
	margin: 24px 0 0;
	padding: 4px 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 14px;
	line-height: 20px;
	color: #94a3b8;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.ea-max-widget__dismiss:hover {
	color: #64748b;
}

body.ea-max-widget-open {
	overflow: hidden;
}

@media (min-width: 641px) {
	.ea-max-widget__card {
		padding: 0 32px 32px;
	}

	.ea-max-widget__hero {
		margin-left: -32px;
		margin-right: -32px;
		padding-left: 32px;
		padding-right: 32px;
	}

	.ea-max-widget__title {
		font-size: 28px;
		line-height: 37px;
		letter-spacing: -0.4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ea-max-widget__card {
		animation: none;
	}

	.ea-max-widget__btn {
		transition: none;
	}

	.ea-max-widget__btn:hover {
		transform: none;
	}
}
