/* Carox Quiz Oil Choice — styles */

.cq-fab,
.cq-modal {
	--cq-green: #82b638;
	--cq-green-dark: #5f8c1f;
	--cq-tg: #2481cc;
	--cq-text: #fff;
	--cq-shadow-text: 0 1px 2px rgba(0, 0, 0, .38), 0 2px 8px rgba(0, 0, 0, .18);
	--cq-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-family: var(--cq-font);
	box-sizing: border-box;
}
.cq-fab *,
.cq-modal * { box-sizing: border-box; }

/* ---------- Кнопка (знизу посередині) ---------- */
.cq-fab {
	position: fixed;
	left: 50%;
	bottom: calc(var(--cq-bottom, 18px) + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 99990;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 13px 26px 13px 20px;
	background: var(--cq-green);
	color: var(--cq-text);
	border: 3px solid #fff;
	border-radius: 999px;
	box-shadow: 0 10px 28px rgba(40, 60, 10, .45), 0 3px 8px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
	font: 700 16px/1.1 var(--cq-font);
	letter-spacing: .2px;
	text-shadow: var(--cq-shadow-text);
	text-transform: none;
	cursor: pointer;
	white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
	transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
	animation: cq-pop .6s cubic-bezier(.2, 1.2, .4, 1) both .4s;
}
.cq-fab::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: inherit;
	border: 3px solid var(--cq-green);
	opacity: 0;
	pointer-events: none;
	animation: cq-pulse 2.8s ease-out infinite 1.6s;
}
.cq-fab:hover,
.cq-fab:focus-visible {
	background: #8cc43e;
	color: #fff;
	transform: translateX(-50%) translateY(-3px);
	box-shadow: 0 16px 34px rgba(40, 60, 10, .5), 0 4px 10px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .4);
	outline: none;
}
.cq-fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cq-fab:active { transform: translateX(-50%) scale(.97); }
.cq-fab__icon {
	flex: none;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
}
.cq-fab.is-hidden { display: none !important; }

@keyframes cq-pop {
	from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.9); }
	to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes cq-pulse {
	0%   { opacity: .55; transform: scale(1); }
	70%  { opacity: 0; transform: scale(1.18, 1.55); }
	100% { opacity: 0; transform: scale(1.18, 1.55); }
}

/* ---------- Модальне вікно ---------- */
.cq-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.cq-modal.is-open { display: flex !important; }

.cq-overlay {
	position: absolute;
	inset: 0;
	background: rgba(18, 26, 8, .62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	animation: cq-fade .25s ease both;
}

.cq-dialog {
	position: relative;
	width: 100%;
	max-width: 580px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	display: flex;
	flex-direction: column;
	background: var(--cq-green);
	background-image:
		radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, .22), transparent 60%),
		radial-gradient(90% 60% at 100% 100%, rgba(40, 70, 0, .28), transparent 65%);
	color: var(--cq-text);
	text-shadow: var(--cq-shadow-text);
	border-radius: 28px;
	border: 1px solid rgba(255, 255, 255, .45);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .4);
	padding: 18px 26px 22px;
	outline: none;
	animation: cq-rise .35s cubic-bezier(.2, .9, .3, 1.1) both;
}

@keyframes cq-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cq-rise {
	from { opacity: 0; transform: translateY(24px) scale(.97); }
	to   { opacity: 1; transform: none; }
}

/* верх: прогрес + закриття */
.cq-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}
.cq-stepper { flex: 1; min-width: 0; padding-top: 6px; }
.cq-stepper__label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .9px;
	text-transform: uppercase;
	opacity: .95;
	margin-bottom: 9px;
}
.cq-progress {
	height: 6px;
	border-radius: 99px;
	background: rgba(0, 0, 0, .18);
	overflow: hidden;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2);
}
.cq-progress__fill {
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: #fff;
	box-shadow: 0 0 10px rgba(255, 255, 255, .8);
	transition: width .45s cubic-bezier(.3, .8, .3, 1);
}

/* Закрити: чорний хрестик + текст зверху справа */
.cq-close {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 12px;
	background: rgba(255, 255, 255, .22);
	color: #000;
	border: 0;
	border-radius: 999px;
	font: 700 13.5px/1 var(--cq-font);
	text-shadow: none;
	text-transform: none;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.cq-close:hover,
.cq-close:focus-visible { background: rgba(255, 255, 255, .45); color: #000; outline: none; }
.cq-close:focus-visible { box-shadow: 0 0 0 3px #000; }
.cq-close:active { transform: scale(.96); }
.cq-close svg { display: block; }

/* сцена */
.cq-stage {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 2px 4px 6px;
	margin: 0 -4px;
	-webkit-overflow-scrolling: touch;
}
.cq-step { animation: cq-step-in .38s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes cq-step-in {
	from { opacity: 0; transform: translateX(22px); }
	to   { opacity: 1; transform: none; }
}

.cq-q {
	margin: 0 0 6px;
	font: 800 clamp(22px, 4.6vw, 28px)/1.2 var(--cq-font);
	letter-spacing: -.3px;
	color: #fff;
	text-shadow: var(--cq-shadow-text);
}
.cq-lead {
	margin: 0 0 18px;
	font-size: 15.5px;
	line-height: 1.5;
	opacity: .96;
}
.cq-hint {
	margin: 10px 2px 0;
	font-size: 13.5px;
	line-height: 1.45;
	opacity: .92;
}
.cq-field { margin-top: 16px; }
.cq-label {
	display: block;
	margin: 0 0 7px 3px;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: .2px;
}

/* поля вводу */
.cq-input,
.cq-select {
	display: block;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0 18px;
	background: #fff;
	color: #1b2a0b;
	border: 2px solid transparent;
	border-radius: 16px;
	box-shadow: 0 6px 16px rgba(30, 50, 5, .22);
	font: 600 16px/1 var(--cq-font);
	text-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.cq-input::placeholder { color: #8a9a74; font-weight: 500; }
.cq-select {
	padding-right: 48px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2382b638' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	text-overflow: ellipsis;
}
.cq-select option { color: #1b2a0b; background: #fff; }
.cq-input:focus,
.cq-select:focus {
	outline: none;
	border-color: #1f3a00;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, .55), 0 6px 16px rgba(30, 50, 5, .22);
}
.cq-input-wrap { position: relative; }
.cq-input-wrap .cq-unit {
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: #6c8a3a;
	font-weight: 800;
	font-size: 15px;
	text-shadow: none;
	pointer-events: none;
}
.cq-input-wrap .cq-input { padding-right: 56px; }

/* чипи (мультивибір) */
.cq-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cq-chip { position: relative; display: block; margin: 0; cursor: pointer; }
.cq-chip input {
	position: absolute;
	opacity: 0;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}
.cq-chip span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	border: 2px solid rgba(255, 255, 255, .55);
	border-radius: 14px;
	font: 700 14.5px/1.2 var(--cq-font);
	text-shadow: var(--cq-shadow-text);
	transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.cq-chip span::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 6px;
	border: 2px solid rgba(255, 255, 255, .85);
	background: transparent center / 12px no-repeat;
	transition: background-color .15s ease, border-color .15s ease;
}
.cq-chip:hover span { background: rgba(255, 255, 255, .3); }
.cq-chip input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.cq-chip input:checked + span {
	background: #fff;
	color: #3f6300;
	border-color: #fff;
	text-shadow: none;
	box-shadow: 0 6px 16px rgba(30, 50, 5, .25);
	transform: translateY(-1px);
}
.cq-chip input:checked + span::before {
	background-color: var(--cq-green);
	border-color: var(--cq-green);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.500 4.500L19 7.500'/%3E%3C/svg%3E");
}

/* кнопки */
.cq-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.cq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	min-height: 54px;
	padding: 0 26px;
	border: 2px solid #fff;
	border-radius: 16px;
	font: 800 16px/1.2 var(--cq-font);
	letter-spacing: .2px;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, opacity .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.cq-btn:active { transform: scale(.98); }
.cq-btn--primary {
	flex: 1 1 auto;
	background: #fff;
	color: #3f6300;
	text-shadow: none;
	box-shadow: 0 8px 20px rgba(30, 50, 5, .3);
}
.cq-btn--primary:hover:not(:disabled),
.cq-btn--primary:focus-visible { background: #f4ffe0; color: #2f4d00; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 50, 5, .35); outline: none; }
.cq-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.cq-btn--ghost {
	background: rgba(255, 255, 255, .14);
	color: #fff;
	text-shadow: var(--cq-shadow-text);
	box-shadow: 0 6px 16px rgba(30, 50, 5, .18);
}
.cq-btn--ghost:hover,
.cq-btn--ghost:focus-visible { background: rgba(255, 255, 255, .28); color: #fff; transform: translateY(-2px); outline: none; }
.cq-btn--block { width: 100%; flex: 1 1 100%; }
.cq-btn.is-loading { pointer-events: none; }
.cq-btn.is-loading::after {
	content: "";
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 3px solid rgba(63, 99, 0, .3);
	border-top-color: #3f6300;
	animation: cq-spin .7s linear infinite;
}
@keyframes cq-spin { to { transform: rotate(360deg); } }

/* вибір з великих карток (кроки 6 і 7) */
.cq-options { display: grid; gap: 12px; margin-top: 4px; }
.cq-option {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 16px 18px;
	text-align: left;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	border: 2px solid rgba(255, 255, 255, .6);
	border-radius: 18px;
	font-family: var(--cq-font);
	text-shadow: var(--cq-shadow-text);
	text-transform: none;
	cursor: pointer;
	transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.cq-option:hover,
.cq-option:focus-visible {
	background: #fff;
	color: #3f6300;
	text-shadow: none;
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(30, 50, 5, .3);
	outline: none;
}
.cq-option:hover .cq-option__desc,
.cq-option:focus-visible .cq-option__desc { color: #4d6a1c; }
.cq-option.is-active { background: #fff; color: #3f6300; text-shadow: none; }
.cq-option__ico {
	flex: none;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: rgba(255, 255, 255, .25);
	font-size: 22px;
	line-height: 1;
	text-shadow: none;
}
.cq-option:hover .cq-option__ico,
.cq-option:focus-visible .cq-option__ico,
.cq-option.is-active .cq-option__ico { background: rgba(130, 182, 56, .2); }
.cq-option__body { display: block; min-width: 0; }
.cq-option__title { display: block; font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.cq-option__desc { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 500; line-height: 1.4; opacity: .95; }

/* чекбокс згоди */
.cq-consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 18px 0 0;
	font-size: 13.5px;
	line-height: 1.5;
	cursor: pointer;
}
.cq-consent input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	accent-color: #2f4d00;
	cursor: pointer;
}
.cq-consent a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cq-consent a:hover { color: #1f3a00; }

.cq-error {
	margin: 14px 0 0;
	padding: 12px 14px;
	background: rgba(120, 10, 10, .85);
	color: #fff;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-shadow: none;
}

/* назад */
.cq-back {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 14px 0 0;
	padding: 8px 14px 8px 10px;
	background: rgba(0, 0, 0, .16);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font: 700 14px/1 var(--cq-font);
	text-shadow: var(--cq-shadow-text);
	cursor: pointer;
	transition: background .15s ease;
}
.cq-back.is-shown { display: inline-flex !important; }
.cq-back:hover,
.cq-back:focus-visible { background: rgba(0, 0, 0, .3); color: #fff; outline: none; }

/* фінальний екран */
.cq-done { text-align: center; padding: 6px 0 2px; }
.cq-done__badge {
	width: 76px;
	height: 76px;
	margin: 0 auto 16px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #fff;
	color: var(--cq-green);
	box-shadow: 0 12px 28px rgba(30, 50, 5, .35);
	animation: cq-badge .6s cubic-bezier(.2, 1.4, .4, 1) both .1s;
}
@keyframes cq-badge { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cq-done .cq-q { font-size: clamp(24px, 5.4vw, 31px); }
.cq-done p { margin: 12px 0 0; font-size: 15.5px; line-height: 1.55; }
.cq-done p strong { font-weight: 800; }
.cq-tg {
	margin-top: 22px;
	background: var(--cq-tg);
	color: #fff;
	border-color: #fff;
	text-shadow: var(--cq-shadow-text);
	box-shadow: 0 10px 24px rgba(10, 50, 90, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
	min-height: 58px;
	font-size: 16.5px;
}
.cq-tg:hover,
.cq-tg:focus-visible { background: #2b8fe0; color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10, 50, 90, .5); outline: none; }
.cq-tg svg { flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.cq-finish {
	margin-top: 22px;
	padding: 16px 18px;
	background: rgba(0, 0, 0, .16);
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 18px;
}
.cq-finish b { display: block; font-size: 17px; font-weight: 800; }
.cq-finish span { display: block; margin-top: 3px; font-size: 14.5px; opacity: .95; }

/* honeypot */
.cq-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

body.cq-lock { overflow: hidden !important; }

/* ---------- Адаптив ---------- */
@media (max-width: 560px) {
	.cq-modal { padding: 0; align-items: flex-end; }
	.cq-dialog {
		max-width: none;
		max-height: 96vh;
		max-height: 96dvh;
		border-radius: 26px 26px 0 0;
		padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
	}
	.cq-close__text { font-size: 13px; }
	.cq-fab { font-size: 15px; padding: 12px 22px 12px 16px; gap: 10px; }
	.cq-chip span { padding: 11px 13px; font-size: 14px; }
	.cq-btn { padding: 0 20px; }
}
@media (max-width: 380px) {
	.cq-close__text { display: none; }
	.cq-fab__icon { width: 34px; height: 21px; }
}

@media (prefers-reduced-motion: reduce) {
	.cq-fab, .cq-fab::after, .cq-dialog, .cq-overlay, .cq-step, .cq-done__badge { animation: none !important; }
	.cq-progress__fill { transition: none; }
}
.cq-modal [hidden] { display: none !important; }
