/* ==========================================================================
   Examination Center — redesigned exams listing page.
   Own stylesheet: enqueued only on [smart_lms_exams] pages.
   ========================================================================== */

.slms-scope.slms-exams-page {
	max-width: 100%;
	margin: 0 auto;
	padding: 2.4rem 20px 3.5rem;
	color: #0f172a;
	font-family: var(--slms-font-sans);
}

/* ---- Hero ---------------------------------------------------------------- */
.slms-scope .slms-exams-head {
	display: flex;
	justify-content: space-between;
	align-items: stretch;
	gap: 1.25rem;
	flex-wrap: wrap;
	background: linear-gradient(135deg, #0b1220 0%, #1e3a8a 100%);
	border-radius: 20px;
	padding: 1.75rem 1.9rem;
	margin-bottom: 1.75rem;
	color: #fff;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.slms-scope .slms-exams-head-info {
	flex: 1 1 320px;
}

.slms-scope .slms-exams-kicker {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #c7d2fe;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 9999px;
	padding: 3px 12px;
	margin-bottom: 12px;
}

.slms-scope .slms-exams-head h1 {
	margin: 0;
	font-size: 2.05rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}

.slms-scope .slms-exams-sub {
	margin: 8px 0 0;
	color: #c7d2fe;
	font-size: 0.95rem;
	max-width: 46ch;
}

.slms-scope .slms-exams-head-stats {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.slms-scope .slms-exams-stat {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 5px 13px;
	border-radius: 9999px;
}

.slms-scope .slms-exams-stat i {
	width: 7px;
	height: 7px;
	border-radius: 9999px;
	display: inline-block;
}

.slms-scope .slms-exams-stat-open {
	background: rgba(134, 239, 172, 0.16);
	color: #bbf7d0;
	border: 1px solid rgba(134, 239, 172, 0.35);
}

.slms-scope .slms-exams-stat-open i {
	background: #4ade80;
	box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
	animation: slms-exams-pulse 2s infinite;
}

.slms-scope .slms-exams-stat-upcoming {
	background: rgba(251, 191, 36, 0.14);
	color: #fde68a;
	border: 1px solid rgba(251, 191, 36, 0.35);
}

.slms-scope .slms-exams-stat-upcoming i {
	background: #fbbf24;
}

.slms-scope .slms-exams-head-user {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 14px;
	padding: 0.55rem 1rem;
	align-self: center;
}

.slms-scope .slms-exams-head-user img {
	border-radius: 10px;
	display: block;
}

.slms-scope .slms-exams-head-user strong {
	display: block;
	font-size: 0.92rem;
	color: #fff;
	line-height: 1.2;
}

.slms-scope .slms-exams-head-user span {
	font-size: 0.72rem;
	color: #c7d2fe;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ---- Groups ---------------------------------------------------------------- */
.slms-scope .slms-exams-group {
	margin-bottom: 2rem;
}

.slms-scope .slms-exams-group-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 0.9rem;
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #475569;
}

.slms-scope .slms-exams-group-title .slms-exams-pill-dot {
	background: #22c55e;
	animation: slms-exams-pulse 2s infinite;
}

.slms-scope .slms-exams-group-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 9999px;
	background: #e2e8f0;
	color: #334155;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0;
}

/* ---- Grid ------------------------------------------------------------------ */
.slms-scope .slms-exams-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: 1.1rem;
}

/* ---- Card ------------------------------------------------------------------ */
.slms-scope .slms-exams-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 1.15rem 1.25rem 1.2rem;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
	overflow: hidden;
}

.slms-scope .slms-exams-card::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: #cbd5e1;
}

.slms-scope .slms-exams-card--live::before {
	background: linear-gradient(90deg, #2563eb, #4ade80);
}

.slms-scope .slms-exams-card--scheduled::before {
	background: #f59e0b;
}

.slms-scope .slms-exams-card--tba::before {
	background: #cbd5e1;
}

.slms-scope .slms-exams-card--passed::before {
	background: #22c55e;
}

.slms-scope .slms-exams-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.slms-scope .slms-exams-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.2rem;
}

.slms-scope .slms-exams-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 4px 11px;
	border-radius: 9999px;
	background: #f1f5f9;
	color: #475569;
}

.slms-scope .slms-exams-pill-dot {
	width: 7px;
	height: 7px;
	border-radius: 9999px;
	background: #94a3b8;
	display: inline-block;
}

.slms-exams-card--live .slms-exams-pill {
	background: #dcfce7;
	color: #15803d;
}

.slms-exams-card--live .slms-exams-pill-dot {
	background: #22c55e;
	animation: slms-exams-pulse 2s infinite;
}

.slms-exams-card--scheduled .slms-exams-pill {
	background: #fef3c7;
	color: #b45309;
}

.slms-exams-card--scheduled .slms-exams-pill-dot {
	background: #f59e0b;
}

.slms-exams-card--tba .slms-exams-pill {
	background: #f1f5f9;
	color: #64748b;
}

.slms-scope .slms-exams-flag {
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 9999px;
}

.slms-scope .slms-exams-flag-live {
	background: #dbeafe;
	color: #1d4ed8;
}

.slms-scope .slms-exams-flag-pass {
	background: #dcfce7;
	color: #15803d;
}

.slms-scope .slms-exams-flag-fail {
	background: #fee2e2;
	color: #b91c1c;
}

.slms-scope .slms-exams-title {
	margin: 0;
	font-size: 1.18rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #0f172a;
	line-height: 1.3;
}

.slms-scope .slms-exams-hall {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	color: #64748b;
}

/* ---- Live countdown strip ---------------------------------------------------- */
.slms-scope .slms-exams-timer {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	background: #0f172a;
	border-radius: 12px;
	padding: 0.6rem 0.95rem;
	margin-top: 0.35rem;
}

.slms-scope .slms-exams-timer-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #94a3b8;
}

.slms-scope .slms-exams-timer-value {
	font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
	font-size: 1.05rem;
	font-weight: 700;
	color: #7dd3fc;
	letter-spacing: 0.04em;
}

.slms-scope .slms-exams-tba-note {
	font-size: 0.8rem;
	font-weight: 600;
	color: #94a3b8;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	padding: 0.5rem 0.8rem;
	margin-top: 0.35rem;
}

/* ---- Meta grid ---------------------------------------------------------------- */
.slms-scope .slms-exams-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem 1rem;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	padding: 0.75rem 0.95rem;
	margin: 0.2rem 0 0;
}

.slms-scope .slms-exams-meta > div {
	min-width: 0;
}

.slms-scope .slms-exams-meta dt {
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 2px;
}

.slms-scope .slms-exams-meta dd {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: #0f172a;
}

/* ---- Outcome strip -------------------------------------------------------------- */
.slms-scope .slms-exams-outcome {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	border-radius: 10px;
	padding: 0.5rem 0.85rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.slms-scope .slms-exams-outcome-score {
	font-size: 1.02rem;
	font-weight: 800;
}

.slms-scope .slms-exams-outcome-tries {
	margin-left: auto;
	font-size: 0.72rem;
	font-weight: 500;
	opacity: 0.75;
}

.slms-scope .slms-exams-outcome-pass {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #15803d;
}

.slms-scope .slms-exams-outcome-fail {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
}

/* ---- Actions ---------------------------------------------------------------------- */
.slms-scope .slms-exams-card-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: auto;
	padding-top: 0.65rem;
}

.slms-scope .slms-exams-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-size: 0.88rem;
	font-weight: 700;
	border-radius: 12px;
	padding: 0.68rem 1.15rem;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.slms-scope .slms-exams-btn-primary {
	background: #0f172a;
	color: #fff;
}

.slms-scope .slms-exams-btn-primary:hover {
	background: #1e3a8a;
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(30, 58, 138, 0.3);
	color: #fff;
}

.slms-scope .slms-exams-btn-primary.slms-exams-btn-live {
	background: #1d4ed8;
}

.slms-scope .slms-exams-btn-ghost {
	background: #fff;
	color: #334155;
	border-color: #cbd5e1;
}

.slms-scope .slms-exams-btn-ghost:hover {
	border-color: #1e3a8a;
	color: #1e3a8a;
}

.slms-scope .slms-exams-btn-live .slms-exams-pill-dot {
	background: #fff;
	animation: slms-exams-pulse 1.4s infinite;
}

.slms-scope .slms-exams-btn-enroll {
	background: #2563eb;
	color: #fff;
}

.slms-scope .slms-exams-btn-enroll:hover {
	background: #1d4ed8;
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
	color: #fff;
}

.slms-scope .slms-exams-btn-disabled,
.slms-scope .slms-exams-btn:disabled {
	background: #f1f5f9;
	color: #94a3b8;
	border-color: #e2e8f0;
	cursor: not-allowed;
}

.slms-scope .slms-exams-note {
	font-size: 0.8rem;
	font-weight: 600;
	color: #94a3b8;
}

.slms-scope .slms-exams-msg {
	font-size: 0.78rem;
	color: #b91c1c;
}

/* ---- Empty state -------------------------------------------------------------------- */
.slms-scope .slms-exams-empty {
	text-align: center;
	background: #fff;
	border: 1px dashed #cbd5e1;
	border-radius: 18px;
	padding: 3rem 1.5rem;
}

.slms-scope .slms-exams-empty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 9999px;
	background: #f1f5f9;
	color: #94a3b8;
	margin-bottom: 0.8rem;
}

.slms-scope .slms-exams-empty h3 {
	margin: 0 0 0.35rem;
	font-size: 1.1rem;
	font-weight: 800;
	color: #0f172a;
}

.slms-scope .slms-exams-empty p {
	margin: 0;
	color: #64748b;
	font-size: 0.9rem;
}

/* ---- Pulse ---------------------------------------------------------------------------- */
@keyframes slms-exams-pulse {
	0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
	70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
	100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---- Responsive ------------------------------------------------------------------------- */
@media (max-width: 720px) {
	.slms-scope.slms-exams-page {
		padding: 1.4rem 14px 2.5rem;
	}

	.slms-scope .slms-exams-head {
		flex-direction: column;
		align-items: flex-start;
		padding: 1.3rem 1.2rem;
	}

	.slms-scope .slms-exams-head h1 {
		font-size: 1.6rem;
	}

	.slms-scope .slms-exams-grid {
		grid-template-columns: 1fr;
	}
}

@media print {
	.slms-scope .slms-exams-card-actions,
	.slms-scope .slms-exams-head-user {
		display: none;
	}
}
