/* ===================== ФОРМА КОНСУЛЬТАЦИИ (узкая, Stage 2) ===================== */

.consult-form {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 40px;
	/* по замеру макета: панель 1408×210, паддинги 40/33/44/33 (лево/право ≈33 симметрично) */
	padding: 40px 33px 44px;
	border-radius: 24px;
	background: var(--gray);
}

/* декоративный паттерн слева, полупрозрачный (по макету) */
.consult-form::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 295px;
	background: url(/local/assets/img2025/supporting/Pattern.png) repeat-y left top;
	opacity: .4;
	pointer-events: none;
}

/* левая колонка: заголовок сверху (вровень с рядом инпутов), подзаголовок снизу (вровень с кнопкой) */
.consult-form__aside {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 0 0 auto;
	max-width: 480px;
}

.consult-form__title {
	font-weight: 500;
	font-size: 30px;
	line-height: 1.167;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: var(--dark-gray);
}

.consult-form__subtitle {
	font-size: 13px;
	line-height: 1.4;
}

/* правая колонка = ширина ряда инпутов: 3×248 + 2×16 = 776px */
.consult-form__main {
	flex: 0 1 776px;
	min-width: 0;
}

.consult-form__row {
	display: flex;
	gap: 16px;
	margin-bottom: 22px;
}

.consult-form__input {
	flex: 1 1 0;
	min-width: 0;
	height: 52px;
	padding: 0 28px;
	border: none;
	border-radius: 26px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	color: var(--dark-gray);
}
.consult-form__input::placeholder {
	color: #4F5666;
	text-transform: uppercase;
	letter-spacing: .4px;
	font-size: 13px;
}
.consult-form__input:focus { outline: 1px solid var(--blue); }

/* ------- обёртка поля + подпись ошибки (переиспользуемо для .consult-form и .wide-form) ------- */
.field2026 {
	position: relative;
}
.field2026 > input {
	width: 100%;
	box-sizing: border-box;
}
/* в узкой форме 3 поля идут в ряд — роль flex-элемента переходит с инпута на обёртку */
.consult-form__row > .field2026 {
	flex: 1 1 0;
	min-width: 0;
}
/* мелкая подпись ошибки под полем, абсолютом — не двигает соседей */
.field2026__error {
	position: absolute;
	top: 100%;
	left: 24px;
	font-size: 10px;
	line-height: 1.1;
	letter-spacing: .2px;
	color: #E5484D;
	white-space: nowrap;
	pointer-events: none;
}

/* красный border у поля с ошибкой (inset box-shadow — без сдвига габаритов) */
.consult-form__input.is-error,
.wide-form__field.is-error,
.wide-form__textarea.is-error {
	box-shadow: inset 0 0 0 1px #E5484D;
}
/* при фокусе ошибочного поля убираем outline, чтобы не было удвоения с box-shadow —
   красный border остаётся ровно 1px */
.consult-form__input.is-error:focus,
.wide-form__field.is-error:focus,
.wide-form__textarea.is-error:focus {
	outline: none;
}

/* чекбокс согласия с ошибкой — красный бокс и красный текст */
.agree2026.is-error .agree2026__text {
	color: #E5484D;
}
.agree2026.is-error .agree2026__text::before {
	box-shadow: 0 0 0 1px #E5484D;
}

.consult-form__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.consult-form__agrees {
	display: flex;
	flex-direction: column;
	/* по замеру: шаг строк 24px = бокс 16 + 8 просвет */
	gap: 8px;
}

/* составной селектор (0,2,0), т.к. style-new.css грузится ПОСЛЕ и базовый .button2025
   (width:fit-content, border-radius:50, padding:17/32) перебивает одноклассовое правило */
.consult-form__foot .consult-form__submit {
	flex-shrink: 0;
	/* по замеру: 248×52, скруглённый прямоугольник r21 (НЕ полный pill), плоский var(--blue) */
	width: 248px;
	height: 52px;
	padding: 0;
	/* базовый .button2025 центрует только по горизонтали (justify-content) — добавляем вертикаль,
	   иначе с padding:0 текст «Отправить» прижимается к верху */
	align-items: center;
	border-radius: 60px;
	font-size: 15px;
}

/* ------- чекбоксы согласия (переиспользуемый паттерн) ------- */
.agree2026 {
	position: relative;
	display: block;
	cursor: pointer;
	user-select: none;
}
.agree2026__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.agree2026__text {
	position: relative;
	display: block;
	/* по замеру: бокс 16 + просвет 10 = 26px; шрифт 13 (cap-height 9) */
	padding-left: 26px;
	font-size: 13px;
	line-height: 16px;
	color: var(--dark-gray);
}
.agree2026__text a {
	color: var(--dark-gray);
	text-decoration: underline;
	transition: color .3s ease;
}
.agree2026__text a:hover { color: var(--blue); }

.agree2026__text::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	/* по замеру: 16×16, скруглённый, белый, БЕЗ рамки (лаванда→белое напрямую) */
	width: 16px;
	height: 16px;
	border-radius: 4px;
	background: #fff;
}
.agree2026__text::after {
	content: "";
	position: absolute;
	left: 3px;
	top: 4px;
	width: 10px;
	height: 8px;
	background-image: url(../../img/icon-ok-blue.svg);
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
	opacity: 0;
	transition: opacity .2s ease;
}
.agree2026__input:checked ~ .agree2026__text::after { opacity: 1; }

/* ------- планшет ------- */
@media (max-width: 1199px) {
	.consult-form { padding: 40px; gap: 32px; }
	.consult-form__title { font-size: 30px; }
}

/* ------- мобилка ------- */
@media (max-width: 1199px) {
	.consult-form {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
		padding: 32px 20px;
		border-radius: 16px;
	}
	.consult-form::before { display: none; }
	.consult-form__aside { flex: none; max-width: none; }
	.consult-form__title { font-size: 16px; margin-bottom: 12px; }

	/* gap увеличен под абсолютную подпись ошибки между полями в столбик */
	.consult-form__row { flex-direction: column; gap: 20px; margin-bottom: 24px; }
	.consult-form__row > .field2026 { flex: none; }

	.consult-form__foot { flex-direction: column; align-items: stretch; gap: 24px; }
	/* повышенная специфичность, чтобы перебить .button2025{width:fit-content} из style-new.css */
	.consult-form__foot .consult-form__submit { width: 100%; min-width: 0; }

	.consult-form__input {
		flex: none;
	}

	.consult-form__agrees {
		gap: 17px;
	}

	.consult-form__main {
		flex: none;
	}
}


/* ================= карточка курса 2026 — попап консультации (.consult-popup) ================= */

/* Карточка курса 2026 — попап «Пройти консультацию».
   Оболочка попапа своя, начинка — донорская .consult-form
   (её поля .field2026 и согласия .agree2026 живут в consult-form-2026.css). */

.consult-popup {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.consult-popup.active {
	display: flex;
}

.consult-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(3, 15, 38, .6);
}

.consult-popup__box {
	position: relative;
	width: 100%;
	max-width: 720px;
	max-height: 90vh;
	overflow-y: auto;
	box-sizing: border-box;
	padding: 40px;
	border-radius: 16px;
	background: #FFFFFF;
}

.consult-popup__close {
	position: absolute;
	right: 20px;
	top: 20px;
	width: 32px;
	height: 32px;
	border: none;
	background: none;
	color: var(--dark-gray);
	cursor: pointer;
}

.consult-popup__close svg {
	width: 24px;
	height: 24px;
	display: block;
}

.consult-popup__title {
	font-weight: 500;
	font-size: 30px;
	line-height: 35px;
	letter-spacing: -1px;
	text-transform: uppercase;
	color: var(--dark-gray);
	margin-bottom: 12px;
	padding-right: 40px;
}

.consult-popup__text {
	font-size: 14px;
	line-height: 20px;
	color: var(--light-gray2);
	margin-bottom: 28px;
}

/* внутри попапа у .consult-form нет колонки-aside, растягиваем основную часть */
.consult-popup__form.consult-form {
	display: block;
	padding: 0;
	background: none;
}

.consult-popup__form .consult-form__main {
	width: 100%;
}


@media (max-width: 767px) {
	.consult-popup__box {
		padding: 24px 16px;
	}

	.consult-popup__title {
		font-size: 20px;
		line-height: 25px;
	}
}


/* ===== карточка курса 2026: попап «Заявка на курс» =====
   Двухколоночная модалка 1125x700: слева информация о потоке на --gray,
   справа белая колонка с формой. Геометрия снята с SVG-экспорта макета
   (боксы точные), типографика — замером по эталону @2x. */
.apply-popup {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: none;
}

.apply-popup.active {
	display: block;
}

/* прокручивается обёртка, а не сама модалка: при overflow на боксе колонки
   растягиваются по ужатой высоте и белая колонка не докрывает контент.
   Она же — .modal__scroll, цель bodyScrollLock из modal.js. */
.apply-popup__scroll {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 20px;
	overflow-y: auto;
}

.apply-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(3, 15, 38, .6);
}

/* крестик стоит НАД модалкой, а не внутри неё */
.apply-popup__close {
	position: absolute;
	left: 50%;
	bottom: calc(50% + 350px + 14px);
	transform: translateX(-50%);
	width: 24px;
	height: 24px;
	padding: 0;
	border: none;
	background: none;
	color: #fff;
	cursor: pointer;
	transition: opacity .2s ease;
}

.apply-popup__close:hover { opacity: .7; }
.apply-popup__close svg { width: 100%; height: 100%; display: block; }

.apply-popup__box {
	position: relative;
	display: flex;
	width: 1125px;
	height: 700px;
	/* легаси .modal__inner из style.css режет бокс до 570x100% */
	max-width: none;
	max-height: none;
	box-sizing: border-box;
	border-radius: 12px;
	background: var(--gray);
	overflow: hidden;
	flex-shrink: 0;
	/* margin:auto вместо опоры на align-items — при прокрутке подложки
	   центрирование флексом срезает верх модалки */
	margin: auto;
}

/* ---------- левая колонка ---------- */
.apply-popup__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	padding: 44px 42px 48px;
}

.apply-popup__overline {
	font-weight: 500;
	font-size: 13px;
	line-height: 20px;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--black);
}

.apply-popup__date,
.apply-popup__place {
	display: flex;
	align-items: center;
	color: var(--black);
}

.apply-popup__ic {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-right: 14px;
	color: var(--blue2, #10BFEB);
}

.apply-popup__date {
	margin-top: 24px;
}

.apply-popup__date-text {
	font-weight: 400;
	font-size: 24px;
	line-height: 32px;
}

.apply-popup__place {
	margin-top: 13px;
}

.apply-popup__place-text {
	font-weight: 400;
	font-size: 14px;
	line-height: 24px;
	text-transform: uppercase;
}

/* отступ задан явно, а не margin-top:auto — при auto правка отступов нижнего
   блока молча двигает сам блок оплат, и каждая правка ломает соседнюю */
.apply-popup__pays.course-filter__badges {
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	margin-top: 231px;
}

.apply-popup__total {
	display: flex;
	align-items: baseline;
	gap: 29px;
	margin-top: 31px;
	padding-top: 39px;
	border-top: 1px solid #C2C9D9;
}

/* цена залита тем же градиентом, что «всего мест» и акценты страницы */
.apply-popup__price {
	font-weight: 500;
	font-size: 30px;
	line-height: 40px;
	background: linear-gradient(90deg, #DE525C 0%, #E97251 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.apply-popup__old {
	font-size: 16px;
	line-height: 20px;
	color: #788193;
}

.apply-popup__extra {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-size: 15px;
	line-height: 20px;
	color: var(--black);
}

.apply-popup__extra svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* подсказка по ховеру — механика и оформление донорского .why-nli__tip-text,
   но со своими классами: тот файл подключается вместе с блоком статов,
   а блоки на этой странице выключаются независимо */
.apply-popup__tip {
	position: relative;
	display: inline-flex;
	cursor: help;
}

.apply-popup__tip-text {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	transform: translateX(-50%) translateY(4px);
	width: 220px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #2A3342;
	color: #fff;
	font-size: 12px;
	line-height: 16px;
	font-weight: 400;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
	box-shadow: 0 12px 32px rgba(3, 15, 38, .18);
	z-index: 5;
}

.apply-popup__tip-text::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #2A3342;
}

.apply-popup__tip:hover .apply-popup__tip-text,
.apply-popup__tip:focus-visible .apply-popup__tip-text {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* ---------- правая колонка: форма ---------- */
.apply-popup__form {
	flex: 0 0 467px;
	box-sizing: border-box;
	padding: 46px 40px 40px;
	background: #fff;
}

/* пилюля стоит справа от ПЕРВОЙ строки заголовка, поэтому она float,
   а не флекс-сосед: иначе заголовок ужимается и ломается на три строки */
.apply-form__head {
	margin-bottom: 29px;
}

.apply-form__title {
	font-weight: 400;
	font-size: 20px;
	line-height: 28px;
	color: var(--black);
}

/* пилюля 100x16 с коралловым градиентом (paint3 макета) */
.apply-form__seats {
	float: right;
	margin-top: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100px;
	height: 16px;
	border-radius: 4px;
	background: linear-gradient(90deg, #DE525C 0%, #E97251 100%);
	font-weight: 700;
	font-size: 9px;
	line-height: 1;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #fff;
}

.apply-form__field + .apply-form__field {
	margin-top: 14px;
}

.apply-form__input {
	width: 100%;
	height: 52px;
	box-sizing: border-box;
	padding: 0 24px;
	border: none;
	border-radius: 13px;
	background: var(--gray);
	font-family: inherit;
	font-size: 13px;
	color: var(--dark-gray);
}

.apply-form__input::placeholder {
	color: #788193;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.apply-form__input:focus { outline: 1px solid var(--blue); }

.apply-form__agrees {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 26px;
}

/* по замеру каждая строка согласия помещается в одну — кегль мельче донорского */
.apply-form__agrees .agree2026__text {
	font-size: 12px;
	line-height: 16px;
}

/* в этой форме галочка на лавандовом квадрате, а не на белом */
.apply-form__agrees .agree2026__text::before {
	background: var(--gray);
	border-radius: 1px;
}

.apply-form__submit.button2025 {
	width: 100%;
	height: 52px;
	margin-top: 23px;
	padding: 0;
	align-items: center;
	border-radius: 13px;
	background: var(--blue2, #10BFEB);
	font-size: 16px;
	line-height: 20px;
	text-transform: none;
	letter-spacing: normal;
	color: #fff;
}


/* ---------- попап заявки: мобилка ≤1199px ----------
   В макете это шторка от верха экрана: крестик в 64px-полосе над ней,
   инфо-блок и форма идут столбиком, а не колонками. */
@media (max-width: 1199px) {
	/* не stretch: иначе шторка ужимается по высоте экрана и обрезает контент
	   вместо того, чтобы прокрутить обёртку */
	.apply-popup__scroll {
		align-items: flex-start;
		justify-content: flex-start;
		padding: 0;
	}

	.apply-popup__close {
		left: 50%;
		top: 24px;
		bottom: auto;
	}

	.apply-popup__box {
		width: 100%;
		height: auto;
		min-height: calc(100% - 64px);
		flex-direction: column;
		margin: 64px 0 0;
		border-radius: 20px 20px 0 0;
		background: #fff;
	}

	.apply-popup__info {
		flex: none;
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center;
		padding: 36px 20px 30px;
		background: var(--gray);
	}

	.apply-popup__overline,
	.apply-popup__date,
	.apply-popup__place {
		grid-column: 1 / -1;
	}

	.apply-popup__overline { letter-spacing: .04em; }
	.apply-popup__date { margin-top: 24px; }
	.apply-popup__date-text { font-size: 20px; line-height: 26px; }
	.apply-popup__place { margin-top: 11px; }
	.apply-popup__place-text { font-size: 12px; letter-spacing: .04em; }

	/* в мобильном макете от оплат остаются только иконки — подписи убраны */
	.apply-popup__pays.course-filter__badges {
		grid-column: 2;
		grid-row: 4;
		/* колонка сетки шире блока иконок (её задаёт «Доп. расходы» снизу) —
		   без этого иконки прилипают к левому краю колонки */
		justify-self: end;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 8px;
		margin-top: 30px;
	}

	/* подпись гасим на самом бейдже: font-size на родителе бита правилом
	   .course-filter__badge той же специфичности */
	.apply-popup__pays .course-filter__badge {
		gap: 0;
		font-size: 0;
	}

	.apply-popup__pays .course-filter__badge img {
		width: 22px;
		height: 22px;
		border-radius: 6px;
	}

	/* строки цены раскладываются по той же сетке, что и блок оплат */
	.apply-popup__total {
		display: contents;
	}

	.apply-popup__price {
		grid-column: 1;
		grid-row: 4;
		margin-top: 30px;
		font-size: 24px;
		line-height: 32px;
		white-space: nowrap;
	}

	.apply-popup__old {
		grid-column: 1;
		grid-row: 5;
		margin-top: 6px;
		white-space: nowrap;
	}

	.apply-popup__extra {
		grid-column: 2;
		grid-row: 5;
		margin: 6px 0 0;
		font-size: 14px;
		white-space: nowrap;
	}

	.apply-popup__form {
		flex: none;
		padding: 26px 20px 32px;
	}

	.apply-form__head { margin-bottom: 20px; }
	.apply-form__title { font-size: 18px; line-height: 24px; }
	.apply-form__seats { margin-top: 2px; }
	.apply-form__agrees { gap: 17px; margin-top: 24px; }
	.apply-form__submit.button2025 { margin-top: 24px; }
}
