/**
 * Mock tests — student UI + homepage cards
 */

.p99-section--mock-tests {
	background: var(--p99-bg-soft);
}

.p99-mock-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.p99-mock-card {
	background: var(--p99-bg);
	border: 1px solid var(--p99-border);
	border-radius: var(--p99-radius);
	overflow: hidden;
	box-shadow: var(--p99-shadow);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.p99-mock-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 40px rgba(43, 91, 174, 0.12);
}

.p99-mock-card__thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef2f7;
}

.p99-mock-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.p99-mock-card__thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--p99-blue) 0%, #1e4080 100%);
}

.p99-mock-card__placeholder-label {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.p99-mock-card__body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.75rem;
}

.p99-mock-card__title {
	margin: 0;
	font-size: 1.125rem;
	color: var(--p99-text);
}

.p99-mock-card__desc {
	margin: 0;
	font-size: 0.875rem;
	color: var(--p99-text-muted);
	line-height: 1.6;
}

.p99-mock-card__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: 0.8125rem;
	color: var(--p99-blue);
	font-weight: 500;
}

.p99-mock-card__meta li::before {
	content: "• ";
	opacity: 0.5;
}

.p99-mock-card__meta li:first-child::before {
	content: "";
}

.p99-container--narrow {
	max-width: 760px;
}

.p99-mock-test-page {
	padding-top: 1.5rem;
}

/* Quiz app */
.p99-mock-test-app {
	direction: rtl;
}

.p99-mock-error,
.p99-mock-loading {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--p99-text-muted);
}

.p99-mock-error {
	color: #b91c1c;
	background: #fef2f2;
	border-radius: var(--p99-radius-sm);
}

.p99-mock-start {
	text-align: center;
	padding: 2rem 1rem;
	background: var(--p99-bg);
	border: 1px solid var(--p99-border);
	border-radius: var(--p99-radius);
	box-shadow: var(--p99-shadow);
}

.p99-mock-start h2 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
}

.p99-mock-start > p {
	color: var(--p99-text-muted);
	margin-bottom: 1.5rem;
}

.p99-mock-start-meta {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	margin-bottom: 2rem;
	font-size: 0.9375rem;
	color: var(--p99-text-muted);
}

.p99-mock-quiz-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.p99-mock-quiz-progress {
	font-size: 0.875rem;
	color: var(--p99-text-muted);
	font-weight: 600;
}

.p99-mock-timer {
	font-size: 0.875rem;
	font-weight: 700;
	background: var(--p99-bg-soft);
	padding: 0.35rem 0.75rem;
	border-radius: var(--p99-radius-sm);
}

.p99-mock-timer.is-warning {
	color: #b91c1c;
	background: #fef2f2;
}

.p99-mock-progress-bar {
	height: 6px;
	background: var(--p99-border);
	border-radius: 3px;
	margin-bottom: 1.25rem;
	overflow: hidden;
}

.p99-mock-progress-fill {
	height: 100%;
	background: var(--p99-blue);
	transition: width 0.3s ease;
}

.p99-mock-question-image {
	text-align: center;
	margin-bottom: 1.5rem;
	background: var(--p99-bg);
	border: 1px solid var(--p99-border);
	border-radius: var(--p99-radius);
	padding: 1rem;
}

.p99-mock-question-image img {
	max-width: 100%;
	height: auto;
	border-radius: var(--p99-radius-sm);
	margin-inline: auto;
}

.p99-mock-options {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.p99-mock-option {
	width: 64px;
	height: 64px;
	border: 2px solid var(--p99-border);
	border-radius: 50%;
	background: var(--p99-bg);
	font-size: 1.35rem;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	color: var(--p99-text);
	transition: all 0.15s ease;
}

.p99-mock-option:hover {
	border-color: var(--p99-blue);
	color: var(--p99-blue);
}

.p99-mock-option.is-selected {
	background: var(--p99-blue);
	border-color: var(--p99-blue);
	color: #fff;
}

.p99-mock-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.p99-mock-nav .p99-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.p99-mock-results {
	text-align: center;
	padding: 2rem 1rem;
	background: var(--p99-bg);
	border: 1px solid var(--p99-border);
	border-radius: var(--p99-radius);
	box-shadow: var(--p99-shadow);
}

.p99-mock-results h2 {
	margin-top: 0;
}

.p99-mock-score-circle {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: var(--p99-blue);
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.5rem;
}

.p99-mock-score-circle .score-num {
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
}

.p99-mock-score-circle .score-label {
	font-size: 0.875rem;
	opacity: 0.9;
}

.p99-mock-results-summary {
	color: var(--p99-text-muted);
	margin-bottom: 1.5rem;
}

.p99-mock-review-list {
	text-align: right;
	max-height: 360px;
	overflow-y: auto;
	border: 1px solid var(--p99-border);
	border-radius: var(--p99-radius-sm);
	padding: 0.5rem;
	margin-bottom: 1.5rem;
}

.p99-mock-review-item {
	display: flex;
	justify-content: space-between;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--p99-bg-soft);
	font-size: 0.875rem;
}

.p99-mock-review-item:last-child {
	border-bottom: none;
}

.p99-mock-review-item.is-correct {
	color: #15803d;
}

.p99-mock-review-item.is-wrong {
	color: #b91c1c;
}

.p99-mock-review-item.is-skipped {
	color: var(--p99-text-muted);
}

@media (max-width: 600px) {
	.p99-mock-option {
		width: 52px;
		height: 52px;
		font-size: 1.15rem;
	}
}
