/*
 * Вторая продающая секция внутри статьи.
 * Файл: /article-sales/article-sales-second.css
 */

.article-sales-second,
.article-sales-second * {
	box-sizing: border-box;
}

.article-sales-second {
	--ass-phone-icon: url("../assets/images/icons/CTA_article/tab-person-gold.svg");

	position: relative;
	isolation: isolate;
	width: 100%;
	container-type: inline-size;
	container-name: article-sales-second;
	margin: 38px 0;
	padding: 26px 30px 24px;
	overflow: hidden;

	color: #071436;
	background:
		radial-gradient(circle at 5% 100%, rgba(181, 219, 247, 0.70) 0, rgba(213, 234, 249, 0.42) 25%, transparent 50%),
		radial-gradient(circle at 96% 2%, rgba(246, 211, 157, 0.66) 0, rgba(250, 229, 195, 0.42) 28%, transparent 52%),
		linear-gradient(115deg, #eaf6ff 0%, #f5faff 30%, #fffdf7 58%, #fbf1df 78%, #f4dfbd 100%);
	border: 1px solid rgba(196, 145, 51, 0.46);
	border-radius: 16px;
	box-shadow:
		0 18px 42px rgba(7, 31, 99, 0.09),
		0 1px 0 rgba(255, 255, 255, 0.84) inset;
	font-family: inherit;
}

.article-sales-second::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 36%),
		linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26) 50%, transparent);
}

.article-sales-second__title {
	max-width: 1080px;
	margin: 0 auto 23px;
	color: #071f63;
	font-size: clamp(28px, 2.4vw, 40px);
	font-weight: 700;
	line-height: 1.14;
	letter-spacing: -0.025em;
	text-align: center;
	text-wrap: balance;
}

.article-sales-second__form {
	display: grid;
	grid-template-columns:
		minmax(220px, 1fr)
		minmax(300px, 1.18fr)
		minmax(230px, 0.92fr);
	gap: 20px;
	align-items: center;
	width: min(90%, 1100px);
	margin: 0 auto;
}

.article-sales-second__form > * {
	min-width: 0;
}

.article-sales-second__phone {
	position: relative;
	display: block;
	margin: 0;
}

.article-sales-second__phone-icon {
	position: absolute;
	left: 17px;
	top: 50%;
	z-index: 1;
	width: 25px;
	height: 25px;
	background-color: #2e66b8;
	-webkit-mask-image: var(--ass-phone-icon);
	mask-image: var(--ass-phone-icon);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	transform: translateY(-50%);
	pointer-events: none;
}

.article-sales-second__phone input {
	display: block;
	width: 100%;
	min-width: 0;
	height: 58px;
	margin: 0;
	padding: 0 16px 0 54px;

	color: #071436;
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(36, 79, 145, 0.28);
	border-radius: 10px;
	box-shadow:
		0 8px 22px rgba(7, 31, 99, 0.06),
		0 1px 0 rgba(255, 255, 255, 0.9) inset;
	outline: none;
	appearance: none;

	font: inherit;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
}

.article-sales-second__phone input::placeholder {
	color: rgba(21, 27, 42, 0.50);
	opacity: 1;
}

.article-sales-second__phone input:hover {
	border-color: rgba(36, 79, 145, 0.42);
}

.article-sales-second__phone input:focus {
	border-color: #0b96c6;
	box-shadow:
		0 0 0 3px rgba(11, 150, 198, 0.14),
		0 10px 24px rgba(7, 31, 99, 0.08);
}

.article-sales-second__consent {
	min-width: 0;
}

.article-sales-second__consent .form-consent {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 10px;
	align-items: start;
	margin: 0;
	color: rgba(7, 20, 54, 0.80);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.42;
	letter-spacing: 0;
}

.article-sales-second__consent .form-consent input {
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	accent-color: #0759c8;
	cursor: pointer;
}

.article-sales-second__consent .form-consent span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.article-sales-second .article-sales-second__consent .form-consent a,
.blog-single__content .article-sales-second__consent .form-consent a {
	color: #0759c8;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.article-sales-second__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 58px;
	margin: 0;
	padding: 13px 20px;

	color: #ffffff;
	background: linear-gradient(135deg, #0d438d 0%, #072d70 54%, #051b50 100%);
	border: 1px solid rgba(213, 166, 65, 0.78);
	border-radius: 10px;
	box-shadow:
		0 13px 25px rgba(7, 31, 99, 0.23),
		0 1px 0 rgba(255, 255, 255, 0.14) inset;

	font: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.15;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition:
		transform 0.18s ease,
		filter 0.18s ease,
		box-shadow 0.18s ease;
}

.article-sales-second__submit:hover,
.article-sales-second__submit:focus-visible {
	color: #ffffff;
	filter: brightness(1.07);
	transform: translateY(-1px);
	box-shadow:
		0 16px 30px rgba(7, 31, 99, 0.28),
		0 1px 0 rgba(255, 255, 255, 0.16) inset;
	outline: none;
}

.article-sales-second__submit-arrow {
	color: #e2ad43;
	font-size: 23px;
	font-weight: 400;
	line-height: 1;
	transition: transform 0.18s ease;
}

.article-sales-second__submit:hover .article-sales-second__submit-arrow {
	transform: translateX(4px);
}

.article-sales-second__website {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.article-sales-second__status {
	width: min(90%, 1100px);
	margin: 13px auto 0;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}

.article-sales-second__status.is-success {
	color: #0d6a47;
	background: rgba(238, 250, 244, 0.92);
	border: 1px solid rgba(13, 106, 71, 0.16);
}

.article-sales-second__status.is-error {
	color: #a52d2d;
	background: rgba(255, 244, 244, 0.94);
	border: 1px solid rgba(165, 45, 45, 0.16);
}

/* Средняя ширина секции: телефон и кнопка сверху, согласие снизу. */
@container article-sales-second (max-width: 980px) {
	.article-sales-second__form {
		grid-template-columns: minmax(220px, 1fr) minmax(230px, 1fr);
		grid-template-areas:
			"phone submit"
			"consent consent";
		gap: 12px 16px;
		width: min(94%, 850px);
	}

	.article-sales-second__phone {
		grid-area: phone;
	}

	.article-sales-second__consent {
		grid-area: consent;
	}

	.article-sales-second__submit {
		grid-area: submit;
	}
}

/* Узкая секция: все элементы в одну колонку. */
@container article-sales-second (max-width: 650px) {
	.article-sales-second {
		padding: 22px 17px 18px;
	}

	.article-sales-second__title {
		margin-bottom: 18px;
		font-size: 27px;
		line-height: 1.18;
	}

	.article-sales-second__form {
		grid-template-columns: 1fr;
		grid-template-areas:
			"phone"
			"consent"
			"submit";
		gap: 11px;
		width: 100%;
	}

	.article-sales-second__submit {
		white-space: normal;
	}
}

@media (max-width: 680px) {
	.article-sales-second {
		margin: 30px 0;
	}
}

/* Резерв для браузеров без container queries. */
@supports not (container-type: inline-size) {
	@media (max-width: 1380px) {
		.article-sales-second__form {
			grid-template-columns: minmax(220px, 1fr) minmax(230px, 1fr);
			grid-template-areas:
				"phone submit"
				"consent consent";
			width: min(94%, 850px);
		}

		.article-sales-second__phone {
			grid-area: phone;
		}

		.article-sales-second__consent {
			grid-area: consent;
		}

		.article-sales-second__submit {
			grid-area: submit;
		}
	}

	@media (max-width: 760px) {
		.article-sales-second__form {
			grid-template-columns: 1fr;
			grid-template-areas:
				"phone"
				"consent"
				"submit";
			width: 100%;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.article-sales-second__submit,
	.article-sales-second__submit-arrow {
		transition: none;
	}

	.article-sales-second__submit:hover {
		transform: none;
	}
}
