/* Per-quiz custom styles via CSS variables (AYS-style) */

.oqm-quiz.oqm-has-custom-styles {
	width: var(--oqm-quiz-width, 100%);
	max-width: var(--oqm-quiz-max-width, none);
	font-size: var(--oqm-quiz-font-size, inherit);
	line-height: var(--oqm-quiz-line-height, 1.5);
}

.oqm-quiz.oqm-has-custom-styles[style*='--oqm-quiz-font-family'] {
	font-family: var(--oqm-quiz-font-family);
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme)[style*='--oqm-quiz-text'] {
	color: var(--oqm-quiz-text);
}

.oqm-quiz.oqm-style-shadow:not(.oqm-layout-theme) .wpqms_wini_card_container,
.oqm-quiz.oqm-style-shadow:not(.oqm-layout-theme) .wpqms_webe_card_container,
.oqm-quiz.oqm-style-shadow:not(.oqm-layout-theme) .wpqms_amaze_card_container,
.oqm-quiz.oqm-style-shadow.oqm-layout-classic,
.oqm-quiz.oqm-style-shadow.oqm-layout-practice {
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_container,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_webe_card_container,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_amaze_card_container {
	border-radius: var(--oqm-radius, 12px);
	background-color: var(--oqm-quiz-bg, transparent);
}

/* Buttons — classic layouts only; design themes use native theme CSS */
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_btn,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_webe_card_btn_primary,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_amaze_card_quiz_button,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-btn-primary,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-btn-exam-primary {
	background: var(--oqm-btn-bg, var(--oqm-accent, #0ea5e9)) !important;
	color: var(--oqm-btn-text, #fff) !important;
	border-radius: var(--oqm-btn-radius, 8px) !important;
	font-size: var(--oqm-btn-font-size, 16px) !important;
	padding: var(--oqm-btn-padding-y, 12px) var(--oqm-btn-padding-x, 24px) !important;
	-webkit-text-fill-color: var(--oqm-btn-text, #fff) !important;
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_btn:hover,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_webe_card_btn_primary:hover,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_amaze_card_quiz_button:hover,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-btn-primary:hover,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-btn-exam-primary:hover {
	background: var(--oqm-btn-hover-bg, var(--oqm-btn-bg)) !important;
	color: var(--oqm-btn-hover-text, var(--oqm-btn-text, #fff)) !important;
	-webkit-text-fill-color: var(--oqm-btn-hover-text, var(--oqm-btn-text, #fff)) !important;
}

/* Answers — Wini (classic layouts only; theme layout uses theme-overrides.css) */
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_option {
	background: var(--oqm-answer-bg, #fff);
	color: var(--oqm-answer-text, inherit);
	border-radius: var(--oqm-answer-radius, 8px);
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_option:not(.wpqms_wini_card_option_active):not(.wpqms_wini_card_option_error):hover {
	background: var(--oqm-answer-hover-bg, #fafafa);
	color: var(--oqm-answer-hover-text, inherit);
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_option_active,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_option:has(input:checked) {
	background: var(--oqm-answer-correct, #4caf50) !important;
	border-color: var(--oqm-answer-correct, #49ab4d) !important;
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_option_error {
	background: var(--oqm-answer-wrong, #ef4444) !important;
	border-color: var(--oqm-answer-wrong, #dc2626) !important;
}

/* Answers — Webe / Amaze options (classic layouts only) */
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_webe_card_option,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_amaze_card_option {
	border-radius: var(--oqm-answer-radius, 8px);
}

/* Progress bar — classic layouts only */
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_webe_card_progressbar,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-progress-bar,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-progress-fill,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-practice-progress-track .oqm-progress-fill {
	height: var(--oqm-progress-height, 6px);
	background: var(--oqm-progress-fill, var(--oqm-accent, #0ea5e9));
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_webe_card_progress,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-practice-progress-track {
	background: var(--oqm-progress-bg, #e2e8f0);
}

.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_webe_card_progress_text,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-progress-label {
	color: var(--oqm-progress-text, inherit);
}

/* Timer — classic layouts only */
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-theme-timer,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .wpqms_wini_card_quiz_tools,
.oqm-quiz.oqm-has-custom-styles:not(.oqm-layout-theme) .oqm-timer-display {
	font-size: var(--oqm-timer-font-size, 14px);
	background: var(--oqm-timer-bg, #f1f5f9);
	color: var(--oqm-timer-text, inherit);
	border-radius: 8px;
	padding: 4px 10px;
}

.oqm-quiz.oqm-timer-pos-top-right .oqm-theme-timer-wrap,
.oqm-quiz.oqm-timer-pos-top-right .oqm-timer-slot {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
}

.oqm-quiz.oqm-timer-pos-top-left .oqm-theme-timer-wrap,
.oqm-quiz.oqm-timer-pos-top-left .oqm-timer-slot {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 5;
}

/* Question animations */
.oqm-quiz.oqm-anim-fade .oqm-question:not(.oqm-hidden) {
	animation: oqmAnimFade var(--oqm-animation-duration, 400ms) ease;
}

.oqm-quiz.oqm-anim-slide .oqm-question:not(.oqm-hidden) {
	animation: oqmAnimSlide var(--oqm-animation-duration, 400ms) ease;
}

.oqm-quiz.oqm-anim-shake .oqm-question:not(.oqm-hidden) {
	animation: oqmAnimShake var(--oqm-animation-duration, 400ms) ease;
}

@keyframes oqmAnimFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes oqmAnimSlide {
	from { opacity: 0; transform: translateX(16px); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes oqmAnimShake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-6px); }
	40%, 80% { transform: translateX(6px); }
}

/* Feedback icons (instant feedback) */
.oqm-quiz.oqm-icon-correct-check .oqm-feedback-icon.is-correct::before { content: '✓'; }
.oqm-quiz.oqm-icon-correct-circle .oqm-feedback-icon.is-correct::before { content: '◉'; }
.oqm-quiz.oqm-icon-correct-thumb .oqm-feedback-icon.is-correct::before { content: '👍'; }
.oqm-quiz.oqm-icon-correct-star .oqm-feedback-icon.is-correct::before { content: '★'; }
.oqm-quiz.oqm-icon-wrong-cross .oqm-feedback-icon.is-wrong::before { content: '✕'; }
.oqm-quiz.oqm-icon-wrong-circle-x .oqm-feedback-icon.is-wrong::before { content: '⊗'; }

.oqm-quiz {
	position: relative;
}

.oqm-quiz .wpqms_wini_card_container,
.oqm-quiz .wpqms_webe_card_container {
	position: relative;
}

.oqm-theme-result-extras {
	margin-top: 16px;
	text-align: center;
}
.oqm-theme-answer-review {
	margin-top: 16px;
	text-align: left;
}
.oqm-theme-answer-review h4 {
	margin: 0 0 10px;
	font-size: 14px;
}
.oqm-theme-wrong-list {
	margin: 12px 0 0;
	padding-left: 18px;
	font-size: 13px;
	color: #b91c1c;
}
.oqm-theme-cert-btn {
	margin: 10px 8px 0;
}
.oqm-theme-result-popup {
	position: fixed !important;
	inset: 5% 10%;
	z-index: 100000;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.25);
}
.oqm-timer-animated .oqm-timer-display {
	animation: oqmTimerPulse 1s ease-in-out infinite;
}
@keyframes oqmTimerPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}
.oqm-live-explanation {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #f8fafc;
	font-size: 13px;
	color: #334155;
}
.oqm-progress-bottom {
	order: 99;
}
.oqm-result-loader {
	position: absolute;
	inset: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(255, 255, 255, 0.88);
	border-radius: inherit;
}
.oqm-result-loader__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}
.oqm-result-loader__gif {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: contain;
}
.oqm-result-loader__text {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
}
