/* Lernkarten on the student page (mobileScan.php): link card in a help, links in the feedback of building blocks
   (js/qrBausteine.js) and the overlay (js/lernkarten.js).
   Colors with transparency and currentColor, so it works with mobileStyle.css and mobileStyleDark.css */

/* ---------- card in a help: "Bring mir die Theorie bei" ---------- */
.qrLernkarteBlock {
	margin: 1rem 0;
}
.qrLernkarteKarte {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.8rem 0.9rem;
	border: 1px solid rgba(59, 130, 246, 0.45);
	border-radius: 0.9rem;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(16, 185, 129, 0.09));
	color: inherit;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.qrLernkarteKarte:hover,
.qrLernkarteKarte:focus {
	color: inherit;
	text-decoration: none;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(16, 185, 129, 0.14));
	box-shadow: 0 3px 10px rgba(59, 130, 246, 0.18);
}
.qrLernkarteKarte:active {
	transform: scale(0.985);
}
.qrLernkarteIcon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 0.75rem;
	background: linear-gradient(135deg, #3B82F6, #2563EB);
	color: #fff;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}
.qrLernkarteText {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.qrLernkarteEyebrow {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	opacity: 0.7;
}
.qrLernkarteTitel {
	font-weight: 700;
	line-height: 1.3;
}
.qrLernkarteChevron {
	flex: 0 0 auto;
	font-size: 1.7rem;
	line-height: 1;
	opacity: 0.45;
}

/* ---------- link in the feedback of a building block ---------- */
.qrLernkarteLink {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 0.6rem;
	padding: 0.5rem 0.6rem;
	border: 1px solid rgba(59, 130, 246, 0.5);
	border-radius: 0.6rem;
	background: rgba(59, 130, 246, 0.08);
	color: inherit;
	line-height: 1.3;
	text-decoration: none;
}
.qrLernkarteLink:hover,
.qrLernkarteLink:focus {
	color: inherit;
	text-decoration: none;
	background: rgba(59, 130, 246, 0.18);
}
.qrLernkarteLink svg {
	flex: 0 0 auto;
	width: 1.3rem;
	height: 1.3rem;
	color: #3B82F6;
}
.qrLernkarteLinkText {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.qrLernkarteLinkEyebrow {
	font-size: 0.75rem;
	opacity: 0.75;
}
.qrLernkarteLinkTitel {
	font-size: 0.95rem;
	font-weight: 600;
}
.qrLernkarteLink .qrLernkarteChevron {
	font-size: 1.4rem;
}

/* ---------- graphic of a Lernkarte (building block "grafik") ---------- */
.qrBausteinGrafik svg {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

/* ---------- overlay ---------- */
html.lkGesperrt,
html.lkGesperrt body {
	overflow: hidden;
}
.lkOverlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2000;
}
.lkOverlay.lkOffen {
	display: block;
}
.lkHintergrund {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.2s ease;
}
.lkPanel {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	background-color: #fff; /* replaced by the page background in js/lernkarten.js */
	color: inherit;
	opacity: 0;
	transform: translateY(28px);
	transition: transform 0.25s ease, opacity 0.2s ease;
}
.lkSichtbar .lkHintergrund { opacity: 1; }
.lkSichtbar .lkPanel { opacity: 1; transform: none; }
@media (min-width: 768px) {
	.lkPanel {
		top: 4vh;
		bottom: 4vh;
		left: 50%;
		right: auto;
		width: min(760px, 94vw);
		margin-left: calc(min(760px, 94vw) / -2);
		border-radius: 1rem;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
		overflow: hidden;
	}
}
@media (prefers-reduced-motion: reduce) {
	.lkPanel, .lkHintergrund { transition: none; }
}

.lkKopf {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.55rem 0.5rem 0.55rem 0.4rem;
	border-bottom: 1px solid rgba(134, 142, 150, 0.3);
}
.lkKopfKnopf {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	color: inherit;
}
.lkKopfKnopf:hover,
.lkKopfKnopf:focus {
	color: inherit;
	background: rgba(134, 142, 150, 0.16);
}
.lkKopfText {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
}
.lkEyebrow {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #3B82F6;
}
.lkTitel {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* path: Aufgabe › card › card (scrolls sideways) */
.lkPfad {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.45rem 0.9rem;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
	font-size: 0.82rem;
	border-bottom: 1px solid rgba(134, 142, 150, 0.2);
}
.lkPfad::-webkit-scrollbar { display: none; }
.lkPfadSchritt {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	max-width: 14rem;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: rgba(134, 142, 150, 0.14);
	color: inherit;
	text-decoration: none;
}
.lkPfadSchritt span {
	overflow: hidden;
	text-overflow: ellipsis;
}
a.lkPfadSchritt:hover,
a.lkPfadSchritt:focus {
	color: inherit;
	text-decoration: none;
	background: rgba(134, 142, 150, 0.26);
}
.lkPfadAktuell {
	background: rgba(59, 130, 246, 0.18);
	font-weight: 600;
}
.lkPfadTrenner {
	opacity: 0.45;
}

.lkInhalt {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 1rem 1rem 2rem;
}
@media (min-width: 768px) {
	.lkInhalt { padding: 1.25rem 1.75rem 2rem; }
}

.lkAbschnitt + .lkAbschnitt {
	margin-top: 1.4rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(134, 142, 150, 0.25);
}
.lkAbschnittTitel {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 700;
}
.lkNummer {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: #3B82F6;
	color: #fff;
	font-size: 0.9rem;
}
.lkText p { word-break: break-word; }
.lkText img { max-width: 100%; height: auto; }
.lkText iframe { max-width: 100%; }

/* network: previous knowledge and next cards */
.lkNetz {
	margin-top: 1.75rem;
	display: grid;
	gap: 1rem;
}
.lkGruppe {
	padding: 0.85rem;
	border-radius: 0.9rem;
	background: rgba(134, 142, 150, 0.09);
}
.lkGruppenKopf {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-bottom: 0.55rem;
}
.lkGruppenName {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.lkVorwissen .lkGruppenName { color: #D97706; }
.lkWeiter .lkGruppenName { color: #059669; }
.lkGruppenText {
	font-size: 0.9rem;
	opacity: 0.75;
}
.lkVerweis {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.65rem 0.6rem;
	border-radius: 0.65rem;
	color: inherit;
	text-decoration: none;
}
.lkVerweis + .lkVerweis {
	margin-top: 0.2rem;
}
.lkVerweis:hover,
.lkVerweis:focus {
	color: inherit;
	text-decoration: none;
	background: rgba(134, 142, 150, 0.16);
}
.lkVerweisIcon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 0.6rem;
	color: #fff;
}
.lkVorwissen .lkVerweisIcon { background: #F59E0B; }
.lkWeiter .lkVerweisIcon { background: #10B981; }
.lkVerweisTitel {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	line-height: 1.3;
}
.lkVerweisPfeil {
	flex: 0 0 auto;
	font-size: 1.5rem;
	line-height: 1;
	opacity: 0.4;
}
.lkBesucht .lkVerweisTitel::after {
	content: " · schon angesehen";
	font-weight: 400;
	font-size: 0.85em;
	opacity: 0.6;
}

.lkKnopf {
	display: block;
	margin-top: 1.25rem;
	padding: 0.75rem 1rem;
	border-radius: 0.65rem;
	background: #3B82F6;
	color: #fff;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
.lkKnopf:hover,
.lkKnopf:focus {
	color: #fff;
	text-decoration: none;
	background: #2563EB;
}

/* loading and error */
.lkLaden span {
	display: block;
	height: 1rem;
	margin: 0.9rem 0;
	border-radius: 0.4rem;
	background: linear-gradient(90deg, rgba(134, 142, 150, 0.12), rgba(134, 142, 150, 0.28), rgba(134, 142, 150, 0.12));
	background-size: 200% 100%;
	animation: lkSchimmer 1.2s ease-in-out infinite;
}
.lkLaden span:nth-child(1) { width: 55%; height: 1.4rem; }
.lkLaden span:nth-child(3) { width: 80%; }
@keyframes lkSchimmer {
	from { background-position: 200% 0; }
	to { background-position: -200% 0; }
}
.lkFehler {
	padding: 1rem;
	border-radius: 0.6rem;
	background: rgba(201, 42, 42, 0.12);
}
