/* ==========================================================================
   Ashbar Exams — Simulation styles
   (loaded only on the simulation page, on top of frontend.css)
   ========================================================================== */

.ashbar-exams-sim {
	max-width: 900px;
	margin: 0 auto;
	position: relative;
}

.ashbar-exams-sim-title {
	margin: 0 0 1em 0;
	font-size: 1.8em;
	line-height: 1.3;
	color: #1d2327;
}

.ashbar-exams-sim-screen-heading {
	margin: 0 0 0.75em 0;
	font-size: 1.3em;
}

/* --- Screen 1: timer choice ------------------------------------------- */
.ashbar-exams-sim-choices {
	display: flex;
	gap: 1em;
	margin-top: 1em;
}

.ashbar-exams-sim-choice {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5em;
	text-align: center;
	padding: 1.5em;
	background: #1d3a6e;
	border: 2px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.05s ease;
	font: inherit;
	color: #fff;
}

.ashbar-exams-sim-choice:hover,
.ashbar-exams-sim-choice:focus {
	background: #000 !important;
	border-color: #2271b1;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	outline: none;
}

.ashbar-exams-sim-choice:active {
	transform: translateY(1px);
}

.ashbar-exams-sim-choice-title {
	font-size: 1.15em;
	font-weight: 700;
	color: #fff;
}

.ashbar-exams-sim-choice-desc {
	font-size: 0.95em;
	line-height: 1.5;
	color: #fff;
}

@media (max-width: 600px) {
	.ashbar-exams-sim-choices {
		flex-direction: column;
	}
}

/* --- Screen 2: materials prep ----------------------------------------- */
.ashbar-exams-sim-screen-materials {
	padding: 1.5em;
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	border-radius: 8px;
}

.ashbar-exams-sim-materials-intro {
	margin-top: 0;
	line-height: 1.6;
}

.ashbar-exams-sim-materials-desc {
	margin: 1em 0 1.5em 0;
	padding: 1em 1.25em;
	background: #fff;
	border-radius: 6px;
	border: 1px solid #dcdcde;
	line-height: 1.6;
}

.ashbar-exams-sim-materials-desc p:last-child {
	margin-bottom: 0;
}

.ashbar-exams-sim-start {
	display: block;
	width: -moz-fit-content;
	width: fit-content;
	max-width: 100%;
	margin: 0.5em auto 0;
}

/* --- Screen 3: the exam ----------------------------------------------- */

/* Floating timer (HH:MM). Sits just below the site's sticky header, hugging
   the left where there's free space. If it ever overlaps the header on a
   given theme, bump `top`; to drop floating entirely, switch position to
   static and remove top/left. */
.ashbar-exams-sim-timer {
	position: fixed;
	top: 150px;
	left: 24px;
	z-index: 9999;
	padding: 0.55em 1.4em;
	background: #135e96;
	color: #fff;
	font-weight: 700;
	font-size: 1.05em;
	border-radius: 999px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	white-space: nowrap;
	pointer-events: none;
}

.ashbar-exams-sim-timer.is-up {
	background: #b32d2e;
}

@media (max-width: 600px) {
	.ashbar-exams-sim-timer {
		top: 105px;
		left: 12px;
		font-size: 0.95em;
		padding: 0.45em 1.1em;
	}
}

/* Answer fields (practice mode). */
.ashbar-exams-answer-wrap {
	margin-top: 1em;
}

.ashbar-exams-sim-answer-text {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75em;
	font: inherit;
	line-height: 1.6;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	resize: vertical;
}

.ashbar-exams-sim-answer-text:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Selectable multiple-choice options (practice). */
.ashbar-exams-options-practice {
	list-style: none;
	margin: 1em 0 0 0;
	padding: 0;
}

.ashbar-exams-option-practice {
	margin-bottom: 0.5em;
}

.ashbar-exams-option-label {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	padding: 0.6em 0.8em;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.ashbar-exams-option-label:hover {
	border-color: #2271b1;
	background: #f6fafe;
}

.ashbar-exams-option-practice input[type="radio"] {
	margin-top: 0.25em;
	flex: 0 0 auto;
}

.ashbar-exams-option-text {
	flex: 1 1 auto;
}

/* Time-up state: visually dim the answer fields. */
.ashbar-exams-sim-answer.is-timeup,
.ashbar-exams-sim-is-timeup .ashbar-exams-option-label {
	background: #f0f0f1;
	color: #646970;
	cursor: not-allowed;
}

.ashbar-exams-sim-answer-text.is-timeup {
	border-color: #c3c4c7;
}

/* Finish button. */
.ashbar-exams-sim-finish-wrap {
	margin-top: 2em;
	text-align: center;
}

.ashbar-exams-sim-submit {
	font-size: 1.1em;
	padding: 0.85em 2.5em;
	background-color: #00733b;
}

.ashbar-exams-sim-submit:hover:not(:disabled) {
	background-color: #005c2f;
	color: #fff;
}

/* Payment form lives inside the (centered) finish wrap. Reset the inner text
   to right-aligned RTL, and CENTER the box itself. The descendant selector
   (.ashbar-exams-sim scope) outranks payment.css's `.ashbar-exams-payment
   { margin: 1.5em 0 }`, which would otherwise pin the box to the right. */
.ashbar-exams-sim .ashbar-exams-sim-payment {
	text-align: right;
	direction: rtl;
	margin: 1.5em auto;
}

/* Time-up notice (toast). */
.ashbar-exams-sim-timeup-notice {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	z-index: 10000;
	max-width: 90%;
	padding: 0.9em 1.4em;
	background: #b32d2e;
	color: #fff;
	border-radius: 6px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	line-height: 1.5;
	opacity: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ashbar-exams-sim-timeup-notice.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
 * Checking / result screen (after "I'm done").
 * ========================================================================== */
.ashbar-exams-sim-screen-checking {
	text-align: center;
	padding: 2em 1em;
}

.ashbar-exams-sim-spinner {
	width: 48px;
	height: 48px;
	margin: 0 auto 1.2em;
	border: 4px solid #dcdcde;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: ashbar-exams-spin 0.9s linear infinite;
}

@keyframes ashbar-exams-spin {
	to { transform: rotate(360deg); }
}

.ashbar-exams-sim-progress {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0.5em 0;
}

.ashbar-exams-sim-checking-note {
	color: #646970;
	margin-top: 0.75em;
}

.ashbar-exams-sim-grade {
	font-size: 1.6em;
	font-weight: 700;
	margin: 0.75em 0 1em;
}

.ashbar-exams-sim-check-error {
	max-width: 36em;
	margin: 1em auto;
	padding: 0.9em 1.2em;
	background: #fcf0f1;
	border: 1px solid #b32d2e;
	border-radius: 6px;
	color: #b32d2e;
	line-height: 1.5;
}
