/**
 * Knowledge Check – Assignment Portal look and feel
 * Inter font, #b60f0f red, #f4f5f7 background, JIRA-style cards.
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Variables (assignment-portal) --- */
:root {
	--kc-primary: #b60f0f;
	--kc-primary-hover: #8c0d0d;
	--kc-primary-light: #fde8e8;
	--kc-success: #2e7d32;
	--kc-success-bg: #e8f5e9;
	--kc-error: #c62828;
	--kc-error-bg: #ffebee;
	--kc-text: #172b4d;
	--kc-text-muted: #5e6c84;
	--kc-border: #dfe1e6;
	--kc-bg: #f4f5f7;
	--kc-card-bg: #fff;
	--kc-shadow: 0 1px 2px rgba(0,0,0,0.05);
	--kc-shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
	--kc-radius: 4px;
	--kc-transition: 0.2s ease;
}

/* --- Body (assignment-portal) --- */
body.kc-portal-body {
	background-color: #f4f5f7;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	margin: 0;
	padding: 0;
}
/* Override global #main so Knowledge Check content is not clipped */
body.kc-portal-body #main {
	overflow: visible !important;
	min-height: 50vh;
}

/* --- App header (assignment-portal style) --- */
.kc-app-header {
	width: 100%;
	background: #ffffff;
	box-shadow: 0 12px 32px rgba(0,0,0,0.08);
	padding: 20px 32px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
}
.kc-app-header-left {
	display: flex;
	align-items: center;
	gap: 16px;
}
.kc-app-header-logo {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: linear-gradient(145deg, #b60f0f, #8c0d0d);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 12px 20px rgba(182, 15, 15, 0.28);
}
.kc-app-header-logo img {
	width: 42px;
	height: 42px;
}
.kc-app-header-title {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.kc-app-header-title .kc-primary {
	font-size: 20px;
	font-weight: 700;
	color: #202020;
	letter-spacing: 0.8px;
	text-transform: uppercase;
}
.kc-app-header-title .kc-secondary {
	font-size: 13px;
	font-weight: 500;
	color: #6f7a89;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.kc-app-header-right {
	display: flex;
	align-items: center;
	gap: 16px;
}
.kc-header-user {
	display: flex;
	align-items: center;
	gap: 12px;
}
.kc-header-user-info {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}
.kc-header-user-name {
	font-size: 15px;
	font-weight: 600;
	color: #202020;
}
.kc-header-user-email {
	font-size: 12px;
	color: #6f7a89;
}
.kc-header-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: linear-gradient(135deg, #b60f0f, #8c0d0d);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	letter-spacing: 1px;
	font-size: 16px;
	box-shadow: 0 10px 18px rgba(182, 15, 15, 0.28);
}
.kc-header-login-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	height: 46px;
	box-sizing: border-box;
	border-radius: 23px;
	background: linear-gradient(135deg, #b60f0f, #8c0d0d);
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.5px;
	box-shadow: 0 10px 18px rgba(182, 15, 15, 0.28);
	transition: opacity 0.2s, transform 0.2s;
}
.kc-header-login-btn:hover {
	opacity: 0.95;
	transform: translateY(-1px);
	color: #fff !important;
}

/* --- Portal container (assignment-portal) --- */
.kc-portal-container {
	background-color: #f4f5f7;
	display: flex !important;
	flex-direction: column;
	min-height: calc(100vh - 100px);
	width: 100% !important;
	max-width: none !important;
	box-sizing: border-box;
}
.kc-content-area {
	flex: 1 1 auto;
	padding: 32px;
	max-width: 1200px;
	margin: 0 auto;
	width: 100% !important;
	visibility: visible !important;
	opacity: 1 !important;
	min-height: 200px;
	box-sizing: border-box;
}
.kc-portal-title {
	font-size: 32px;
	font-weight: 600;
	color: #b60f0f;
	text-transform: none;
	margin: 0 0 8px 0;
	font-family: 'Inter', sans-serif;
	display: block !important;
	visibility: visible !important;
	min-height: 1.2em;
}
/* Hide greeting on exam/question screen */
.kc-exam-wrap.kc-exam-running .kc-portal-title {
	display: none !important;
}
.kc-typing-title .kc-typing-text {
	display: inline;
}
.kc-typing-cursor {
	display: inline;
	opacity: 1;
	animation: kc-cursor-blink 0.9s step-end infinite;
	margin-left: 2px;
	font-weight: 400;
	color: #b60f0f;
}
@keyframes kc-cursor-blink {
	50% { opacity: 0; }
}
.kc-portal-subtitle {
	font-size: 17px;
	color: #5e6c84;
	margin: 0 0 28px 0;
	display: block !important;
	visibility: visible !important;
}

/* --- Layout --- */
.kc-page {
	display: block !important;
	min-height: 60vh;
	padding: 0;
	width: 100%;
	box-sizing: border-box;
}
.kc-wrap,
.kc-exam-wrap {
	display: block !important;
	max-width: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	transition: opacity 0.35s ease, transform 0.35s ease;
	overflow: visible !important;
	min-height: 0;
	box-sizing: border-box;
}
.kc-wrap.kc-enter,
.kc-exam-wrap.kc-enter {
	animation: kcFadeInUp 0.45s ease forwards;
}
@keyframes kcFadeInUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* --- Typography --- */
.kc-wrap h1,
.kc-exam-wrap h1 {
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 24px;
	color: var(--kc-text);
	margin-bottom: 8px;
	letter-spacing: 0.3px;
}
.kc-wrap .kc-subtitle,
.kc-exam-wrap .kc-subtitle {
	color: var(--kc-text-muted);
	font-size: 15px;
	line-height: 1.5;
	margin-bottom: 28px;
}

/* --- Tag filter left sidebar (index) – assignment-portal style --- */
.kc-content-area.kc-has-sidebar {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 0;
	max-width: none;
	width: 100%;
}
.kc-filter-panel {
	width: 20%;
	flex: 0 0 20%;
	background: #fff;
	padding: 20px 16px;
	position: sticky;
	top: 0;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}
.kc-filter-panel::-webkit-scrollbar {
	width: 6px;
}
.kc-filter-panel::-webkit-scrollbar-track {
	background: var(--kc-bg);
}
.kc-filter-panel::-webkit-scrollbar-thumb {
	background: #c1c7d0;
	border-radius: 3px;
}
.kc-vertical-hr {
	width: 2px;
	flex: 0 0 2px;
	align-self: stretch;
	background: var(--kc-border);
	min-height: 200px;
}
.kc-content-area.kc-has-sidebar .kc-page {
	width: 80%;
	flex: 0 0 80%;
	min-width: 0;
}
.kc-filter-section {
	margin-bottom: 0;
	padding: 0;
}
.kc-filter-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--kc-text-muted);
	margin-bottom: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.kc-tag-filter {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.kc-tag-chip-filter {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	background: #f4f5f7;
	border: 1px solid var(--kc-border);
	border-radius: var(--kc-radius);
	font-size: 13px;
	font-family: 'Inter', sans-serif;
	color: var(--kc-text);
	cursor: pointer;
	transition: background var(--kc-transition), border-color var(--kc-transition), color var(--kc-transition);
	user-select: none;
	width: auto;
	box-sizing: border-box;
}
.kc-tag-chip-filter:hover {
	background: #ebecf0;
	border-color: #c1c7d0;
}
.kc-tag-chip-filter.active {
	background: var(--kc-primary);
	color: #fff;
	border-color: var(--kc-primary);
	font-weight: 500;
}
.kc-clear-filters {
	padding: 8px 14px;
	font-size: 13px;
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	color: var(--kc-text-muted);
	background: transparent;
	border: 1px solid var(--kc-border);
	border-radius: var(--kc-radius);
	cursor: pointer;
	transition: background var(--kc-transition), color var(--kc-transition);
	width: auto;
	box-sizing: border-box;
}
.kc-clear-filters:hover {
	background: #ebecf0;
	color: var(--kc-text);
}
@media (max-width: 767px) {
	.kc-content-area.kc-has-sidebar {
		flex-direction: column;
	}
	.kc-filter-panel {
		width: 100%;
		max-height: none;
		position: static;
		border-right: none;
		border-bottom: 1px solid var(--kc-border);
	}
	.kc-tag-filter {
		flex-direction: row;
		flex-wrap: wrap;
	}
	.kc-tag-chip-filter {
		width: auto;
	}
	.kc-clear-filters {
		width: auto;
	}
}

/* --- Tabs (index) – assignment-portal filter style --- */
.kc-wrap .kc-tabs,
#main .kc-tabs {
	display: flex !important;
	gap: 0;
	margin-bottom: 24px;
	margin-top: 20px;
	border-bottom: 2px solid var(--kc-border);
	position: relative;
	visibility: visible !important;
	opacity: 1 !important;
}
.kc-wrap .kc-tab,
#main .kc-tab {
	padding: 12px 20px;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: var(--kc-text-muted);
	margin-bottom: -2px;
	transition: color var(--kc-transition), background var(--kc-transition), border-color var(--kc-transition);
	visibility: visible !important;
}
.kc-wrap .kc-tab:hover,
#main .kc-tab:hover {
	color: #0052cc;
	background: #f4f5f7;
}
.kc-wrap .kc-tab.active,
#main .kc-tab.active {
	color: #b60f0f;
	background: var(--kc-card-bg);
	border-bottom-color: #b60f0f;
}
.kc-wrap .kc-panel,
#main .kc-panel {
	display: none !important;
	min-height: 80px;
	margin-top: 16px;
}
.kc-wrap .kc-panel.active,
#main .kc-panel.active {
	display: block !important;
	animation: kcFadeIn 0.35s ease;
	visibility: visible !important;
	opacity: 1 !important;
}
.kc-empty-msg {
	color: #5e6c84;
	font-size: 15px;
	margin: 16px 0;
}
@keyframes kcFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* --- List cards (assignment-card style) --- */
.kc-list,
#main .kc-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid !important;
	gap: 20px;
	visibility: visible !important;
}
.kc-list li,
#main .kc-list li {
	animation: kcFadeInUp 0.4s ease backwards;
	visibility: visible !important;
}
.kc-list li:nth-child(1) { animation-delay: 0.05s; }
.kc-list li:nth-child(2) { animation-delay: 0.1s; }
.kc-list li:nth-child(3) { animation-delay: 0.15s; }
.kc-list li:nth-child(4) { animation-delay: 0.2s; }
.kc-list li:nth-child(5) { animation-delay: 0.25s; }
.kc-list li:nth-child(n+6) { animation-delay: 0.3s; }
.kc-list a {
	display: block;
	padding: 20px;
	background: #ffffff;
	border: 1px solid #dfe1e6;
	border-radius: 4px;
	color: #950e0d;
	font-weight: 600;
	font-size: 20px;
	text-decoration: none;
	transition: all 0.2s;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	position: relative;
}
.kc-list a:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	transform: translateY(-2px);
	border-color: #c1c7d0;
}
.kc-meta {
	font-size: 13px;
	color: #5e6c84;
	font-weight: 500;
	margin-top: 8px;
	display: block;
}
.kc-badge {
	display: inline-block;
	font-size: 10px;
	padding: 4px 8px;
	border-radius: 3px;
	margin-left: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.kc-badge.resume {
	background: #fff4e6;
	color: #974f0c;
}
.kc-score {
	font-size: 14px;
	color: #006644;
	font-weight: 600;
	margin-left: 8px;
}

/* --- Completed tab cards --- */
.kc-list-completed .kc-completed-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-right: 80px;
}
.kc-completed-title-line {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px;
}
.kc-completed-name {
	font-weight: 700;
	font-size: 17px;
	color: var(--kc-text);
}
.kc-completed-count {
	font-size: 14px;
	color: var(--kc-text-muted);
	font-weight: 500;
}
.kc-completed-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.kc-completed-tags .kc-intro-tag {
	display: inline-block;
	padding: 4px 10px;
	background: var(--kc-primary-light);
	color: var(--kc-primary);
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
}
.kc-completed-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
	padding-top: 12px;
	border-top: 1px solid var(--kc-border);
}
.kc-completed-date {
	font-size: 13px;
	color: var(--kc-text-muted);
}
.kc-completed-score {
	font-size: 14px;
	font-weight: 700;
	color: var(--kc-success);
	margin-left: auto;
}

/* --- Intro screen --- */
.kc-intro {
	padding: 20px 0;
	text-align: left;
}
.kc-intro-row {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 24px;
}
.kc-intro-col {
	flex: 1 1 280px;
	min-width: 0;
}
@media (min-width: 640px) {
	.kc-intro-col {
		flex: 1 1 calc(50% - 12px);
		max-width: calc(50% - 12px);
	}
}
.kc-intro-section {
	margin-bottom: 0;
	padding: 24px;
	background: #ffffff;
	border: 1px solid #dfe1e6;
	border-radius: 8px;
	border-left: 4px solid #b60f0f;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	height: 100%;
	box-sizing: border-box;
}
.kc-intro-user .kc-intro-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.kc-intro-avatar {
	width: 175px;
	height: 175px;
	min-width: 150px;
	min-height: 150px;
	max-width: 200px;
	max-height: 200px;
	border-radius: 50%;
	background: linear-gradient(135deg, #b60f0f, #8c0d0d);
	color: #fff;
	font-size: 48px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
	box-shadow: 0 10px 24px rgba(182, 15, 15, 0.3);
	letter-spacing: 0.5px;
}
.kc-intro-name {
	font-size: 18px;
	font-weight: 600;
	color: var(--kc-text);
	margin: 0 0 8px 0;
}
.kc-intro-detail {
	margin: 4px 0;
	font-size: 14px;
	color: var(--kc-text-muted);
}
.kc-intro-group .kc-intro-group-name {
	font-size: 18px;
	font-weight: 700;
	color: var(--kc-text);
	margin: 0 0 12px 0;
}
.kc-intro-meta {
	margin: 6px 0;
	font-size: 15px;
	color: var(--kc-text);
}
.kc-intro-tags {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.kc-intro-tag {
	display: inline-block;
	padding: 6px 12px;
	background: var(--kc-primary-light);
	color: var(--kc-primary);
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
}
.kc-intro-guidelines {
	margin-bottom: 0;
}
.kc-intro-guidelines .kc-intro-heading {
	margin-bottom: 12px;
}
.kc-intro-guidelines-text {
	font-size: 13px;
	line-height: 1.65;
	color: var(--kc-text);
	letter-spacing: 0.5px;
}
.kc-intro-guidelines-text p {
	margin: 8px 0;
}
.kc-intro-heading {
	font-size: 16px;
	color: var(--kc-primary);
	margin: 0 0 12px 0;
	font-weight: 700;
}
.kc-intro-section p {
	margin: 6px 0;
	font-size: 15px;
	color: var(--kc-text);
}
.kc-intro-section ol {
	margin: 8px 0 0 0;
	padding-left: 20px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--kc-text);
}
.kc-intro-actions {
	margin-top: 28px;
	text-align: center;
}
.kc-btn-lg {
	padding: 16px 40px;
	font-size: 17px;
}
.kc-timer {
	display: inline-block;
	min-width: 70px;
	padding: 6px 12px;
	background: var(--kc-primary);
	color: #fff;
	border-radius: 8px;
	font-weight: 700;
	font-size: 16px;
	text-align: center;
	margin-left: 12px;
}
.kc-timer.kc-timer-low {
	background: var(--kc-error);
	animation: kcPulse 1s ease infinite;
}
@keyframes kcPulse {
	50% { opacity: 0.85; transform: scale(1.02); }
}

/* --- Progress & score box --- */
.kc-progress,
.kc-review-progress {
	font-size: 14px;
	color: var(--kc-text-muted);
	margin-bottom: 20px;
	font-weight: 500;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.kc-running-score {
	width: 100%;
	flex-basis: 100%;
	margin-top: 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--kc-text);
}
.kc-running-score #kcRunningScoreNum {
	color: var(--kc-primary);
}
.kc-progress-bar-wrap {
	flex: 1;
	height: 8px;
	background: var(--kc-border);
	border-radius: 4px;
	overflow: hidden;
}
.kc-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, var(--kc-primary), #e53935);
	border-radius: 4px;
	transition: width 0.5s ease;
}
.kc-score-box {
	text-align: center;
	padding: 28px 24px;
	margin-bottom: 28px;
	background: linear-gradient(135deg, var(--kc-success-bg) 0%, #c8e6c9 100%);
	border-radius: var(--kc-radius);
	border: 1px solid rgba(46, 125, 50, 0.2);
	animation: kcFadeIn 0.5s ease;
}
.kc-score-num {
	font-size: 32px;
	font-weight: 800;
	color: var(--kc-success);
	font-family: 'Inter', sans-serif;
	letter-spacing: 0.5px;
}

/* --- Question block --- */
.kc-q-block {
	margin: 20px 0;
}
.kc-q-block.kc-animate-in {
	animation: kcSlideIn 0.4s ease;
}
@keyframes kcSlideIn {
	from {
		opacity: 0;
		transform: translateX(-12px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}
/* Desktop: left = question, right = options + feedback/explanation */
.kc-q-block-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
@media (min-width: 768px) {
	.kc-q-block-inner {
		flex-direction: row;
		align-items: flex-start;
		gap: 28px;
	}
	.kc-q-left {
		flex: 0 0 calc(60% - 14px);
		min-width: 0;
	}
	.kc-q-right {
		flex: 0 0 calc(40% - 14px);
		min-width: 0;
	}
}
@media (max-width: 767px) {
	.kc-q-block-inner {
		flex-direction: column;
	}
}
/* Second row: answer/explanation full width (100%) */
.kc-q-answer-row {
	width: 100%;
	margin-top: 24px;
	box-sizing: border-box;
}
.kc-q-answer-row .kc-feedback,
.kc-q-answer-row .kc-answer-explanation,
.kc-q-answer-row .kc-review-row {
	max-width: 100%;
	overflow-wrap: break-word;
	word-wrap: break-word;
}
.kc-q-text {
	font-size: 17px;
	line-height: 1.6;
	margin-bottom: 20px;
	padding: 18px 20px;
	background: var(--kc-bg);
	border-radius: 10px;
	border-left: 4px solid var(--kc-primary);
	transition: box-shadow var(--kc-transition);
}
.kc-q-text:hover {
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* --- Options (quiz) --- */
.kc-opt {
	display: flex;
	align-items: flex-start;
	margin: 12px 0;
	padding: 14px 18px;
	border: 2px solid var(--kc-border);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color var(--kc-transition), background var(--kc-transition), transform 0.2s ease;
}
.kc-opt:hover {
	border-color: var(--kc-primary);
	background: var(--kc-primary-light);
	transform: translateX(4px);
}
.kc-opt input {
	margin-right: 14px;
	margin-top: 3px;
	accent-color: var(--kc-primary);
}
.kc-opt.correct {
	border-color: var(--kc-success);
	background: var(--kc-success-bg);
	animation: kcCorrectPulse 0.5s ease;
}
.kc-opt.wrong {
	border-color: var(--kc-error);
	background: var(--kc-error-bg);
}
@keyframes kcCorrectPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.01); }
}

/* --- Review options --- */
.kc-review-opts {
	margin: 20px 0;
}
.kc-review-opt {
	margin: 12px 0;
	padding: 14px 18px;
	border: 2px solid var(--kc-border);
	border-radius: 10px;
	font-size: 15px;
	transition: background var(--kc-transition), border-color var(--kc-transition);
}
.kc-review-opt.correct {
	background: var(--kc-success-bg);
	border-color: var(--kc-success);
	animation: kcFadeIn 0.4s ease;
}

/* --- Feedback & review rows --- */
.kc-feedback {
	margin-top: 20px;
	padding: 16px 20px;
	border-radius: 10px;
	font-weight: 600;
	display: none;
	animation: kcFadeIn 0.35s ease;
}
.kc-feedback.correct-msg {
	background: var(--kc-success-bg);
	color: var(--kc-success);
	display: block;
	border-left: 4px solid var(--kc-success);
}
.kc-feedback.wrong-msg {
	background: var(--kc-error-bg);
	color: var(--kc-error);
	display: block;
	border-left: 4px solid var(--kc-error);
}
.kc-review-row {
	margin: 12px 0;
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 15px;
	transition: opacity var(--kc-transition);
}
.kc-review-row.your-answer {
	background: #e3f2fd;
	border-left: 4px solid #1565c0;
}
.kc-review-row.your-answer.wrong {
	background: var(--kc-error-bg);
	border-left-color: var(--kc-error);
}
.kc-review-row.explanation {
	background: #fff8e1;
	border-left: 4px solid #f9a825;
	margin-top: 16px;
}
.kc-review-label {
	font-weight: 700;
	color: var(--kc-text);
	margin-right: 8px;
}

/* --- Buttons --- */
.kc-buttons {
	margin-top: 28px;
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	align-items: center;
}
.kc-btn {
	padding: 10px 22px;
	border: none;
	border-radius: 999px;
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.6px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kc-btn:focus {
	outline: none;
}
.kc-btn-primary {
	background: linear-gradient(135deg, #b60f0f, #8c0d0d);
	color: #fff;
	box-shadow: 0 12px 24px rgba(182, 15, 15, 0.26);
}
.kc-btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 32px rgba(182, 15, 15, 0.32);
}
.kc-btn-primary:active {
	transform: translateY(0);
}
.kc-btn-primary:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}
.kc-btn-secondary {
	background: #ffffff;
	color: #172b4d;
	border: 1px solid #dfe1e6;
	border-radius: 3px;
}
.kc-btn-secondary:hover {
	background: #f4f5f7;
	border-color: #c1c7d0;
	transform: translateY(-1px);
}

/* --- Score result (end of quiz) --- */
.kc-exam-finished {
	text-align: center;
	padding: 28px 24px;
	margin-bottom: 28px;
	background: linear-gradient(135deg, var(--kc-success-bg) 0%, #c8e6c9 100%);
	border-radius: var(--kc-radius);
	border: 1px solid rgba(46, 125, 50, 0.2);
	animation: kcFadeInUp 0.5s ease;
}
.kc-exam-finished .kc-score-line {
	display: flex;
	align-items: baseline;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}
.kc-exam-finished .kc-score-line .score-num {
	font-size: 48px;
	font-weight: 800;
	color: #b60f0f;
	font-family: 'Inter', sans-serif;
	margin: 0;
}
.kc-exam-finished .kc-score-heading {
	font-size: 20px;
	font-weight: 700;
	color: var(--kc-text);
	margin: 0 0 8px 0;
}
.kc-exam-finished .kc-score-line .kc-score-percent {
	font-size: 28px;
	font-weight: 700;
	color: var(--kc-primary);
	margin: 0;
}
.kc-exam-finished .kc-score-question-list {
	list-style: none;
	padding: 0;
	margin: 0 auto;
	max-width: 360px;
	text-align: left;
}
.kc-exam-finished .kc-score-item {
	padding: 8px 12px;
	margin: 6px 0;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 500;
}
.kc-exam-finished .kc-score-item.correct {
	background: var(--kc-success-bg);
	color: var(--kc-success);
	border: 1px solid rgba(46, 125, 50, 0.3);
}
.kc-exam-finished .kc-score-item.incorrect {
	background: var(--kc-error-bg);
	color: var(--kc-error);
	border: 1px solid rgba(198, 40, 40, 0.3);
}
.kc-score-box.show {
	display: block;
	animation: kcFadeInUp 0.5s ease;
}
.kc-score-box h2 {
	color: var(--kc-text);
	margin-bottom: 12px;
	font-size: 20px;
	font-weight: 700;
}
.kc-score-box.kc-review-score-box .kc-score-num {
	font-size: 48px;
	font-weight: 800;
	color: #b60f0f;
	font-family: 'Inter', sans-serif;
}
.kc-score-box .score-num {
	font-size: 48px;
	font-weight: 800;
	color: #b60f0f;
	font-family: 'Inter', sans-serif;
}

/* --- Loading --- */
.kc-loading {
	text-align: center;
	padding: 48px 24px;
	color: var(--kc-text-muted);
	font-size: 16px;
}
.kc-loading::after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-left: 10px;
	border: 2px solid var(--kc-primary);
	border-top-color: transparent;
	border-radius: 50%;
	animation: kcSpin 0.8s linear infinite;
	vertical-align: middle;
}
@keyframes kcSpin {
	to { transform: rotate(360deg); }
}

/* --- Back link / spacing --- */
.kc-exam-wrap > p {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--kc-border);
}

/* ========== Desktop view: ensure content is visible (overrides global styles) ========== */
@media (min-width: 768px) {
	body.kc-portal-body #main {
		width: 100% !important;
		max-width: none !important;
		display: block !important;
	}
	body.kc-portal-body .kc-portal-container {
		display: flex !important;
		width: 100% !important;
		min-width: 0 !important;
		flex-direction: column !important;
	}
	body.kc-portal-body .kc-content-area {
		display: block !important;
		width: 100% !important;
		max-width: 1200px !important;
		min-width: 0 !important;
		margin-left: auto !important;
		margin-right: auto !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
	body.kc-portal-body .kc-content-area.kc-has-sidebar {
		display: flex !important;
		flex-direction: row !important;
		max-width: none !important;
	}
	body.kc-portal-body .kc-content-area.kc-has-sidebar .kc-page {
		display: block !important;
		width: 80% !important;
		flex: 0 0 80% !important;
	}
	body.kc-portal-body .kc-filter-panel {
		display: block !important;
		width: 20% !important;
		flex: 0 0 20% !important;
	}
	body.kc-portal-body .kc-page {
		display: block !important;
		width: 100% !important;
		visibility: visible !important;
	}
	body.kc-portal-body .kc-wrap,
	body.kc-portal-body .kc-exam-wrap {
		display: block !important;
		width: 100% !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
	body.kc-portal-body .kc-wrap .kc-tabs,
	body.kc-portal-body #main .kc-tabs {
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
	body.kc-portal-body .kc-wrap .kc-panel,
	body.kc-portal-body #main .kc-panel {
		display: none !important;
	}
	body.kc-portal-body .kc-wrap .kc-panel.active,
	body.kc-portal-body #main .kc-panel.active {
		display: block !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
	body.kc-portal-body .kc-list,
	body.kc-portal-body #main .kc-list {
		display: grid !important;
		visibility: visible !important;
	}
}
