/* Skill Certify Pro — Exam Flow Styles
   Covers: Pre-exam, Exam Runner, Result (Pass/Fail)
   Namespace: scer- (exam runner), scre- (result)
   Version: 1.0
*/

/* ========================================
   PRE-EXAM STYLES (pre- namespace)
   ======================================== */

.scp-exam-heading {
	max-width: 680px;
	margin: 0 auto 16px;
	padding: 0 4px;
	padding-top: calc(var(--header-height, 80px) + 24px);
}

/* Admin bar offset */
body.admin-bar .scp-exam-heading {
	padding-top: calc(var(--header-height, 80px) + 32px + 24px);
}

/* Mobile admin bar */
@media (max-width: 782px) {
	body.admin-bar .scp-exam-heading {
		padding-top: calc(var(--header-height, 80px) + 46px + 24px);
	}
}

.scp-exam-h1 {
	font-size: 22px;
	font-weight: 500;
	color: #0F2744;
	line-height: 1.3;
	margin-bottom: 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width: 480px) {
	.scp-exam-h1 {
		white-space: normal;
	}
}

.scp-exam-h1-sub {
	font-size: 14px;
	color: #6B7280;
	line-height: 1.5;
}

@media (max-width: 480px) {
	.scp-exam-heading {
		text-align: center;
		padding: calc(var(--header-height, 80px) + 16px) 20px 16px;
	}
	.scp-exam-h1 { font-size: 18px; }
	.scp-exam-h1-sub { font-size: 13px; }
}

.pre-hero {
	background: #0F2744;
	padding: 24px 20px 20px;
	text-align: center;
}

.pre-badge {
	display: inline-flex;
	background: rgba(27,143,175,0.25);
	border: 0.5px solid rgba(42,171,207,0.4);
	border-radius: 20px;
	padding: 4px 12px;
	font-size: 11px;
	font-weight: 500;
	color: #2AABCF;
	margin-bottom: 14px;
}

.pre-title {
	font-size: 20px;
	font-weight: 500;
	color: #fff;
	margin-bottom: 4px;
}

.pre-sub {
	font-size: 13px;
	color: rgba(255,255,255,0.6);
}

.pre-stats {
	display: grid;
	grid-template-columns: repeat(3,1fr);
	border-bottom: 0.5px solid #E5E7EB;
}

.pre-stat {
	padding: 12px 8px;
	text-align: center;
	border-right: 0.5px solid #E5E7EB;
}

.pre-stat:last-child {
	border-right: none;
}

.pre-stat-val {
	display: block;
	font-size: 15px;
	font-weight: 500;
	color: #0F2744;
}

.pre-stat-lbl {
	display: block;
	font-size: 10px;
	color: #6B7280;
	margin-top: 2px;
}

.pre-body {
	padding: 16px;
}

.pre-info-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 0.5px solid #F3F4F6;
	font-size: 13px;
}

.pre-info-row:last-of-type {
	border-bottom: none;
}

.pre-info-lbl {
	color: #6B7280;
}

.pre-info-val {
	color: #0F2744;
	font-weight: 500;
}

.tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 500;
}

.tag-hard {
	background: #FEF3C7;
	color: #92400E;
}

.tag-medium {
	background: #DBEAFE;
	color: #1e40af;
}

.tag-easy {
	background: #DCFCE7;
	color: #15803D;
}

.tag-pass {
	background: #DCFCE7;
	color: #15803D;
}

.btn-start {
	width: 100%;
	margin-top: 14px;
	padding: 13px;
	border-radius: 10px;
	border: none;
	background: #1B8FAF;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
}

.practice-row {
	text-align: center;
	margin-top: 10px;
	font-size: 12px;
	color: #6B7280;
}

.practice-row a {
	color: #1B8FAF;
	text-decoration: none;
	font-weight: 500;
}

/* ========================================
   DASHBOARD CARD (Exam Flow Version)
   ======================================== */

.scp-dashboard-card {
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
	background: var(--scp-color-bg-white);
	border-radius: 16px;
	box-shadow: 
		0 1px 3px rgba(15, 39, 68, 0.08),
		0 4px 12px rgba(15, 39, 68, 0.05);
	overflow: hidden;
	transition: box-shadow 0.3s ease;
	border: 1px solid var(--scp-color-border);
}

.scp-dashboard-card:hover {
	box-shadow: 
		0 4px 6px rgba(15, 39, 68, 0.08),
		0 8px 24px rgba(15, 39, 68, 0.12);
}

.scp-dashboard-card-header {
	padding: 24px 24px 20px;
	border-bottom: 1px solid var(--scp-color-border);
}

.scp-dashboard-card-top-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 12px;
}

.scp-dashboard-card-badge {
	display: inline-flex;
	align-items: center;
	background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
	color: #15803d;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.3px;
	border: 1px solid #86efac;
}

.scp-dashboard-card-badge::before {
	content: '';
	width: 6px;
	height: 6px;
	background: #15803d;
	border-radius: 50%;
	margin-right: 8px;
}

.scp-dashboard-card-title {
	font-size: 22px;
	font-weight: 600;
	color: var(--scp-color-navy);
	line-height: 1.3;
	font-family: 'Sora', sans-serif;
	margin: 0;
}

.scp-dashboard-card-category {
	font-size: 14px;
	color: var(--scp-color-text-tertiary);
	font-weight: 500;
	margin: 4px 0 0 0;
}

.scp-dashboard-card-body {
	padding: 24px;
}

.scp-dashboard-info-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--scp-color-bg-100);
}

.scp-dashboard-info-row:last-child {
	border-bottom: none;
}

.scp-dashboard-info-label {
	font-size: 13px;
	color: var(--scp-color-text-tertiary);
	font-weight: 500;
}

.scp-dashboard-info-value {
	font-size: 14px;
	color: var(--scp-color-navy);
	font-weight: 600;
}

.scp-dashboard-difficulty-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
}

.scp-dashboard-difficulty-easy {
	background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
	color: #15803d;
	border: 1px solid #86efac;
}

.scp-dashboard-difficulty-medium {
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	color: #b45309;
	border: 1px solid #fcd34d;
}

.scp-dashboard-difficulty-hard {
	background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
	color: #b91c1c;
	border: 1px solid #fca5a5;
}

.scp-dashboard-card-footer {
	padding: 20px 24px 24px;
	background: var(--scp-color-bg-50);
	border-top: 1px solid var(--scp-color-border);
}

.scp-dashboard-cta-button {
	width: 100%;
	padding: 14px 24px;
	background: linear-gradient(135deg, var(--scp-color-teal) 0%, var(--scp-color-teal-light) 100%);
	border: none;
	border-radius: 8px;
	color: var(--scp-color-text-white);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(27, 143, 175, 0.3);
}

.scp-dashboard-cta-button:hover {
	background: linear-gradient(135deg, var(--scp-color-navy) 0%, var(--scp-color-navy-light) 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(15, 39, 68, 0.3);
}

.scp-dashboard-cta-button:active {
	transform: translateY(0);
}

/* ========================================
   EXAM RUNNER STYLES (scer namespace)
   ======================================== */

/* Intentional: restores card styling inside exam runner
   Overrides pages.css transparent styling for pre-exam wrapper */
.scp-card,
.scp-exam-main .scp-card {
	background: #fff;
	border-radius: 16px;
	border: 0.5px solid #E5E7EB;
	overflow: hidden;
}

.scer-top-bar {
	background: #0F2744;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.scer-timer {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
}

.scer-timer-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #F5A623;
	flex-shrink: 0;
}

.scer-counter {
	font-size: 12px;
	color: rgba(255,255,255,0.65);
}

.scer-progress {
	height: 4px;
	background: rgba(255,255,255,0.15);
}

.scer-progress-fill {
	height: 4px;
	background: #F5A623;
	transition: width 0.3s ease;
}

.scer-body {
	padding: 20px 16px 16px;
}

.scer-q-label {
	font-size: 11px;
	color: #6B7280;
	font-weight: 500;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	display: block;
}

.scer-q-title {
	font-size: 16px;
	font-weight: 500;
	color: #111827;
	line-height: 1.5;
	margin-bottom: 16px;
	border-left: none;
	padding-left: 0;
}

.scer-option {
	width: 100%;
	max-width: 100%;
	text-align: left;
	padding: 11px 14px;
	border-radius: 10px;
	border: 0.5px solid #E5E7EB;
	background: #fff;
	font-size: 14px;
	color: #374151;
	margin-bottom: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: inherit;
	box-sizing: border-box;
}

.scer-option:hover {
	border-color: #D1D5DB;
	background: #F9FAFB;
}

.scer-option.selected {
	border-color: #1B8FAF;
	background: #EFF9FC;
	color: #0F2744;
}

.scer-opt-letter {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 0.5px solid #D1D5DB;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 500;
	color: #6B7280;
	flex-shrink: 0;
	background: #fff;
}

.scer-option.selected .scer-opt-letter {
	background: #1B8FAF;
	border-color: #1B8FAF;
	color: #fff;
}

.scer-opt-text {
	flex: 1;
	line-height: 1.4;
}

.scer-option:last-of-type {
	margin-bottom: 0;
}

.scer-btn-next {
	width: 100%;
	padding: 12px;
	border-radius: 10px;
	border: none;
	background: #0F2744;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	margin: 16px 0px;
	font-family: inherit;
	display: block;
}

.scer-btn-next:hover {
	background: #1a3a5e;
}

.scer-btn-submit {
	width: 100%;
	padding: 12px;
	border-radius: 10px;
	border: none;
	background: #1B8FAF;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	margin: 16px 0px;
	font-family: inherit;
	display: block;
}

.scer-btn-submit:hover {
	background: #157a94;
}

/* ========================================
   RESULT PAGE STYLES (scre namespace)
   ======================================== */

.scre-card {
	background: #fff;
	border-radius: 16px;
	border: 0.5px solid #E5E7EB;
	overflow: hidden;
	max-width: 480px;
	margin: 24px auto;
	width: 100%;
}

@media (max-width: 480px) {
	.scre-card {
		margin: 12px auto;
	}
}

.scre-hero-pass {
	background: #0F6E56;
	padding: 28px 20px 24px;
	text-align: center;
}

.scre-hero-fail {
	background: #0F2744;
	padding: 28px 20px 24px;
	text-align: center;
}

.scre-ring {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	border: 2.5px solid rgba(255,255,255,0.3);
	background: rgba(255,255,255,0.12);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0 auto 14px;
}

.scre-score {
	font-size: 26px;
	font-weight: 500;
	color: #fff;
	line-height: 1;
}

.scre-pct {
	font-size: 11px;
	color: rgba(255,255,255,0.7);
	margin-top: 2px;
}

.scre-badge-pass {
	display: inline-flex;
	align-items: center;
	background: rgba(255,255,255,0.2);
	border: 0.5px solid rgba(255,255,255,0.35);
	border-radius: 20px;
	padding: 4px 14px;
	font-size: 12px;
	font-weight: 500;
	color: #fff;
	margin-bottom: 10px;
}

.scre-badge-fail {
	display: inline-flex;
	align-items: center;
	background: rgba(220,38,38,0.25);
	border: 0.5px solid rgba(220,38,38,0.4);
	border-radius: 20px;
	padding: 4px 14px;
	font-size: 12px;
	font-weight: 500;
	color: #FCA5A5;
	margin-bottom: 10px;
}

.scre-title {
	font-size: 18px;
	font-weight: 500;
	color: #fff;
	margin-bottom: 4px;
}

.scre-sub {
	font-size: 13px;
	color: rgba(255,255,255,0.65);
}

.scre-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-bottom: 0.5px solid #E5E7EB;
}

.scre-stat {
	padding: 14px 8px;
	text-align: center;
	border-right: 0.5px solid #E5E7EB;
}

.scre-stat:last-child {
	border-right: none;
}

.scre-stat-num {
	font-size: 20px;
	font-weight: 500;
	color: #111827;
}

.scre-stat-num.scre-correct { color: #15803D; }
.scre-stat-num.scre-wrong { color: #B91C1C; }

.scre-stat-lbl {
	font-size: 11px;
	color: #6B7280;
	margin-top: 2px;
}

.scre-body {
	padding: 20px 16px;
}

.scre-msg {
	font-size: 13px;
	color: #6B7280;
	line-height: 1.6;
	text-align: center;
	margin-bottom: 16px;
}

.scre-btn-google {
	width: 100%;
	padding: 11px;
	border-radius: 10px;
	border: 0.5px solid #D1D5DB;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: #111827;
	cursor: pointer;
	font-family: inherit;
}

.scre-or {
	text-align: center;
	font-size: 12px;
	color: #9CA3AF;
	margin: 10px 0;
}

.scre-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.scre-input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 0.5px solid #D1D5DB;
	background: #F9FAFB;
	font-size: 14px;
	color: #111827;
	font-family: inherit;
	box-sizing: border-box;
	display: block;
}

.scre-input:focus {
	outline: none;
	border-color: #1B8FAF;
}

.scre-btn-cert {
	width: 100%;
	padding: 12px;
	border-radius: 10px;
	border: none;
	background: #1B8FAF;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	box-sizing: border-box;
}

.scre-btn-cert:hover {
	background: #157a94;
	color: #fff;
	text-decoration: none;
}

.scre-btn-loading {
	position: relative;
	opacity: 0.65;
	pointer-events: none;
}

.scre-btn-loading::after {
	content: '';
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: scp-spin 0.7s linear infinite;
	margin-left: 8px;
	vertical-align: middle;
}

.scre-btn-retry {
	width: 100%;
	padding: 12px;
	border-radius: 10px;
	border: none;
	background: #0F2744;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	margin-bottom: 8px;
}

.scre-btn-outline {
	width: 100%;
	padding: 11px;
	border-radius: 10px;
	border: 0.5px solid #D1D5DB;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	font-family: inherit;
}

.scre-btn-review {
	width: 100%;
	padding: 10px;
	border-radius: 10px;
	border: 0.5px solid #D1D5DB;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	color: #374151;
	cursor: pointer;
	font-family: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
}

.scre-chevron {
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.scre-min-req {
	text-align: center;
	font-size: 11px;
	color: #9CA3AF;
	margin-top: 10px;
}

.scre-min-req span {
	color: #DC2626;
	font-weight: 500;
}

.scre-answer-review {
	border-top: 0.5px solid #E5E7EB;
	padding: 16px;
}

.scre-review-header {
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	margin-bottom: 12px;
}

.scre-review-section {
	border-top: 0.5px solid #E5E7EB;
}

.scre-review-section .scre-review-header {
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.scre-review-title {
	font-size: 13px;
	font-weight: 500;
	color: #374151;
}

.scre-review-count {
	font-size: 11px;
	color: #6B7280;
}

.scre-review-item {
	margin: 0 16px 12px;
	border-radius: 12px;
	border: 0.5px solid #E5E7EB;
	overflow: hidden;
}

.scre-review-q-header {
	padding: 12px 14px;
	background: #F9FAFB;
	border-bottom: 0.5px solid #E5E7EB;
}

.scre-review-q-num {
	font-size: 10px;
	font-weight: 500;
	color: #6B7280;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 4px;
}

.scre-review-q-text {
	font-size: 13px;
	font-weight: 500;
	color: #111827;
	line-height: 1.4;
}

.scre-review-answers {
	padding: 10px 14px;
}

.scre-answer-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 0.5px solid #F3F4F6;
	font-size: 12px;
}

.scre-answer-row:last-child {
	border-bottom: none;
}

.scre-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 3px;
}

.scre-dot-wrong { background: #DC2626; }
.scre-dot-correct { background: #15803D; }
.scre-dot-explain { background: #F5A623; }

.scre-answer-label {
	font-weight: 500;
	color: #374151;
	flex-shrink: 0;
}

.scre-answer-text { color: #6B7280; line-height: 1.4; }
.scre-ans-wrong { color: #B91C1C; }
.scre-ans-correct { color: #15803D; }

/* ========================================
   MOBILE BREAKPOINTS
   ======================================== */

@media (max-width: 480px) {
	.pre-hero {
		padding: 20px 16px 16px;
	}

	.pre-title {
		font-size: 18px;
	}

	.scp-dashboard-card {
		border-radius: 12px;
		max-width: 100%;
	}

	.scp-dashboard-card-header,
	.scp-dashboard-card-body,
	.scp-dashboard-card-footer {
		padding: 16px;
	}

	.scp-dashboard-card-title {
		font-size: 20px;
	}

	.scer-top-bar { padding: 12px 14px; }
	.scer-body { padding: 16px 14px 14px; }
	.scer-q-title { font-size: 15px; }
	.scer-option { padding: 10px 12px; font-size: 13px; }

	.scre-hero-pass, .scre-hero-fail { padding: 22px 16px 18px; }
	.scer-ring { width: 76px; height: 76px; }
	.scre-score { font-size: 22px; }
	.scre-title { font-size: 16px; }
	.scer-body { padding: 16px 14px; }
}

/* ========================================
   LOADING SPINNER & ANIMATIONS
   ======================================== */

.scp-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(27,143,175,0.2);
	border-top-color: #1B8FAF;
	border-radius: 50%;
	animation: scp-spin 0.7s linear infinite;
}

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

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
	from { opacity: 1; transform: translateY(0); }
	to { opacity: 0; transform: translateY(6px); }
}

@keyframes slideIn {
	from { opacity: 0; transform: translateX(-8px); }
	to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
	from { opacity: 1; transform: translateX(0); }
	to { opacity: 0; transform: translateX(-8px); }
}

/* Certificate preparing message animation */
.scre-preparing {
	text-align: center;
	font-size: 12px;
	color: #6B7280;
	margin-top: 8px;
	animation: pulse 1.5s ease-in-out infinite;
}

.scre-btn-practice {
	width: 100%;
	padding: 10px;
	border-radius: 10px;
	border: 0.5px solid #1B8FAF;
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	color: #1B8FAF;
	cursor: pointer;
	font-family: inherit;
	text-align: center;
}

.scre-btn-practice:hover {
	background: #EFF9FC;
	color: #1B8FAF;
	text-decoration: none;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}
