/*!
 * Quizik — онлайн-квиз.
 *
 * Все значения темы приходят из настроек плагина CSS-переменными,
 * которые проставляются в атрибуте style корневого элемента .asq.
 * Значения ниже — запасные, чтобы разметка выглядела нормально
 * даже без настроек (например, в демо-превью).
 */

.asq,
.asq *,
.asq *::before,
.asq *::after {
	box-sizing: border-box;
}

.asq {
	--asq-main: #ff7544;
	--asq-text: #363636;
	--asq-muted: #6f6f6f;
	--asq-title-color: #363636;
	--asq-eyebrow-color: var(--asq-main);
	--asq-card-bg: #ffffff;
	--asq-border: #e4e4e4;
	--asq-font: inherit;
	--asq-font-size: 16px;
	--asq-title-font: inherit;
	--asq-title-size: 24px;
	--asq-title-weight: 700;
	--asq-answer-size: 16px;
	--asq-btn-size: 16px;
	--asq-btn-bg: var(--asq-main);
	--asq-btn-text: #ffffff;
	--asq-answer-bg: #ffffff;
	--asq-answer-text: var(--asq-text);
	--asq-answer-border: var(--asq-border);
	--asq-answer-sel-bg: var(--asq-main);
	--asq-answer-sel-text: #ffffff;
	--asq-input-bg: #ffffff;
	--asq-input-text: var(--asq-text);
	--asq-input-border: var(--asq-border);
	--asq-progress-bg: #ececec;
	--asq-progress-color: var(--asq-main);
	--asq-card-radius: 8px;
	--asq-answer-radius: 4px;
	--asq-input-radius: 4px;
	--asq-btn-radius: 4px;
	--asq-media-radius: 8px;
	--asq-card-width: 600px;
	--asq-min-height: 520px;
	--asq-padding: 26px;
	--asq-bg-color: #2c2c2c;
	--asq-overlay: 0.45;
	--asq-blur: 9px;

	position: relative;
	display: flex;
	align-items: stretch;
	min-height: var(--asq-min-height);
	padding: var(--asq-padding);
	border-radius: 10px;
	overflow: hidden;
	isolation: isolate;
	font-family: var(--asq-font);
	font-size: var(--asq-font-size);
	line-height: 1.45;
	color: var(--asq-text);
	background-color: var(--asq-bg-color);
}

/* Фоновое изображение с размытием и затемнением. */
.asq::before {
	content: "";
	position: absolute;
	inset: -16px;
	z-index: 0;
	background-image: var(--asq-bg, none);
	background-size: cover;
	background-position: center;
	filter: blur(var(--asq-blur)) brightness(var(--asq-overlay));
}

.asq.asq--no-bg::before {
	background-image: none;
	filter: none;
	inset: 0;
}

.asq .asq__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	gap: 24px;
	width: 100%;
}

.asq.asq--card-left .asq__inner {
	justify-content: flex-start;
}

/* ---------- Картинка рядом с вопросами ---------- */

.asq .asq__media {
	flex: 1 1 auto;
	min-width: 0;
	order: 1;
	border-radius: var(--asq-media-radius);
	overflow: hidden;
	background: rgba(255, 255, 255, 0.06);
}

.asq .asq__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Карточка с вопросами ---------- */

.asq .asq__card {
	order: 2;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	width: var(--asq-card-width);
	max-width: 100%;
	min-height: 468px;
	padding: 26px 30px 20px;
	background: var(--asq-card-bg);
	border: 0;
	border-radius: var(--asq-card-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.asq.asq--card-left .asq__card {
	order: 1;
}

.asq.asq--card-left .asq__media {
	order: 2;
}

/* ---------- Прогресс ---------- */

.asq .asq__top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.asq.asq--no-progress .asq__top,
.asq.asq--done .asq__top {
	display: none;
}

.asq .asq__progress {
	position: relative;
	flex: 1 1 auto;
	height: 4px;
	border-radius: 2px;
	background: var(--asq-progress-bg);
	overflow: hidden;
}

.asq.asq--no-counter .asq__count {
	display: none;
}

.asq .asq__progress span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 2px;
	background: var(--asq-progress-color);
	transition: width 0.35s ease;
}

.asq .asq__count {
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 1;
	color: var(--asq-muted);
	white-space: nowrap;
}

/* ---------- Слайды ---------- */

.asq .asq__viewport {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	overflow: hidden;
}

.asq .asq__slide {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	transition: opacity 0.19s ease, transform 0.19s ease;
}

.asq .asq__slide.is-out-left,
.asq .asq__slide.is-in-left {
	opacity: 0;
	transform: translateX(-30px);
}

.asq .asq__slide.is-out-right,
.asq .asq__slide.is-in-right {
	opacity: 0;
	transform: translateX(30px);
}

/* ---------- Скелет до отрисовки ---------- */

.asq .asq__skeleton {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.asq .asq__skeleton i {
	display: block;
	height: 52px;
	border-radius: var(--asq-answer-radius);
	background: #f1f1f1;
	animation: asq-pulse 1.3s ease-in-out infinite;
}

.asq .asq__skeleton i:first-child {
	width: 65%;
	height: 30px;
}

@keyframes asq-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.45;
	}
}

/* ---------- Заголовки ---------- */

.asq .asq__eyebrow {
	margin: 0 0 10px;
	font-size: calc(var(--asq-font-size) - 2px);
	font-weight: 700;
	line-height: 1.35;
	color: var(--asq-eyebrow-color);
}

.asq .asq__title {
	margin: 0 0 18px;
	font-family: var(--asq-title-font);
	font-size: var(--asq-title-size);
	font-weight: var(--asq-title-weight);
	line-height: 1.28;
	color: var(--asq-title-color);
}

.asq .asq__sub {
	margin: -8px 0 16px;
	font-size: calc(var(--asq-font-size) - 1px);
	line-height: 1.45;
	color: var(--asq-muted);
}

/* ---------- Варианты ответа ---------- */

.asq .asq__answers {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.asq .asq__answers--scroll {
	max-height: 322px;
	overflow-y: auto;
	padding-right: 4px;
	scrollbar-width: thin;
}

.asq .asq__answers--scroll::-webkit-scrollbar {
	width: 6px;
}

.asq .asq__answers--scroll::-webkit-scrollbar-thumb {
	background: #d6d6d6;
	border-radius: 3px;
}

.asq .asq__answer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 15px 18px;
	border: 1px solid var(--asq-answer-border);
	border-radius: var(--asq-answer-radius);
	background: var(--asq-answer-bg);
	color: var(--asq-answer-text);
	font-family: inherit;
	font-size: var(--asq-answer-size);
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.asq .asq__answer:hover {
	border-color: var(--asq-main);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

.asq .asq__answer:focus-visible {
	outline: 2px solid var(--asq-main);
	outline-offset: 2px;
}

.asq .asq__answer.is-selected,
.asq .asq__answer.is-selected:hover {
	border-color: var(--asq-answer-sel-bg);
	background: var(--asq-answer-sel-bg);
	color: var(--asq-answer-sel-text);
}

.asq .asq__check {
	flex: 0 0 auto;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.asq .asq__answer.is-selected .asq__check {
	opacity: 1;
}

/* ---------- Поля ввода ---------- */

.asq .asq__field {
	margin-bottom: 14px;
}

.asq .asq__input {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 15px 16px;
	border: 1px solid var(--asq-input-border);
	border-radius: var(--asq-input-radius);
	background: var(--asq-input-bg);
	color: var(--asq-input-text);
	font-family: inherit;
	font-size: var(--asq-font-size);
	font-weight: 400;
	line-height: 1.3;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.asq .asq__input::placeholder {
	color: var(--asq-muted);
	opacity: 0.75;
}

.asq .asq__input:focus {
	outline: none;
	border-color: var(--asq-main);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.asq .asq__input--error,
.asq .asq__input--error:focus {
	border-color: #d94a3d;
	box-shadow: 0 0 0 3px rgba(217, 74, 61, 0.14);
}

/* ---------- Выбор мессенджера ---------- */

.asq .asq__msgr {
	margin: 0 0 14px;
}

.asq .asq__msgr-title {
	margin: 0 0 8px;
	font-size: calc(var(--asq-font-size) - 3px);
	line-height: 1.4;
	color: var(--asq-muted);
}

.asq .asq__msgr-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.asq .asq__msgr-item {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--asq-answer-border);
	border-radius: var(--asq-answer-radius);
	background: var(--asq-answer-bg);
	color: var(--asq-answer-text);
	font-family: inherit;
	font-size: calc(var(--asq-font-size) - 2px);
	font-weight: 500;
	line-height: 1.2;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.asq .asq__msgr-item:hover {
	border-color: var(--asq-main);
}

.asq .asq__msgr-item:focus-visible {
	outline: 2px solid var(--asq-main);
	outline-offset: 2px;
}

.asq .asq__msgr-item.is-selected {
	border-color: var(--asq-main);
	box-shadow: 0 0 0 1px var(--asq-main);
}

.asq .asq__msgr-item .asq-mi {
	width: 26px;
	height: 26px;
}

.asq .asq__msgr-item .asq-mi svg {
	width: 15px;
	height: 15px;
}

/* ---------- Иконки мессенджеров ---------- */

.asq .asq-mi {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #8a8f98;
	overflow: hidden;
}

.asq .asq-mi svg {
	display: block;
	width: 19px;
	height: 19px;
}

.asq .asq-mi--telegram {
	background: #29a9eb;
}

.asq .asq-mi--whatsapp {
	background: #25d366;
}

.asq .asq-mi--max {
	background: linear-gradient(135deg, #2e7cf6 0%, #8a3ffc 100%);
}

.asq .asq-mi--phone {
	background: #e5397f;
}

/* ---------- Согласие и ошибки ---------- */

.asq .asq__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 2px 0 14px;
	font-size: calc(var(--asq-font-size) - 3.5px);
	line-height: 1.45;
	color: var(--asq-muted);
	cursor: pointer;
}

.asq .asq__consent input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	accent-color: var(--asq-main);
	cursor: pointer;
}

.asq .asq__consent a {
	color: var(--asq-main);
	text-decoration: underline;
}

/* Согласие без галочки — когда согласие не требуется, но текст показать нужно. */
.asq .asq__consent-note {
	margin: 2px 0 14px;
	font-size: calc(var(--asq-font-size) - 3.5px);
	line-height: 1.45;
	color: var(--asq-muted);
}

.asq .asq__consent-note a {
	color: var(--asq-main);
	text-decoration: underline;
}

.asq .asq__error {
	display: none;
	margin: 0 0 12px;
	padding: 11px 14px;
	border-radius: var(--asq-answer-radius);
	background: #fdecea;
	color: #a3261b;
	font-size: calc(var(--asq-font-size) - 2px);
	line-height: 1.4;
}

.asq .asq__error.is-visible {
	display: block;
}

/* Ловушка для ботов. */
.asq .asq__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Подвал слайда ---------- */

.asq .asq__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
}

.asq .asq__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--asq-muted);
	font-family: inherit;
	font-size: calc(var(--asq-font-size) - 2px);
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.asq .asq__back:hover {
	background: none;
	color: var(--asq-main);
}

.asq .asq__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 15px 30px;
	border: 0;
	border-radius: var(--asq-btn-radius);
	background: var(--asq-btn-bg);
	color: var(--asq-btn-text);
	font-family: inherit;
	font-size: var(--asq-btn-size);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: filter 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
	-webkit-appearance: none;
	appearance: none;
}

.asq .asq__btn:hover {
	background: var(--asq-btn-hover, var(--asq-btn-bg));
	color: var(--asq-btn-text);
	filter: brightness(0.94);
}

.asq .asq__btn:active {
	transform: translateY(1px);
}

.asq .asq__btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.asq .asq__btn[hidden],
.asq .asq__next[hidden],
.asq .asq__other-field[hidden] {
	display: none !important;
}

/* ---------- Экран благодарности ---------- */

.asq .asq__thanks {
	margin: auto 0;
	padding: 10px 0;
	text-align: center;
}

.asq .asq__thanks-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	color: var(--asq-main);
}

.asq .asq__thanks h3 {
	margin: 0 0 10px;
	font-family: var(--asq-title-font);
	font-size: calc(var(--asq-title-size) - 2px);
	font-weight: var(--asq-title-weight);
	line-height: 1.3;
	color: var(--asq-title-color);
}

.asq .asq__thanks p {
	margin: 0 0 20px;
	font-size: calc(var(--asq-font-size) - 1px);
	line-height: 1.5;
	color: var(--asq-muted);
}

.asq .asq__socials {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	max-width: 340px;
	margin: 0 auto;
}

.asq .asq__social {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 12px;
	border: 1px solid var(--asq-answer-border);
	border-radius: var(--asq-answer-radius);
	background: var(--asq-answer-bg);
	color: var(--asq-answer-text);
	font-size: calc(var(--asq-font-size) - 2px);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.asq .asq__social:hover {
	border-color: var(--asq-main);
	color: var(--asq-main);
}

.asq .asq__social .asq-mi {
	width: 28px;
	height: 28px;
}

.asq .asq__social .asq-mi svg {
	width: 16px;
	height: 16px;
}

/* ---------- Без JavaScript ---------- */

.asq .asq__noscript {
	margin: auto 0;
	padding: 10px 0;
	color: var(--asq-text);
}

.asq .asq__noscript p {
	margin: 0 0 8px;
}

.asq .asq__noscript a {
	color: var(--asq-main);
	font-size: calc(var(--asq-font-size) + 2px);
	font-weight: 700;
	text-decoration: none;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1024px) {
	.asq .asq__inner {
		flex-direction: column;
		gap: 14px;
	}

	.asq .asq__card {
		order: 2;
		width: 100%;
		min-height: 0;
	}

	.asq .asq__media {
		order: 1;
		min-height: 200px;
	}

	.asq .asq__skeleton i {
		height: 46px;
	}
}

@media (max-width: 767px) {
	.asq {
		--asq-padding: 12px;
		border-radius: 8px;
	}

	.asq .asq__card {
		padding: 20px 18px 16px;
	}

	.asq .asq__title {
		font-size: calc(var(--asq-title-size) - 4px);
	}

	.asq .asq__answers--scroll {
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}

	.asq .asq__btn {
		width: 100%;
		padding: 14px 20px;
	}

	.asq .asq__footer {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.asq .asq__back {
		justify-content: center;
	}

	.asq.asq--hide-media-mobile .asq__media {
		display: none;
	}
}

@media (max-width: 420px) {
	.asq .asq__msgr-grid,
	.asq .asq__socials {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.asq .asq__slide,
	.asq .asq__progress span,
	.asq .asq__answer,
	.asq .asq__btn,
	.asq .asq__skeleton i {
		transition: none !important;
		animation: none !important;
	}
}
