/* Вікно «Безкоштовний тест-драйв» (template-parts/test-popup.php) і кнопки «умови» (картка тестової ракетки в каталозі,
   сторінка товару під «Взяти на тест»). Підключається на сторінках товару й каталогу (functions.php). 2026-11-11. */
body .popup-test.yx-test {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
body .yx-test .yx-test__box {
	position: relative;
	top: auto;
	left: auto;
	transform: none;
	width: calc(100% - 32px);
	max-width: 620px;
	max-height: none;
	margin: 6vh auto;
	padding: 0;
	border-radius: 6px;
	text-align: left;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
body .yx-test .yx-test__content {
	padding: 34px 40px 30px;
	text-align: left;
}
body .yx-test .yx-test__close {
	right: 18px;
	top: 18px;
	width: 28px;
	height: 28px;
}
body .yx-test .yx-test__close span {
	right: 13px;
	top: 5px;
	height: 20px;
}
body .yx-test .yx-test__eyebrow {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #00a84f;
}
body .yx-test .yx-test__title {
	margin: 0 0 20px;
	padding-right: 30px;
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.15;
	color: #111;
	text-decoration: none;
	text-transform: none;
}
body .yx-test .yx-test__steps {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	counter-reset: yxstep;
}
body .yx-test .yx-test__steps li {
	position: relative;
	margin: 0 0 14px;
	padding-left: 46px;
	counter-increment: yxstep;
	font-size: 15px;
	line-height: 1.4;
	color: #444;
}
body .yx-test .yx-test__steps li::before {
	content: counter(yxstep);
	position: absolute;
	left: 0;
	top: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #00a84f;
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	line-height: 32px;
	text-align: center;
}
body .yx-test .yx-test__steps strong {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: #111;
}
body .yx-test .yx-test__details {
	margin: 0 0 22px;
	padding: 12px 0;
	border-top: 1px solid #e6e6e6;
	border-bottom: 1px solid #e6e6e6;
}
body .yx-test .yx-test__details summary {
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	color: #111;
	list-style: none;
}
body .yx-test .yx-test__details summary::-webkit-details-marker {
	display: none;
}
body .yx-test .yx-test__details summary::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 10px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	position: relative;
	top: -3px;
	transition: transform .2s, top .2s;
}
body .yx-test .yx-test__details[open] summary::after {
	transform: rotate(-135deg);
	top: 1px;
}
body .yx-test .yx-test__details .popup-text {
	padding-top: 10px;
	max-height: 260px;
	overflow-y: auto;
}
body .yx-test .yx-test__details .popup-text p {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	color: #444;
}
/* у теми .form-test — flex-колонка; її діти не стискаються нижче ширини поля вводу — робимо звичайний блок */
body .yx-test .form-test {
	display: block;
}
body .yx-test .yx-test__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 14px;
}
body .yx-test .form-label {
	min-width: 0;
	gap: 6px;
	font-size: 14px;
}
body .yx-test .form-label input[type="text"],
body .yx-test .form-label input[type="tel"] {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	font-size: 16px;
}
body .yx-test .form-label.require input {
	border-color: #e02424;
}
body .yx-test .form-checkbox {
	flex-direction: row;
	align-items: center;
	margin-bottom: 18px;
	font-size: 14px;
}
body .yx-test .form-checkbox.require label {
	color: #e02424;
}
body .yx-test .popup-button-block {
	display: block;
}
body .yx-test .popup-button-block .button-form-test,
body .yx-test .popup-button-block .yx-test__choose {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 14px 18px;
	border: 0;
	border-radius: 4px;
	background: #00a84f;
	color: #fff;
	font-size: 17px !important;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .02em;
	white-space: normal;
	text-transform: none;
	cursor: pointer;
}
body .yx-test .popup-button-block .button-form-test:hover,
body .yx-test .popup-button-block .yx-test__choose:hover {
	background: #008f43;
}

@media (max-width: 767px) {
	body .yx-test .yx-test__box {
		width: 100%;
		min-height: 100%;
		margin: 0;
		border-radius: 0;
		box-shadow: none;
	}
	body .yx-test .yx-test__content {
		padding: 22px 16px 0;
	}
	body .yx-test .yx-test__close {
		right: 10px;
		top: 12px;
	}
	body .yx-test .yx-test__title {
		font-size: 23px;
	}
	body .yx-test .yx-test__fields {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
	}
	body .yx-test .yx-test__details .popup-text {
		max-height: none;
	}
	body .yx-test .popup-button-block {
		position: sticky;
		bottom: 0;
		margin: 0 -16px;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		background: #fff;
		box-shadow: 0 -6px 16px rgba(0, 0, 0, .08);
	}
}

/* ===== Кнопка «умови» ===== */
body .yx-test-terms {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	font-family: 'Roboto Condensed', sans-serif;
	text-align: left;
	color: #00a84f;
}
body .yx-test-terms:hover {
	color: #008f43;
}
/* Картка: рядок у стилі картки (Roboto Condensed, без фону й заокруглень), «УМОВИ» — зелене посилання, як акценти сайту. */
body .yx-test-terms--card {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	width: 100%;
	margin: 10px 0 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	color: #1f2427;
}
body .yx-test-terms--card .yx-test-terms__link {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #00a84f;
	border-bottom: 1px solid currentColor;
}
body .yx-test-terms--card:hover .yx-test-terms__link {
	color: #008f43;
}
/* Телефон: картка вузька (~150–185 px) — один рядок «Тест безкоштовно · УМОВИ», «до 5 днів» є у вікні. */
@media (max-width: 767px) {
	body .yx-test-terms--card {
		flex-wrap: nowrap;
		gap: 6px;
		margin-top: 6px;
		font-size: 13px;
		white-space: nowrap;
	}
	body .yx-test-terms--card .yx-test-terms__days {
		display: none;
	}
	body .yx-test-terms--card .yx-test-terms__link {
		font-size: 11px;
	}
}
body .yx-test-terms--product {
	flex-basis: 100%;
	width: 100%;
	margin: 12px 0 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ===== Каталог: вікно лише з умовами, без форми ===== */
body .yx-test--info .popup-button-block {
	margin-top: 4px;
}
