/* Easy Quiz Frontend Styles — Matched to Figma Design Tokens */
.easy-quiz-modal-overlay,
.easy-quiz-modal-overlay * {
	box-sizing: border-box;
}

body.easy-quiz-lock-scroll {
	overflow: hidden !important;
}

.easy-quiz-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(15, 23, 42, 0.56);
	backdrop-filter: blur(2px);
	font-family: inherit;
	direction: rtl;
	text-align: right;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.easy-quiz-modal-overlay[hidden] {
	display: none;
}

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

.easy-quiz-modal-dialog {
	width: 100%;
	max-width: 741px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #ffffff;
	border-radius: 24px;
	padding: 26px;
	box-shadow: 0 24px 60px rgba(15, 30, 48, 0.22);
	color: #182230;
	outline: none;
}

.easy-quiz-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.easy-quiz-brand {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.easy-quiz-subtitle {
	display: block;
	color: #08a45d;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
}

.easy-quiz-title {
	margin: 0;
	color: #182230;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.5;
}

.easy-quiz-close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 9px;
	background: #f0f5f2;
	color: #182230;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.easy-quiz-close:hover {
	background: #e2ebe6;
}

.easy-quiz-close:focus-visible {
	outline: 2px solid #08a45d;
	outline-offset: 2px;
}

.easy-quiz-progress {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	margin-bottom: 18px;
}

.easy-quiz-progress.is-hidden {
	display: none;
}

.easy-quiz-progress-segment {
	flex: 1 1 0;
	height: 6px;
	border-radius: 3px;
	background: #e8efeb;
	transition: background-color 0.2s ease;
}

.easy-quiz-progress-segment.is-completed,
.easy-quiz-progress-segment.is-active {
	background: #08a45d;
}

.easy-quiz-step-meta {
	margin: 0 0 18px;
	color: #71869a;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.6;
}

.easy-quiz-question-text {
	margin: 0 0 22px;
	color: #182230;
	font-size: 19px;
	font-weight: 800;
	line-height: 1.65;
}

.easy-quiz-question-desc {
	margin: -12px 0 18px;
	color: #71869a;
	font-size: 13px;
	line-height: 1.7;
}

.easy-quiz-answers {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
}

.easy-quiz-answer-btn {
	width: 100%;
	white-space: normal;
	min-height: 50px;
	padding: 12px 18px;
	border: 1px solid #dce9e2;
	border-radius: 12px;
	background: #ffffff;
	color: #475467;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.65;
	text-align: right;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.easy-quiz-answer-btn:hover {
	color: #475467;
	border-color: #9edbb5;
	background: #f9fcfa;
}

.easy-quiz-answer-btn.is-selected {
	border-color: #08a45d;
	background: #f1faf5;
	color: #182230;
	font-weight: 600;
}

.easy-quiz-answer-btn:focus-visible {
	outline: 2px solid #08a45d;
	outline-offset: 2px;
}

.easy-quiz-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px;
}

.easy-quiz-btn {
	height: 44px;
	padding: 0 20px;
	border-radius: 12px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.easy-quiz-btn:focus-visible {
	outline: 2px solid #08a45d;
	outline-offset: 2px;
}

.easy-quiz-btn--secondary {
	background: #ffffff;
	border: 1px solid #d4e3da;
	color: #182230;
}

.easy-quiz-btn--secondary:hover:not(:disabled) {
	background: #f5f9f7;
	border-color: #b7cfc1;
}

.easy-quiz-btn--secondary:disabled,
.easy-quiz-btn--secondary.is-hidden {
	visibility: hidden;
	pointer-events: none;
}

.easy-quiz-btn--primary {
	background: #08a45d;
	border: 1px solid #08a45d;
	color: #ffffff;
}

.easy-quiz-btn--primary:hover:not(:disabled) {
	background: #078d50;
	border-color: #078d50;
	color: #ffffff;
}

.easy-quiz-btn--primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.easy-quiz-btn--block {
	width: 100%;
}

/* Phone Capture Step */
.easy-quiz-phone-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.easy-quiz-icon-badge {
	width: 60px;
	height: 60px;
	border-radius: 18px;
	background: #e8f7f0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 8px auto 14px;
}

.easy-quiz-icon-badge img {
	width: 28px;
	height: 28px;
	object-fit: contain;
	display: block;
}

.easy-quiz-phone-eyebrow {
	color: #08a45d;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
}

.easy-quiz-phone-heading {
	margin: 0 0 10px;
	color: #182230;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.5;
}

.easy-quiz-phone-desc {
	margin: 0 0 24px;
	max-width: 470px;
	color: #71869a;
	font-size: 13px;
	line-height: 1.75;
}

.easy-quiz-phone-form {
	width: 100%;
	max-width: 500px;
	text-align: right;
}

.easy-quiz-field-label {
	display: block;
	margin-bottom: 8px;
	color: #182230;
	font-size: 13px;
	font-weight: 700;
}

.easy-quiz-phone-input {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1px solid #d5e3db;
	border-radius: 12px;
	background: #ffffff;
	color: #182230;
	font-family: inherit;
	font-size: 15px;
	direction: ltr;
	text-align: left;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.easy-quiz-phone-input::placeholder {
	color: #98a2b3;
}

.easy-quiz-phone-input:focus {
	border-color: #08a45d;
	box-shadow: 0 0 0 3px rgba(8, 164, 93, 0.12);
}

.easy-quiz-phone-input.is-invalid {
	border-color: #d92d20;
}

.easy-quiz-helper-text {
	margin: 8px 0 16px;
	color: #98a2b3;
	font-size: 11px;
	line-height: 1.6;
}

.easy-quiz-error-msg {
	margin: 8px 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fef3f2;
	border: 1px solid #fecdca;
	color: #b42318;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
}

.easy-quiz-phone-footer {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 22px;
}

.easy-quiz-privacy-note {
	color: #98a2b3;
	font-size: 11px;
	line-height: 1.5;
}

.easy-quiz-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Result Step */
.easy-quiz-result-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.easy-quiz-result-icon {
	margin: 20px auto 12px;
}

.easy-quiz-result-icon img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	display: block;
}

.easy-quiz-result-eyebrow {
	color: #08a45d;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 8px;
}

.easy-quiz-result-title {
	margin: 0 0 12px;
	color: #182230;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.5;
}

.easy-quiz-result-level-desc {
	margin: 0 auto 10px;
	max-width: 600px;
	color: #475467;
	font-size: 14px;
	line-height: 1.8;
}

.easy-quiz-result-disclaimer {
	margin: 0 auto 36px;
	max-width: 630px;
	color: #71869a;
	font-size: 12.5px;
	line-height: 1.8;
}

.easy-quiz-result-footer {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
}

/* Loading spinner inside button */
.easy-quiz-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: easyQuizSpin 0.7s linear infinite;
}

@keyframes easyQuizSpin {
	to {
		transform: rotate(360deg);
	}
}

/* Mobile Responsive (Figma mobile frame 328px) */
@media (max-width: 767px) {
	.easy-quiz-modal-dialog {
		max-width: 328px;
		padding: 16px;
		border-radius: 20px;
	}

	.easy-quiz-modal-header {
		margin-bottom: 16px;
	}

	.easy-quiz-close {
		width: 36px;
		height: 36px;
	}

	.easy-quiz-title {
		font-size: 16px;
	}

	.easy-quiz-question-text {
		font-size: 17px;
		margin-bottom: 18px;
	}

	.easy-quiz-answer-btn {
		min-height: 49px;
		padding: 11px 14px;
		font-size: 13px;
	}

	.easy-quiz-result-disclaimer {
		margin-bottom: 24px;
	}

	.easy-quiz-result-footer {
		flex-wrap: wrap;
	}

	.easy-quiz-result-footer .easy-quiz-btn--primary {
		flex: 1 1 auto;
	}
}
