/* =========================================================
   LMS EXAM — front-end styles (builds on lms-style.css tokens)
   ========================================================= */

/* Question-type pill in the exam header row */
.lms-exam-qtype-pill{
	font-size:11px;font-weight:700;padding:3px 12px;border-radius:20px;
	background:var(--lp-l,#eef2ff);color:var(--lp,#4f46e5);
}

/* Multiple-choice: show checkboxes look via the letter box */
.lms-exam-options[data-type="multiple"] .lms-tb-opt-letter{border-radius:6px;}
.lms-exam-multi-hint{font-size:12px;color:#6b7280;margin-top:8px;font-style:italic;}

/* ---------- Long answer ---------- */
.lms-exam-long{margin-top:6px;}
.lms-exam-long-text{
	width:100%;box-sizing:border-box;min-height:170px;padding:14px 16px;
	border:1.5px solid #d1d5db;border-radius:var(--rr,8px);font-size:15px;line-height:1.6;
	font-family:inherit;resize:vertical;background:#fff;
}
.lms-exam-long-text:focus{outline:none;border-color:var(--lp,#4f46e5);box-shadow:0 0 0 3px var(--lp-l,#eef2ff);}
.lms-exam-upload-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;}
.lms-exam-upload-btn{background:#fff;color:var(--lp,#4f46e5);border:1.5px solid var(--lp,#4f46e5);box-shadow:none;padding:9px 18px;}
.lms-exam-upload-btn:hover{background:var(--lp-l,#eef2ff);color:var(--lp,#4f46e5);}
.lms-exam-upload-status{font-size:13px;font-weight:600;}
.lms-exam-img-preview{margin-top:12px;}
.lms-exam-imgprev-inner{display:inline-flex;flex-direction:column;gap:8px;align-items:flex-start;}
.lms-exam-imgprev-inner img{max-width:280px;max-height:280px;border-radius:10px;border:1px solid #e5e7eb;display:block;}
.lms-exam-img-remove{background:none;border:none;color:var(--ld,#dc2626);font-size:12px;font-weight:600;cursor:pointer;padding:0;text-decoration:underline;}
.lms-exam-imgprev-inner.is-pdf{width:100%;max-width:560px;}

/* ---------- PDF / file view (upload preview + result) ---------- */
.lms-exam-fileview{margin-top:12px;}
.lms-exam-pdf-frame{
	width:100%;max-width:560px;height:460px;display:block;
	border:1px solid #e5e7eb;border-radius:12px;background:#fff;
	box-shadow:0 1px 3px rgba(16,24,40,.06);
}
.lms-exam-imgprev-inner.is-pdf .lms-exam-pdf-frame{max-width:100%;}
.lms-exam-file-card{
	display:inline-flex;align-items:center;gap:12px;margin-top:10px;
	background:#fff;border:1px solid #e5e7eb;border-radius:12px;
	padding:11px 16px;text-decoration:none;color:#1e1b2e;font-weight:600;font-size:14px;
	box-shadow:0 1px 3px rgba(16,24,40,.06);transition:border-color .15s,box-shadow .15s,transform .15s;
}
.lms-exam-file-card:hover{border-color:var(--lp,#4f46e5);box-shadow:0 6px 18px rgba(79,70,229,.15);transform:translateY(-1px);}
.lms-exam-file-ic{
	width:40px;height:40px;flex:0 0 40px;border-radius:10px;display:grid;place-items:center;
	background:#fef2f2;color:#dc2626;font-size:12px;font-weight:800;letter-spacing:.5px;
}
.lms-exam-file-meta{line-height:1.25;}
.lms-exam-file-meta small{display:block;color:#6b7280;font-weight:500;font-size:12px;margin-top:2px;}

/* ---------- Submitted / pending cards ---------- */
.lms-exam-pending-card{max-width:640px;margin:40px auto;}

/* ---------- Answer window closed (view-only questions) ---------- */
.lms-exam-closed-banner{
	background:#fffbeb;border:1px solid #fde68a;color:#92400e;
	padding:12px 18px;border-radius:var(--rr,8px);margin-bottom:16px;
	font-size:13.5px;font-weight:600;text-align:center;
}
.lms-exam-options.lms-exam-locked .lms-exam-option{pointer-events:none;opacity:.7;cursor:default;}
.lms-exam-closed-pill{
	font-size:12.5px;font-weight:700;color:#92400e;background:#fffbeb;
	border:1px solid #fde68a;border-radius:20px;padding:6px 16px;
}

/* ---------- Result page — full-page container design ---------- */
/* All rules below are scoped to the exam result page, so quiz results,
   the exam-taking screen and every other page stay exactly the same. */
.lms-exam-result-page{
	background:
		radial-gradient(1200px 240px at 50% -40px, rgba(124,108,255,.16), transparent 70%),
		linear-gradient(180deg,#f5f3ff 0%, #f8f9fc 200px, #f8f9fc 100%);
	padding:38px 20px 56px;
	border-radius:22px;
}
.lms-exam-result-wrap{max-width:860px;margin:0 auto;}

/* Hero result card */
.lms-exam-result-wrap .lms-tb-result-card{
	position:relative;overflow:hidden;max-width:none;
	padding:38px 32px 32px;margin:0 auto 22px;
	border:1px solid #ece9fb;border-radius:20px;
	box-shadow:0 12px 40px rgba(79,70,229,.12);
}
.lms-exam-result-wrap .lms-tb-result-card::before{
	content:"";position:absolute;top:0;left:0;right:0;height:6px;
	background:linear-gradient(90deg,var(--lp,#4f46e5),#7c6cff 55%,#a855f7);
}
.lms-exam-result-eyebrow{
	font-size:11px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;
	color:var(--lp,#4f46e5);margin-bottom:6px;
}
.lms-exam-result-wrap .lms-tb-result-title{font-size:24px;letter-spacing:-.3px;color:#1e1b2e;margin-bottom:2px;}
.lms-exam-result-wrap .lms-tb-score-big{margin:16px 0 24px;}
.lms-exam-result-wrap .lms-tb-result-grid{
	grid-template-columns:repeat(2,minmax(0,210px));
	justify-content:center;gap:16px;
}
.lms-exam-result-wrap .lms-tb-result-box{padding:18px 14px;border-radius:14px;}

/* Answer-breakdown heading */
.lms-exam-breakdown-head{
	display:flex;align-items:center;gap:11px;
	margin:32px 2px 18px;font-size:20px;font-weight:800;color:#1e1b2e;
}
.lms-exam-breakdown-head::before{
	content:"";width:5px;height:22px;border-radius:4px;
	background:linear-gradient(180deg,var(--lp,#4f46e5),#7c6cff);
}

/* Review cards on the result page */
.lms-exam-result-wrap .lms-exam-review-block{
	border:1px solid #eef0f6;border-radius:16px;padding:24px;
	box-shadow:0 4px 18px rgba(16,24,40,.05);
}

@media(max-width:640px){
	.lms-exam-result-page{padding:24px 12px 40px;border-radius:16px;}
	.lms-exam-result-wrap .lms-tb-result-card{padding:28px 20px 24px;}
	.lms-exam-result-wrap .lms-tb-result-grid{grid-template-columns:1fr;}
}

/* ---------- Result breakdown (student) ---------- */
.lms-exam-overall-remark{
	margin-top:16px;background:var(--lp-l,#eef2ff);border-radius:var(--rr,8px);
	padding:12px 16px;font-size:14px;color:#3730a3;text-align:left;
}
.lms-exam-review-block{margin-bottom:18px;}
.lms-exam-qmark{font-size:12px;font-weight:600;color:#6b7280;margin-left:6px;}
.lms-exam-your-answer{
	background:#f9fafb;border:1px solid #eef0f3;border-radius:var(--rr,8px);
	padding:14px 16px;margin:10px 0;
}
.lms-exam-ya-label{font-size:12px;font-weight:700;color:#6b7280;margin-bottom:6px;text-transform:uppercase;letter-spacing:.3px;}
.lms-exam-ya-text{white-space:pre-wrap;line-height:1.65;font-size:15px;color:#111827;}
.lms-exam-ya-img{max-width:300px;max-height:300px;border-radius:10px;border:1px solid #e5e7eb;margin-top:12px;display:block;}
.lms-exam-award{margin-top:8px;font-size:14px;color:#111827;}
.lms-exam-award strong{color:var(--lp,#4f46e5);}
.lms-exam-remark{margin-top:6px;font-size:13px;color:#4b5563;background:#fffbeb;border:1px solid #fde68a;border-radius:6px;padding:8px 12px;}
.lms-exam-picked-tag{font-size:11px;font-weight:700;color:var(--lp,#4f46e5);background:var(--lp-l,#eef2ff);padding:1px 8px;border-radius:12px;margin-left:6px;}

/* Result box colours re-use quiz classes; add green/red status box tints */
.lms-tb-result-box.green .lms-rb-val{color:var(--ls,#16a34a);}
.lms-tb-result-box.red .lms-rb-val{color:var(--ld,#dc2626);}

/* Exam card in the student dashboard grid re-uses .lms-quiz-score-card */
.lms-exam-card h4{margin-top:0;}

/* Small screens */
@media(max-width:640px){
	.lms-exam-ya-img,.lms-exam-imgprev-inner img{max-width:100%;}
}
