/*
 * Consent checkbox + WhatsApp cross-border disclosure (DEV-01 / DEV-05).
 * Loaded wherever a lead form can appear. Inherits colour from its container
 * so the same markup reads correctly on the dark popup/sticky bar and on the
 * light block forms.
 */

.swcs-consent-group {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	margin: .75rem 0 0;
	text-align: left;
}

.swcs-consent {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .5rem;
	align-items: start;
	font-size: .78rem;
	line-height: 1.45;
	color: inherit;
	opacity: .85;
	cursor: pointer;
}

.swcs-consent > input[type="checkbox"] {
	/* Keep the box aligned with the first line of text at any font size. */
	width: 1rem;
	height: 1rem;
	margin: .15rem 0 0;
	flex: none;
	accent-color: #38bdf8;
	cursor: pointer;
}

.swcs-consent > span { min-width: 0; }

.swcs-consent a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.swcs-consent a:hover,
.swcs-consent a:focus-visible { text-decoration-thickness: 2px; }

.swcs-consent > input[type="checkbox"]:focus-visible {
	outline: 2px solid #38bdf8;
	outline-offset: 2px;
}

/* Marketing opt-in is secondary to the mandatory one. */
.swcs-consent--optional { color: #475569; } /* was opacity .7 — failed AA */

/* Подсказка вместо молчания: кнопка больше не disabled, поэтому нажатие
   доходит до обработчика и он объясняет, чего не хватает. */
.swcs-consent-hint {
	/* Сразу под обязательным чекбоксом, с отступом до начала его текста
	   (ширина чекбокса 1rem + зазор .5rem), — чтобы читалась как его ошибка. */
	margin: -.15rem 0 0 1.5rem;
	font-size: .8rem;
	line-height: 1.45;
	color: #b91c1c;
}
.swcs-consent-hint[hidden] { display: none; }

/* Не отмечено обязательное согласие: рамка на самом чекбоксе, текст в полную
   яркость. Необязательное маркетинговое согласие этот класс не получает. */
.swcs-consent.is-invalid { opacity: 1; }
.swcs-consent.is-invalid > input[type="checkbox"] {
	outline: 2px solid #b91c1c;
	outline-offset: 2px;
}

/* Submit stays visibly inert until the mandatory box is ticked. */
.swcs-consent-blocked {
	opacity: .5;
	cursor: not-allowed;
	filter: grayscale(1);
}

/* Cross-border transfer disclosure under wa.me buttons (файл 02, блок 2). */
.swcs-wa-note {
	margin: .5rem 0 0;
	font-size: .72rem;
	line-height: 1.45;
	/* Explicit colours, not opacity: opacity .7 over inherited grey failed
	   WCAG AA 4.5:1 (axe, QA 2026-10-03). #475569 ≈ 7.5:1 on white. */
	color: #475569;
	text-align: left;
}

/* Dark sections (navy CTA band): #cbd5e1 on #0f172a ≈ 12:1. */
.sw-ctaband .swcs-wa-note { color: #cbd5e1; }

.swcs-wa-note--checkout {
	font-size: .76rem;
}

.swcs-wa-note a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Sticky bar is a single flex row — let the consent wrap onto its own line. */
.swcs-sticky__form { flex-wrap: wrap; }

.swcs-consent-group--inline {
	flex-basis: 100%;
	margin-top: .5rem;
}

.swcs-consent-group--inline .swcs-consent { font-size: .7rem; }

/* Обязательные сведения о товаре (DEV-09, ст. 25 п. 1 ЗоЗПП). */
.sw-pi { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--sw-border, #e2e8f0); font-size: .875rem; }
.sw-pi__h { margin: 0 0 .75rem; font-size: 1rem; }
.sw-pi__list { display: grid; grid-template-columns: minmax(11rem, auto) 1fr; gap: .35rem 1rem; margin: 0 0 1rem; }
.sw-pi__list dt { font-weight: 600; opacity: .75; }
.sw-pi__list dd { margin: 0; }
.sw-pi__eac {
	display: inline-block; margin-left: .5rem; padding: .05rem .3rem;
	border: 1px solid currentColor; border-radius: .2rem;
	font-size: .7rem; font-weight: 700; letter-spacing: .04em;
}
.sw-pi__nonret, .sw-pi__seller { margin: .5rem 0 0; font-size: .8rem; line-height: 1.5; opacity: .8; }
@media (max-width: 640px) { .sw-pi__list { grid-template-columns: 1fr; gap: .1rem .5rem; } .sw-pi__list dd { margin-bottom: .5rem; } }
