/**
 * EduCrystal Assessment Engine - Result & Review Styles
 *
 * @package EduCrystal_Assessment_Engine
 */

:root {
	--ec-res-primary: #2563eb;
	--ec-res-success: #10b981;
	--ec-res-danger: #ef4444;
	--ec-res-warning: #f59e0b;
	--ec-res-bg: #f8fafc;
	--ec-res-card: #ffffff;
	--ec-res-border: #e2e8f0;
	--ec-res-text: #0f172a;
	--ec-res-muted: #64748b;
	--ec-res-radius: 12px;
	--ec-res-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.ec-result-container {
	max-width: 960px;
	margin: 30px auto;
	padding: 0 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--ec-res-text);
}

/* Hero Scorecard */
.ec-scorecard-card {
	background: var(--ec-res-card);
	border: 1px solid var(--ec-res-border);
	border-radius: var(--ec-res-radius);
	padding: 40px 32px;
	text-align: center;
	box-shadow: var(--ec-res-shadow);
	margin-bottom: 30px;
	position: relative;
	overflow: hidden;
}

.ec-scorecard-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 6px;
}

.ec-scorecard-passed::before { background: linear-gradient(90deg, #10b981, #059669); }
.ec-scorecard-failed::before { background: linear-gradient(90deg, #ef4444, #dc2626); }

.ec-result-icon {
	font-size: 56px;
	margin-bottom: 12px;
}

.ec-result-title {
	font-size: 26px;
	font-weight: 800;
	margin: 0 0 6px 0;
}

.ec-result-subtitle {
	font-size: 15px;
	color: var(--ec-res-muted);
	margin: 0 0 28px 0;
}

/* Score Circle */
.ec-score-circle {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	border: 8px solid #eff6ff;
	margin-bottom: 24px;
}

.ec-scorecard-passed .ec-score-circle { border-color: #ecfdf5; }
.ec-scorecard-failed .ec-score-circle { border-color: #fef2f2; }

.ec-score-number {
	font-size: 38px;
	font-weight: 900;
	line-height: 1;
	color: #0f172a;
}

.ec-score-max {
	font-size: 14px;
	color: var(--ec-res-muted);
	font-weight: 600;
	margin-top: 4px;
}

.ec-status-badge-lg {
	display: inline-block;
	padding: 6px 20px;
	border-radius: 20px;
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 30px;
}

.ec-badge-pass { background: #dcfce7; color: #15803d; }
.ec-badge-fail { background: #fee2e2; color: #b91c1c; }

/* Metrics Grid */
.ec-metrics-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	padding: 24px 0;
	border-top: 1px solid var(--ec-res-border);
	border-bottom: 1px solid var(--ec-res-border);
	margin-bottom: 28px;
}

@media (max-width: 640px) {
	.ec-metrics-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.ec-metric-item strong {
	display: block;
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
}

.ec-metric-item span {
	font-size: 13px;
	color: var(--ec-res-muted);
	font-weight: 500;
}

/* Actions */
.ec-result-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* Review Section */
.ec-review-section {
	margin-top: 40px;
}

.ec-review-heading {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 20px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ec-review-card {
	background: var(--ec-res-card);
	border: 1px solid var(--ec-res-border);
	border-radius: var(--ec-res-radius);
	padding: 24px;
	margin-bottom: 20px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.ec-review-card.ec-card-correct { border-left: 5px solid var(--ec-res-success); }
.ec-review-card.ec-card-wrong { border-left: 5px solid var(--ec-res-danger); }
.ec-review-card.ec-card-unanswered { border-left: 5px solid #94a3b8; }

.ec-review-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.ec-review-qno {
	font-weight: 700;
	font-size: 15px;
	color: #334155;
}

.ec-review-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 20px 0;
}

.ec-review-opt {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	border-radius: 8px;
	border: 1px solid var(--ec-res-border);
	font-size: 14px;
}

.ec-review-opt.ec-opt-correct {
	background: #ecfdf5;
	border-color: #6ee7b7;
	color: #065f46;
	font-weight: 600;
}

.ec-review-opt.ec-opt-user-wrong {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #991b1b;
	font-weight: 600;
}

.ec-explanation-box {
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	padding: 16px;
	margin-top: 16px;
	font-size: 14px;
	line-height: 1.6;
}

.ec-explanation-title {
	font-weight: 700;
	margin: 0 0 6px 0;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Assessment Set Badges */
.ec-set-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}
.ec-set-badge-1 {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}
.ec-set-badge-2 {
	background: #fdf4ff;
	color: #a21caf;
	border: 1px solid #f5d0fe;
}
.ec-set-badge-3 {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}
