/* EGO Guide November — кнопка + модальное окно. Стили темы: Gotham Pro, коричневый #9c7d71, чёрный #121212, radius 5px. */

/* ---------- кнопка в хедере ---------- */
.egn-header-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--izbrannoe---krasnyy, #f96262);
	background: var(--izbrannoe---krasnyy, #f96262);
	color: #fff;
	border-radius: 5px;
	padding: 9px 14px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
	animation: egn-glow 2.6s ease-in-out infinite;
}

/* мягкая пульсация свечением — без скачков размера и смещения вёрстки */
@keyframes egn-glow {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(249, 98, 98, 0.45), 0 2px 10px rgba(249, 98, 98, 0.25);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(249, 98, 98, 0), 0 4px 18px rgba(249, 98, 98, 0.55);
	}
}

@media (min-width: 768px) {
	.egn-header-btn:hover {
		background: #e14a4a;
		border-color: #e14a4a;
		color: #fff;
		animation-play-state: paused;
		box-shadow: 0 4px 16px rgba(249, 98, 98, 0.45);
	}
}

@media (prefers-reduced-motion: reduce) {
	.egn-header-btn {
		animation: none;
	}
}

/* десктопная кнопка — в shopping_btns; на мобильных прячем (есть кнопка в моб. меню) */
@media (max-width: 991px) {
	.egn-header-btn--desktop {
		display: none !important;
	}
}

/* кнопка в мобильном меню */
.egn-mobile-btn-wrap {
	display: none;
	padding: 0 0 18px;
}

@media (max-width: 991px) {
	.egn-mobile-btn-wrap {
		display: block;
	}
}

.egn-mobile-btn-wrap .egn-header-btn {
	width: 100%;
	padding: 14px 16px;
	font-size: 15px;
}

/* ---------- оверлей и окно ---------- */
.egn-overlay {
	position: fixed;
	inset: 0;
	z-index: 2200000; /* выше aside_mobile_menu темы (z-index 2100000) */
	background: rgba(18, 18, 18, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

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

.egn-dialog {
	position: relative;
	background: #fff;
	border-radius: 10px;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	padding: 34px 30px 30px;
	box-sizing: border-box;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.egn-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #959595;
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease;
}

.egn-close:hover {
	color: #121212;
}

/* ---------- контент ---------- */
.egn-title {
	font-family: var(--font-family, "Gotham Pro", sans-serif);
	font-weight: 500;
	font-size: 22px;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: #121212;
	margin: 0 0 12px;
}

.egn-lead {
	font-size: 14px;
	line-height: 1.5;
	color: #424242;
	margin: 0 0 20px;
}

.egn-field {
	margin-bottom: 14px;
}

.egn-field label {
	display: block;
	font-size: 13px;
	color: #424242;
	margin-bottom: 6px;
}

.egn-req {
	color: #f96262;
}

.egn-field input[type="text"],
.egn-field input[type="tel"] {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #dadada;
	border-radius: 5px;
	padding: 13px 14px;
	font-family: inherit;
	font-size: 15px;
	color: #121212;
	background: #fff;
	transition: border-color 0.2s ease;
}

.egn-field input[type="text"]:focus,
.egn-field input[type="tel"]:focus {
	outline: none;
	border-color: #9c7d71;
}

.egn-field input.egn-invalid {
	border-color: #f96262;
}

.egn-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.egn-consent label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 13px;
	line-height: 1.4;
	color: #424242;
	cursor: pointer;
	margin-bottom: 0;
}

.egn-consent input[type="checkbox"] {
	margin: 2px 0 0;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	accent-color: #9c7d71;
}

.egn-consent a {
	color: #9c7d71;
	text-decoration: underline;
}

.egn-error {
	border: 1px solid #f96262;
	background: #fff5f5;
	color: #c0392b;
	border-radius: 5px;
	padding: 10px 12px;
	font-size: 13px;
	line-height: 1.4;
	margin-bottom: 14px;
}

.egn-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	border: 1px solid var(--izbrannoe---krasnyy, #f96262);
	background: var(--izbrannoe---krasnyy, #f96262);
	color: #fff;
	border-radius: 5px;
	padding: 15px 16px 13px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.3;
	letter-spacing: -0.02em;
	cursor: pointer;
	transition: background-color 0.3s ease, border-color 0.3s ease;
	text-decoration: none;
	box-sizing: border-box;
}

.egn-submit:hover {
	background: #e14a4a;
	border-color: #e14a4a;
	color: #fff;
}

.egn-submit:disabled {
	opacity: 0.55;
	cursor: default;
}

.egn-submit-spin {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: egn-spin 0.7s linear infinite;
}

@keyframes egn-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- состояния ---------- */
.egn-pane-success,
.egn-pane-fail {
	text-align: center;
}

.egn-success-icon {
	display: block;
	margin: 0 auto 18px;
}

.egn-pane .egn-open-link {
	margin-top: 4px;
}

#egn-retry {
	margin-top: 4px;
}

/* блокировка скролла страницы под оверлеем */
body.egn-lock {
	overflow: hidden;
}

/* ---------- мобильная адаптация ---------- */
@media (max-width: 576px) {
	.egn-overlay {
		align-items: flex-end;
		padding: 0;
	}

	.egn-dialog {
		max-width: 100%;
		border-radius: 14px 14px 0 0;
		max-height: calc(100dvh - 24px);
		padding: 28px 20px 24px;
	}

	.egn-title {
		font-size: 19px;
	}
}
