/* ============================================
   Online Exam v2 – Multi-exam styles
   ============================================ */

.oe-wrapper {
	--oe-primary: #4f46e5;
	--oe-primary-dark: #4338ca;
	--oe-primary-light: #818cf8;
	--oe-success: #10b981;
	--oe-danger: #ef4444;
	--oe-warning: #f59e0b;
	--oe-dark: #1e293b;
	--oe-gray: #64748b;
	--oe-light: #f1f5f9;
	--oe-white: #ffffff;
	--oe-border: #e2e8f0;
	--oe-radius: 12px;
	--oe-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--oe-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	color: var(--oe-dark);
	line-height: 1.6;
	max-width: 860px;
	margin: 0 auto;
	padding: 16px;
}

.oe-wrapper * { box-sizing: border-box; }

.oe-card {
	background: var(--oe-white);
	border-radius: var(--oe-radius);
	box-shadow: var(--oe-shadow-lg);
	padding: 28px;
	margin-bottom: 20px;
}

.oe-card-header { text-align: center; margin-bottom: 24px; }
.oe-title { font-size: 1.6rem; color: var(--oe-primary); margin: 0 0 6px; }
.oe-subtitle { color: var(--oe-gray); margin: 0; font-size: 0.95rem; }

.oe-info-box {
	background: #e0e7ff;
	color: #3730a3;
	border: 1px solid #c7d2fe;
	border-radius: 8px;
	padding: 14px 18px;
	margin-bottom: 20px;
	font-size: 0.95rem;
}

/* ---- Exam list ---- */
.oe-exam-list { display: flex; flex-direction: column; gap: 14px; }

.oe-exam-list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	border: 2px solid var(--oe-border);
	border-radius: 10px;
	background: var(--oe-light);
	transition: border-color 0.2s, box-shadow 0.2s;
	flex-wrap: wrap;
}

.oe-exam-list-item:hover {
	border-color: var(--oe-primary-light);
	box-shadow: var(--oe-shadow);
}

.oe-exam-list-info h3 {
	margin: 0 0 4px;
	font-size: 1.15rem;
	color: var(--oe-dark);
}

.oe-exam-desc {
	margin: 0 0 8px;
	color: var(--oe-gray);
	font-size: 0.9rem;
}

.oe-exam-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.85rem;
	color: var(--oe-gray);
}

/* ---- Forms ---- */
.oe-form-group { margin-bottom: 16px; }
.oe-form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.9rem; }

.oe-input {
	width: 100%;
	padding: 11px 14px;
	border: 2px solid var(--oe-border);
	border-radius: 8px;
	font-size: 1rem;
	transition: border-color 0.2s;
	background: var(--oe-white);
}

.oe-input:focus {
	outline: none;
	border-color: var(--oe-primary);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ---- Buttons ---- */
.oe-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 22px;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	line-height: 1.4;
}

.oe-btn-primary { background: var(--oe-primary); color: #fff; }
.oe-btn-primary:hover { background: var(--oe-primary-dark); }
.oe-btn-success { background: var(--oe-success); color: #fff; }
.oe-btn-success:hover { background: #059669; }
.oe-btn-outline { background: transparent; border: 2px solid var(--oe-primary); color: var(--oe-primary); }
.oe-btn-outline:hover { background: var(--oe-primary); color: #fff; }
.oe-btn-block { width: 100%; }
.oe-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- Alerts ---- */
.oe-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.oe-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.oe-notice { padding: 16px; border-radius: 8px; margin: 16px 0; }
.oe-error { background: #fee2e2; color: #991b1b; }

/* ---- Exam Header ---- */
.oe-exam-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	background: var(--oe-white);
	padding: 14px 20px;
	border-radius: var(--oe-radius);
	box-shadow: var(--oe-shadow);
	margin-bottom: 16px;
	position: sticky;
	top: 10px;
	z-index: 50;
}

.oe-exam-info { display: flex; gap: 20px; flex-wrap: wrap; }
.oe-info-item { display: flex; flex-direction: column; }
.oe-label { font-size: 0.7rem; color: var(--oe-gray); text-transform: uppercase; letter-spacing: 0.4px; }
.oe-value { font-weight: 700; font-size: 1.05rem; }

.oe-timer {
	background: var(--oe-dark);
	color: #fff;
	padding: 8px 16px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1.2rem;
	font-variant-numeric: tabular-nums;
	min-width: 100px;
	text-align: center;
}

.oe-timer.oe-warning { background: var(--oe-warning); color: var(--oe-dark); animation: oe-pulse 1s infinite; }
.oe-timer.oe-danger { background: var(--oe-danger); animation: oe-pulse 0.5s infinite; }

@keyframes oe-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* ---- Progress ---- */
.oe-progress-bar-wrap { background: var(--oe-light); border-radius: 999px; height: 8px; overflow: hidden; margin-bottom: 12px; }
.oe-progress-bar { height: 100%; background: linear-gradient(90deg, var(--oe-primary), var(--oe-primary-light)); border-radius: 999px; transition: width 0.3s ease; }

/* ---- Palette ---- */
.oe-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.oe-palette-btn {
	width: 36px; height: 36px;
	border-radius: 8px;
	border: 2px solid var(--oe-border);
	background: var(--oe-white);
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	transition: all 0.15s;
}

.oe-palette-btn:hover { border-color: var(--oe-primary); }
.oe-palette-btn.oe-current { border-color: var(--oe-primary); background: var(--oe-primary); color: #fff; }
.oe-palette-btn.oe-answered { background: var(--oe-success); border-color: var(--oe-success); color: #fff; }

/* ---- Question ---- */
.oe-question {
	background: var(--oe-white);
	border-radius: var(--oe-radius);
	box-shadow: var(--oe-shadow);
	padding: 24px;
	margin-bottom: 16px;
	border-left: 5px solid var(--oe-primary);
}

.oe-question.oe-answered { border-left-color: var(--oe-success); }

.oe-q-num {
	display: inline-block;
	background: var(--oe-primary);
	color: #fff;
	width: 30px; height: 30px;
	border-radius: 50%;
	text-align: center;
	line-height: 30px;
	font-weight: 700;
	font-size: 0.85rem;
	margin-bottom: 10px;
}

.oe-q-text { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; }

.oe-options { display: flex; flex-direction: column; gap: 10px; }

.oe-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border: 2px solid var(--oe-border);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
	background: var(--oe-light);
}

.oe-option:hover { border-color: var(--oe-primary-light); background: #eef2ff; }
.oe-option.oe-selected { border-color: var(--oe-primary); background: #eef2ff; }
.oe-option input[type="radio"] { width: 16px; height: 16px; accent-color: var(--oe-primary); cursor: pointer; flex-shrink: 0; }
.oe-option label { cursor: pointer; flex: 1; font-size: 0.98rem; margin: 0; }

/* ---- Nav ---- */
.oe-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ---- Results ---- */
.oe-result-card { text-align: center; padding: 36px 28px; }
.oe-result-icon { font-size: 3.5rem; margin-bottom: 12px; }
.oe-result-score { font-size: 3rem; font-weight: 800; color: var(--oe-primary); line-height: 1; margin: 12px 0 4px; }
.oe-result-pct { font-size: 1.35rem; color: var(--oe-gray); margin-bottom: 16px; }

.oe-badge { display: inline-block; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.oe-badge-pass { background: #d1fae5; color: #065f46; }
.oe-badge-fail { background: #fee2e2; color: #991b1b; }

.oe-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 24px 0; }
.oe-stat { background: var(--oe-light); padding: 14px; border-radius: 8px; }
.oe-stat-val { font-size: 1.4rem; font-weight: 700; }
.oe-stat-label { font-size: 0.75rem; color: var(--oe-gray); text-transform: uppercase; }

/* ---- Review ---- */
.oe-review-item {
	border-left: 5px solid var(--oe-warning);
	background: var(--oe-white);
	border-radius: var(--oe-radius);
	box-shadow: var(--oe-shadow);
	padding: 20px;
	margin-bottom: 14px;
}

.oe-review-item.oe-correct { border-left-color: var(--oe-success); }
.oe-review-item.oe-wrong { border-left-color: var(--oe-danger); }

.oe-review-opt {
	padding: 10px 14px;
	border: 2px solid var(--oe-border);
	border-radius: 8px;
	margin-bottom: 6px;
	background: var(--oe-light);
	font-size: 0.92rem;
}

.oe-review-opt.oe-is-correct { background: #d1fae5; border-color: #10b981; }
.oe-review-opt.oe-is-wrong { background: #fee2e2; border-color: #ef4444; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
	.oe-card { padding: 18px; }
	.oe-exam-header { flex-direction: column; align-items: stretch; text-align: center; }
	.oe-exam-info { justify-content: center; }
	.oe-result-score { font-size: 2.2rem; }
	.oe-q-text { font-size: 1.02rem; }
	.oe-exam-list-item { flex-direction: column; align-items: stretch; }
}
