/* AC Pop-up Quiz */

.ac-quiz-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(18, 18, 20, 0.62);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ac-quiz-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.ac-quiz-modal {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: min(90vh, 820px);
	overflow: hidden;
	background: #faf8f5;
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	transform: translateY(16px) scale(0.98);
	transition: transform 0.3s ease;
}

.ac-quiz-overlay.is-open .ac-quiz-modal {
	transform: translateY(0) scale(1);
}

.ac-quiz-close {
	position: absolute;
	top: 12px;
	right: 14px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #333;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s;
}

.ac-quiz-close:hover {
	background: #fff;
}

.ac-quiz-app {
	overflow-y: auto;
	padding: 36px 28px 28px;
	scrollbar-width: thin;
}

.ac-quiz-shortcode-wrap {
	display: inline-block;
}

.ac-quiz-trigger-btn,
.ac-quiz-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid #fff;
	border-radius: 5px;
	background: transparent;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.ac-quiz-trigger-btn:hover,
.ac-quiz-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(109, 84, 53, 0.28);
	color: #fff;
}

.ac-quiz-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.ac-quiz-btn--secondary {
	background: transparent;
	border: 1.5px solid #c4b49a;
	color: #5c4a32;
	box-shadow: none;
}

.ac-quiz-btn--secondary:hover {
	background: #f3ede4;
	color: #5c4a32;
	box-shadow: none;
}

.ac-quiz-eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #8b6f47;
}

.ac-quiz-title {
	margin: 0 0 12px;
	font-size: clamp(22px, 4vw, 28px);
	line-height: 1.25;
	font-weight: 600;
	color: #1f1a14;
}

.ac-quiz-subtitle {
	margin: -4px 0 16px;
	font-size: 18px;
	font-weight: 500;
	color: #6d5435;
}

.ac-quiz-text {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.65;
	color: #4a4338;
}

.ac-quiz-benefits {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.ac-quiz-benefits li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 8px;
	font-size: 14px;
	color: #4a4338;
}

.ac-quiz-benefits li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #8b6f47;
	font-weight: 700;
}

.ac-quiz-progress {
	height: 4px;
	margin-bottom: 24px;
	background: #e8e0d4;
	border-radius: 999px;
	overflow: hidden;
}

.ac-quiz-progress-bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #8b6f47, #b8956a);
	border-radius: 999px;
	transition: width 0.35s ease;
}

.ac-quiz-options {
	display: grid;
	gap: 10px;
	margin-bottom: 24px;
}

.ac-quiz-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1.5px solid #ddd4c6;
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.ac-quiz-option:hover {
	border-color: #b8956a;
	background: #fffdf9;
}

.ac-quiz-option.is-selected {
	border-color: #8b6f47;
	background: #f7f0e6;
	box-shadow: 0 0 0 1px #8b6f47 inset;
}

.ac-quiz-option input {
	margin-top: 3px;
	accent-color: #8b6f47;
	flex-shrink: 0;
}

.ac-quiz-option span {
	font-size: 14px;
	line-height: 1.45;
	color: #2e2922;
}

.ac-quiz-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.ac-quiz-result-list {
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.ac-quiz-result-list > li {
	position: relative;
	padding-left: 18px;
	margin-bottom: 8px;
	font-size: 14px;
	line-height: 1.5;
	color: #3d362c;
}

.ac-quiz-result-list > li::before {
	content: "•";
	position: absolute;
	left: 0;
	color: #8b6f47;
	font-weight: 700;
}

.ac-quiz-result-list--sub {
	margin: 8px 0 16px 12px;
}

.ac-quiz-result-list--sub li::before {
	content: "–";
}

.ac-quiz-info-box {
	margin: 16px 0 20px;
	padding: 16px 18px;
	background: #f0e9df;
	border-left: 3px solid #8b6f47;
	border-radius: 0 10px 10px 0;
}

.ac-quiz-info-box h4 {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: #4a3720;
}

.ac-quiz-info-box p,
.ac-quiz-info-box ul {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #4a4338;
}

.ac-quiz-info-box ul {
	padding-left: 18px;
}

.ac-quiz-next-step {
	margin: 20px 0 0;
	padding-top: 16px;
	border-top: 1px solid #e0d6c8;
	font-size: 14px;
	font-weight: 500;
	color: #3d362c;
}

.ac-quiz-screen {
	animation: acQuizFadeIn 0.28s ease;
}

@keyframes acQuizFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 520px) {
	.ac-quiz-app {
		padding: 32px 18px 22px;
	}

	.ac-quiz-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.ac-quiz-btn,
	.ac-quiz-trigger-btn {
		width: 100%;
	}
}
