.quizpro-box {
	max-width: 600px;
	margin: 20px auto;
	padding: 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	direction: rtl;
	text-align: right;
	font-family: inherit;
}

.quizpro-title {
	margin-top: 0;
}

.quizpro-start-screen {
	text-align: center;
	margin: 20px 0;
}

.quizpro-btn,
.quizpro-option-btn {
	display: inline-block;
	cursor: pointer;
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-size: 15px;
	background: #2271b1;
	color: #fff;
	transition: background 0.15s ease;
	/* از باقی‌ماندن رنگ آبی پررنگِ تپ روی موبایل جلوگیری می‌کند */
	-webkit-tap-highlight-color: transparent;
}

.quizpro-option-btn {
	text-align: right;
	background: #f0f0f1;
	color: #1d2327;
	border: 1px solid #dcdcde;
}

/*
 * حالت :hover فقط روی دستگاه‌هایی فعال می‌شود که واقعاً موس (ماوس) دارند.
 * روی موبایل/تبلت (لمسی)، مرورگر :hover را با تپ فعال می‌کند و چون
 * دستگاه لمسی راهی برای «خارج شدن ماوس» ندارد، این حالت گاهی روی گزینه‌ی
 * انتخاب‌شده گیر می‌کند و حتی بعد از رفتن به سوال بعد باقی می‌ماند.
 * با این media query، روی موبایل اصلاً :hover اعمال نمی‌شود و این مشکل
 * از ریشه برطرف می‌شود.
 */
@media (hover: hover) and (pointer: fine) {
	.quizpro-btn:hover,
	.quizpro-option-btn:hover {
		background: #135e96;
	}

	.quizpro-option-btn:hover {
		background: #2271b1;
		color: #fff;
	}
}

/* فیدبک لحظه‌ای هنگام تپ روی موبایل (جایگزین سالمِ hover)، خودش‌به‌خود با
   برداشتن انگشت از بین می‌رود و هیچ‌وقت گیر نمی‌کند */
.quizpro-btn:active,
.quizpro-option-btn:active {
	background: #135e96;
}

.quizpro-option-btn:active {
	background: #2271b1;
	color: #fff;
}

.quizpro-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 15px;
}

.quizpro-timers {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 14px;
}

.quizpro-timer-block {
	width: 100%;
}

.quizpro-timer-label {
	display: block;
	font-size: 19px;
	font-weight: 800;
	color: #d63638;
	margin-bottom: 4px;
	direction: rtl;
}

.quizpro-timer-bar-wrap {
	width: 100%;
	height: 10px;
	background: #f1c5c6;
	border-radius: 6px;
	overflow: hidden;
}

.quizpro-timer-bar {
	height: 100%;
	background: #d63638;
	border-radius: 6px;
	width: 100%;
	transition: width 1s linear;
}

.quizpro-progress {
	font-size: 13px;
	color: #777;
	margin-bottom: 6px;
}

.quizpro-question-text {
	font-size: 17px;
	font-weight: 600;
	margin-bottom: 10px;
}

.quizpro-previous-results {
	margin-top: 25px;
	border-top: 1px solid #eee;
	padding-top: 15px;
}

.quizpro-prev-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.quizpro-prev-table th,
.quizpro-prev-table td {
	border: 1px solid #eee;
	padding: 6px 10px;
	text-align: center;
}

/* پاپ آپ نتیجه */
.quizpro-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	cursor: pointer;
}

.quizpro-modal {
	background: #fff;
	border-radius: 10px;
	max-width: 1000px;
	width: 98%;
	padding: 22px 32px;
	text-align: center;
	direction: rtl;
	cursor: default;
	max-height: 90vh;
	overflow-y: auto;
}

.quizpro-modal-image img {
	width: 100%;
	max-height: 280px;
	object-fit: cover;
	margin-bottom: 14px;
	border-radius: 8px;
}

.quizpro-modal-title {
	margin: 6px 0;
	font-size: 20px;
}

.quizpro-modal-desc {
	color: #444;
	font-size: 14px;
	line-height: 1.8;
	max-height: 340px;
	overflow-y: auto;
	margin: 0 auto;
	text-align: right;
}

.quizpro-modal-desc h3 {
	font-size: 19px;
	margin: 12px 0 6px;
}

.quizpro-modal-desc h4 {
	font-size: 16px;
	margin: 10px 0 5px;
}

.quizpro-modal-desc p {
	margin: 0 0 10px;
}

.quizpro-modal-desc ul,
.quizpro-modal-desc ol {
	padding-right: 22px;
	margin: 8px 0;
	text-align: right;
}

/* ردیف پایین پاپ‌آپ: امتیاز و راهنمای بستن، هر دو در یک خط تا فضای بیشتری
   برای باکس توضیحات باقی بماند */
.quizpro-modal-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid #eee;
}

.quizpro-modal-score {
	font-weight: bold;
	margin: 0;
}

.quizpro-modal-hint {
	font-size: 12px;
	color: #999;
	margin: 0;
}

.quizpro-login-required {
	text-align: center;
}

/* واکنش‌گرا برای موبایل: پاپ‌آپ متناسب با ابعاد صفحه موبایل */
@media (max-width: 600px) {
	.quizpro-modal {
		width: 94%;
		max-width: 94vw;
		padding: 16px;
		max-height: 88vh;
	}

	.quizpro-modal-image img {
		max-height: 38vh;
	}

	.quizpro-modal-desc {
		max-height: 30vh;
	}

	.quizpro-modal-footer {
		flex-direction: column;
		gap: 4px;
	}

	.quizpro-timer-label {
		font-size: 16px;
	}
}

/* دکمه شروع آزمون: اختصاصی، مستقل از دکمه‌های گزینه‌های سوال */
.quizpro-start-btn {
	background: #2271b1;
	font-size: 18px;
	padding: 14px 30px;
	min-width: 320px;
	-webkit-tap-highlight-color: transparent;
}

/* فقط روی دستگاه با ماوس (نه موبایل/تبلت لمسی) تا گیر نکند */
@media (hover: hover) and (pointer: fine) {
	.quizpro-start-btn:hover {
		background: #135e96;
	}
}

.quizpro-start-btn:active {
	background: #135e96;
}
