/**
 * Quiz Maker – front-end styles.
 */

.qm-quiz {
	--qm-gap: 1rem;
	max-width: 720px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
}

.qm-quiz__intro {
	margin-bottom: 1.5rem;
	color: #444;
}

.qm-quiz__questions {
	list-style: none;
	margin: 0;
	padding: 0;
}

.qm-question {
	margin: 0 0 1.75rem;
	padding: 1.25rem;
	border: 1px solid #e2e6ea;
	border-radius: 10px;
	background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.qm-question--correct {
	border-color: #1a7f37;
	box-shadow: 0 0 0 1px rgba(26, 127, 55, .25);
}

.qm-question--incorrect {
	border-color: #b32d2e;
	box-shadow: 0 0 0 1px rgba(179, 45, 46, .25);
}

.qm-question__prompt {
	font-weight: 600;
	margin-bottom: .5rem;
}

.qm-question__number {
	color: #6b7280;
	margin-right: .35rem;
}

.qm-question__help {
	margin: 0 0 .75rem;
	color: #6b7280;
	font-size: .9rem;
}

.qm-question__options {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .5rem;
}

.qm-option label {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .6rem .75rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.qm-option label:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
}

.qm-option input[type="radio"] {
	flex: 0 0 auto;
}

.qm-quiz__actions {
	margin-top: 1rem;
}

.qm-btn {
	display: inline-block;
	padding: .7rem 1.4rem;
	border: 0;
	border-radius: 8px;
	background: #2271b1;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
}

.qm-btn:hover {
	background: #135e96;
}

.qm-btn:disabled {
	opacity: .6;
	cursor: default;
}

.qm-quiz__status {
	margin-top: .75rem;
	font-style: italic;
	color: #6b7280;
}

/* Results */
.qm-quiz__results {
	margin-top: 1.5rem;
}

.qm-results__heading {
	margin: 0 0 .5rem;
}

.qm-results__score {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0 0 .75rem;
}

.qm-results__percent {
	color: #6b7280;
	font-size: 1rem;
	font-weight: 500;
}

.qm-results__badge {
	display: inline-block;
	padding: .25rem .7rem;
	border-radius: 999px;
	font-size: .85rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

.qm-results__badge--pass {
	background: #d1f0d8;
	color: #1a7f37;
}

.qm-results__badge--fail {
	background: #fbd5d5;
	color: #b32d2e;
}

.qm-results__review {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .75rem;
}

.qm-review {
	padding: 1rem;
	border-radius: 8px;
	border-left: 4px solid transparent;
	background: #f8fafc;
}

.qm-review--correct {
	border-left-color: #1a7f37;
}

.qm-review--incorrect {
	border-left-color: #b32d2e;
}

.qm-review__prompt {
	font-weight: 600;
	margin: 0 0 .4rem;
}

.qm-review__line {
	margin: .15rem 0;
	font-size: .95rem;
}

.qm-review__tag {
	color: #6b7280;
}

.qm-review__status {
	display: inline-block;
	margin-top: .4rem;
	font-weight: 600;
	font-size: .85rem;
}

.qm-review--correct .qm-review__status {
	color: #1a7f37;
}

.qm-review--incorrect .qm-review__status {
	color: #b32d2e;
}

.qm-results__actions {
	margin-top: 1.25rem;
}

.qm-btn--retry {
	background: #50575e;
}

.qm-btn--retry:hover {
	background: #3c4146;
}

.qm-error {
	color: #b32d2e;
	background: #fbeaea;
	padding: .75rem 1rem;
	border-radius: 8px;
}
