/* Toolkit for LearnDash LMS - shared front-end base */

.tkflld-progress {
	position: relative;
	height: 26px;
	margin: 0 0 16px;
	background: rgba(127, 127, 127, 0.18);
	border-radius: var(--tkflld-radius, 10px);
	overflow: hidden;
}
.tkflld-progress[hidden] { display: none; }
.tkflld-progress__fill {
	height: 100%;
	width: 0;
	background: var(--tkflld-primary, #2563eb);
	transition: width 0.3s ease;
}
.tkflld-progress__label {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	mix-blend-mode: normal;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Visible keyboard focus for quiz controls (accessibility). */
.wpProQuiz_content .wpProQuiz_button:focus-visible,
.wpProQuiz_content input[type="text"]:focus-visible,
.wpProQuiz_content .wpProQuiz_questionListItem label:focus-within {
	outline: 3px solid var(--tkflld-primary, #2563eb);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.tkflld-progress__fill { transition: none; }
}

/* Learner results shortcode / block */
.tkflld-results { width: 100%; border-collapse: collapse; margin: 1em 0; }
.tkflld-results th,
.tkflld-results td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(127, 127, 127, 0.25); }
.tkflld-results .tkflld-pass { color: var(--tkflld-accent, #16a34a); font-weight: 600; }
.tkflld-results .tkflld-fail { color: var(--tkflld-danger, #dc2626); font-weight: 600; }
.tkflld-empty { padding: 12px 16px; border-left: 4px solid var(--tkflld-primary, #2563eb); background: rgba(127, 127, 127, 0.1); }
@media (max-width: 600px) {
	.tkflld-results thead { display: none; }
	.tkflld-results tr { display: block; margin-bottom: 12px; border: 1px solid rgba(127, 127, 127, 0.25); border-radius: var(--tkflld-radius, 10px); }
	.tkflld-results td { display: flex; justify-content: space-between; border: 0; }
	.tkflld-results td::before { content: attr(data-label); font-weight: 600; margin-right: 12px; }
}

/* Screen-reader only text */
.tkflld-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* Encouraging message */
.tkflld-feedback {
	margin: 0 0 14px;
	padding: 12px 16px;
	border-left: 4px solid var(--tkflld-primary, #2563eb);
	background: rgba(127, 127, 127, 0.1);
	border-radius: calc(var(--tkflld-radius, 10px) * 0.6);
	font-weight: 600;
}

/* Larger touch targets on small screens */
@media (pointer: coarse) {
	.wpProQuiz_content .wpProQuiz_button,
	.wpProQuiz_content .wpProQuiz_questionListItem label { min-height: 44px; }
}

/* High-contrast mode */
.tkflld-high-contrast .wpProQuiz_content,
.tkflld-high-contrast .wpProQuiz_content label { color: #000; }
.tkflld-high-contrast .wpProQuiz_content .wpProQuiz_questionListItem { border: 2px solid #000; background: #fff; }
.tkflld-high-contrast .wpProQuiz_content .wpProQuiz_button { background: #000; color: #fff; border: 2px solid #000; }
.tkflld-high-contrast .wpProQuiz_content input[type="text"],
.tkflld-high-contrast .wpProQuiz_content textarea { border: 2px solid #000; }
.tkflld-high-contrast .wpProQuiz_content a { text-decoration: underline; }
