/**
 * Frontend styles for Exam by EK Mindset.
 */

.ekm-exam-page,
.ekm-exam-page * {
	box-sizing: border-box;
}

.ekm-exam-page {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 36px 18px;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #111827;
}

/* Start Page */

.ekm-start-page {
	display: flex;
	justify-content: center;
	align-items: center;
}

.ekm-start-card {
	width: 100%;
	max-width: 1120px;
	background: #ffffff;
	border-radius: 22px;
	padding: 48px 46px;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
	border: 1px solid rgba(226, 232, 240, 0.9);
}

.ekm-start-icon {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: #eaf2ff;
	color: #0074ff;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
}

.ekm-start-card h2 {
	margin: 0;
	text-align: center;
	font-size: 42px;
	line-height: 1.15;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -0.04em;
}

.ekm-start-subtitle {
	margin: 10px 0 36px;
	text-align: center;
	color: #64748b;
	font-size: 18px;
}

.ekm-start-form {
	width: 100%;
}

.ekm-form-group {
	margin-bottom: 24px;
}

.ekm-form-group label {
	display: block;
	margin-bottom: 10px;
	font-size: 16px;
	font-weight: 700;
	color: #172033;
}

.ekm-input-wrap {
	position: relative;
}

.ekm-input-icon {
	position: absolute;
	left: 22px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.ekm-input-wrap input {
	width: 100%;
	height: 64px;
	border-radius: 10px;
	border: 1px solid #cfd8e3;
	background: #ffffff;
	padding: 0 18px 0 58px;
	font-size: 16px;
	color: #0f172a;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ekm-input-wrap input::placeholder {
	color: #8a97ad;
}

.ekm-input-wrap input:focus {
	border-color: #0074ff;
	box-shadow: 0 0 0 4px rgba(0, 116, 255, 0.12);
}

.ekm-start-button {
	width: 100%;
	min-height: 64px;
	margin-top: 14px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, #0077ff, #0067ff);
	color: #ffffff;
	font-size: 19px;
	font-weight: 800;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	box-shadow: 0 12px 28px rgba(0, 103, 255, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ekm-start-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 16px 34px rgba(0, 103, 255, 0.28);
	filter: brightness(1.02);
}

.ekm-start-button:active {
	transform: translateY(0);
}

/* Alerts */

.ekm-alert {
	margin: 0 0 24px;
	padding: 14px 16px;
	border-radius: 12px;
	font-size: 15px;
}

.ekm-alert p {
	margin: 0;
}

.ekm-alert p + p {
	margin-top: 6px;
}

.ekm-alert-error {
	background: #fff1f2;
	color: #be123c;
	border: 1px solid #fecdd3;
}

/* Quiz Page */

.ekm-quiz-card,
.ekm-result-card {
	background: #ffffff;
	border-radius: 24px;
	border: 1px solid rgba(226, 232, 240, 0.9);
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
	padding: 34px;
}

.ekm-quiz-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 20px;
}

.ekm-eyebrow {
	margin: 0 0 6px;
	color: #0074ff;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.ekm-quiz-header h2 {
	margin: 0;
	font-size: 32px;
	line-height: 1.2;
	font-weight: 850;
	color: #0f172a;
	letter-spacing: -0.03em;
}

.ekm-timer {
	min-width: 128px;
	height: 46px;
	padding: 0 16px;
	border-radius: 999px;
	background: #eff6ff;
	color: #005ee6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 850;
	font-size: 15px;
	white-space: nowrap;
	border: 1px solid #dbeafe;
}

.ekm-timer.is-danger {
	background: #fff1f2;
	color: #be123c;
	border-color: #fecdd3;
	animation: ekm-pulse 1s infinite;
}

@keyframes ekm-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.2);
	}

	70% {
		box-shadow: 0 0 0 8px rgba(225, 29, 72, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
	}
}

.ekm-student-strip {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.ekm-student-strip span {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	padding: 9px 14px;
	color: #475569;
	font-size: 14px;
}

.ekm-student-strip strong {
	color: #0f172a;
}

.ekm-progress-wrap {
	margin-bottom: 28px;
}

.ekm-progress-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	color: #64748b;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 10px;
}

.ekm-progress-bar {
	width: 100%;
	height: 10px;
	background: #eaf0f8;
	border-radius: 999px;
	overflow: hidden;
}

.ekm-progress-bar span {
	display: block;
	height: 100%;
	background: linear-gradient(135deg, #0077ff, #00a3ff);
	border-radius: inherit;
	transition: width 0.25s ease;
}

.ekm-timeup-notice {
	margin-bottom: 20px;
	padding: 14px 16px;
	border-radius: 14px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #c2410c;
	font-weight: 700;
}

.ekm-question-slide {
	display: block;
}

.ekm-js-enabled .ekm-question-slide {
	display: none;
}

.ekm-js-enabled .ekm-question-slide.is-active {
	display: block;
}

.ekm-question-number {
	display: inline-flex;
	align-items: center;
	height: 34px;
	padding: 0 12px;
	border-radius: 999px;
	background: #eef6ff;
	color: #0067ff;
	font-size: 13px;
	font-weight: 850;
	margin-bottom: 18px;
}

.ekm-question-title {
	margin: 0 0 24px;
	font-size: 26px;
	line-height: 1.35;
	font-weight: 800;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.ekm-options {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

.ekm-option-card {
	position: relative;
	min-height: 62px;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border-radius: 16px;
	border: 1px solid #dbe3ef;
	background: #ffffff;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ekm-option-card:hover {
	border-color: #9ec5ff;
	background: #fbfdff;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ekm-option-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ekm-option-marker {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #475569;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 850;
	flex: 0 0 auto;
	transition: background 0.2s ease, color 0.2s ease;
}

.ekm-option-text {
	color: #172033;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.45;
}

.ekm-option-input:checked ~ .ekm-option-marker {
	background: #0074ff;
	color: #ffffff;
}

.ekm-option-input:checked ~ .ekm-option-text {
	color: #0f172a;
}

.ekm-option-card:has(.ekm-option-input:checked) {
	border-color: #0074ff;
	background: #f4f9ff;
	box-shadow: 0 12px 30px rgba(0, 116, 255, 0.12);
}

.ekm-quiz-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-top: 30px;
	padding-top: 24px;
	border-top: 1px solid #e2e8f0;
}

.ekm-footer-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ekm-submit-hint {
	font-size: 14px;
	color: #64748b;
	font-weight: 700;
}

.ekm-nav-button {
	min-height: 48px;
	padding: 0 20px;
	border-radius: 12px;
	border: 0;
	cursor: pointer;
	font-size: 15px;
	font-weight: 850;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ekm-nav-button:hover:not(:disabled) {
	transform: translateY(-1px);
}

.ekm-nav-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ekm-secondary-button {
	background: #f1f5f9;
	color: #334155;
}

.ekm-primary-button {
	background: #0074ff;
	color: #ffffff;
	box-shadow: 0 10px 24px rgba(0, 116, 255, 0.2);
}

.ekm-submit-button {
	background: linear-gradient(135deg, #16a34a, #22c55e);
	color: #ffffff;
	box-shadow: 0 10px 24px rgba(34, 197, 94, 0.22);
}

.ekm-submit-button[hidden],
.ekm-primary-button[hidden],
.ekm-secondary-button[hidden],
.ekm-submit-hint[hidden] {
	display: none !important;
}

/* Result */

.ekm-result-page {
	display: flex;
	justify-content: center;
}

.ekm-result-card {
	width: 100%;
	max-width: 760px;
	text-align: center;
}

.ekm-result-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #dcfce7;
	color: #16a34a;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	font-weight: 900;
	margin: 0 auto 18px;
}

.ekm-result-card h2 {
	margin: 0 0 24px;
	font-size: 34px;
	font-weight: 850;
	color: #0f172a;
	letter-spacing: -0.03em;
}

.ekm-result-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	text-align: left;
	margin-bottom: 18px;
}

.ekm-result-grid div,
.ekm-score-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 16px;
}

.ekm-result-grid span,
.ekm-score-box span {
	display: block;
	color: #64748b;
	font-size: 13px;
	font-weight: 800;
	margin-bottom: 5px;
}

.ekm-result-grid strong {
	color: #0f172a;
	font-size: 17px;
	font-weight: 850;
}

.ekm-score-box {
	background: #eff6ff;
	border-color: #dbeafe;
}

.ekm-score-box strong {
	display: block;
	font-size: 42px;
	line-height: 1;
	color: #0074ff;
	font-weight: 900;
}

/* Responsive */

@media (max-width: 782px) {
	.ekm-exam-page {
		padding: 22px 12px;
	}

	.ekm-start-card,
	.ekm-quiz-card,
	.ekm-result-card {
		padding: 26px 20px;
		border-radius: 18px;
	}

	.ekm-start-card h2 {
		font-size: 34px;
	}

	.ekm-start-subtitle {
		font-size: 16px;
	}

	.ekm-input-wrap input {
		height: 58px;
	}

	.ekm-start-button {
		min-height: 58px;
	}

	.ekm-quiz-header {
		flex-direction: column;
		align-items: stretch;
	}

	.ekm-timer {
		width: 100%;
	}

	.ekm-question-title {
		font-size: 22px;
	}

	.ekm-quiz-footer {
		flex-direction: column;
		align-items: stretch;
	}

	.ekm-footer-actions {
		width: 100%;
		flex-direction: column;
	}

	.ekm-nav-button {
		width: 100%;
	}

	.ekm-submit-hint {
		text-align: center;
	}

	.ekm-result-grid {
		grid-template-columns: 1fr;
	}
}