/* Planlos am Plektrum – Übungswerkzeug
 * Globale Materialdarstellung.
 *
 * Unterstützt gleichzeitig:
 * - bisherige laufende Einheit mit .pap-einheit__materialliste
 * - gemeinsamen Renderer mit .pap-materialliste
 *
 * Voraussetzung:
 * Das globale Werkzeug-Farbsnippet ist aktiv.
 */

body .pap-einheit__materialliste,
body .pap-materialliste {
	display: grid;
	gap: 0.9rem;
}

body .pap-materialeintrag {
	display: grid;
	gap: 0.35rem;
	min-width: 0;
}

/* Linkkarten */

body .pap-einheit__materialliste .pap-materialkarte,
body .pap-materialliste .pap-materialkarte {
	display: grid;
	grid-template-columns: 5rem minmax(0, 1fr);
	grid-template-areas:
		"symbol typ"
		"symbol titel"
		"symbol aktion";
	column-gap: 1rem;
	align-items: center;
	width: 100%;
	padding: 1rem;
	border: 1px solid var(--pap-border);
	border-radius: 4px;
	background: var(--pap-flaeche-betont);
	color: inherit;
	font-family: inherit;
	text-decoration: none;
	box-sizing: border-box;
	min-width: 0;
}

body .pap-einheit__materialliste .pap-materialkarte:hover,
body .pap-einheit__materialliste .pap-materialkarte:focus-visible,
body .pap-materialliste .pap-materialkarte:hover,
body .pap-materialliste .pap-materialkarte:focus-visible {
	border-color: var(--pap-petrol);
	background: var(--pap-auswahl);
	color: inherit;
}

/* Symbolfläche */

body .pap-einheit__materialliste .pap-materialkarte::before,
body .pap-materialliste .pap-materialkarte::before {
	grid-area: symbol;
	display: grid;
	place-items: center;
	width: 5rem;
	aspect-ratio: 4 / 3;
	border-radius: 3px;
	background: var(--pap-petrol);
	color: var(--base-3);
	font-family: system-ui, sans-serif;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	content: "LINK";
}

body .pap-einheit__materialliste .pap-materialkarte--youtube::before,
body .pap-materialliste .pap-materialkarte--youtube::before {
	content: "▶";
	font-size: 1.55rem;
}

body .pap-einheit__materialliste .pap-materialkarte--songsterr::before,
body .pap-einheit__materialliste .pap-materialkarte--tabulatur::before,
body .pap-materialliste .pap-materialkarte--songsterr::before,
body .pap-materialliste .pap-materialkarte--tabulatur::before {
	content: "TAB";
}

body .pap-einheit__materialliste .pap-materialkarte--backing-track::before,
body .pap-materialliste .pap-materialkarte--backing-track::before {
	content: "PLAY";
}

body .pap-einheit__materialliste .pap-materialkarte--originalaufnahme::before,
body .pap-materialliste .pap-materialkarte--originalaufnahme::before {
	content: "AUDIO";
}

body .pap-einheit__materialliste .pap-materialkarte--blogbeitrag::before,
body .pap-materialliste .pap-materialkarte--blogbeitrag::before {
	content: "TEXT";
}

body .pap-einheit__materialliste .pap-materialkarte--sonstiger-link::before,
body .pap-materialliste .pap-materialkarte--sonstiger-link::before {
	content: "LINK";
}

/* Kartentext */

body .pap-einheit__materialliste .pap-materialkarte__typ,
body .pap-materialliste .pap-materialkarte__typ {
	grid-area: typ;
	display: block;
	margin: 0;
	color: var(--pap-text-zart);
	font-family: system-ui, sans-serif;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	min-width: 0;
}

body .pap-einheit__materialliste .pap-materialkarte__titel,
body .pap-materialliste .pap-materialkarte__titel {
	grid-area: titel;
	display: -webkit-box;
	margin: 0.12rem 0 0;
	overflow: hidden;
	color: inherit;
	font-family: system-ui, sans-serif;
	font-weight: 400;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	min-width: 0;
}

body .pap-einheit__materialliste .pap-materialkarte__aktion,
body .pap-materialliste .pap-materialkarte__aktion {
	grid-area: aktion;
	display: inline-block;
	width: max-content;
	margin-top: 0.5rem;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.16em;
}

/* Text außerhalb der Karte */

body .pap-materialeintrag__titel {
	display: block;
	margin: 0.15rem 0 0;
	color: var(--pap-text);
	font-family: system-ui, sans-serif;
	font-weight: 700;
	line-height: 1.35;
}

body .pap-materialeintrag__notiz {
	display: block;
	margin: 0;
	color: var(--pap-text-zart);
	line-height: 1.45;
}

/* Übergang: alte Ausgabe mit Notiz innerhalb der Karte */

body .pap-einheit__materialliste .pap-materialkarte__notiz {
	grid-area: notiz;
	display: block;
	margin-top: 0.3rem;
	color: var(--pap-text-zart);
	line-height: 1.45;
}

/* Bevorzugtes Material */

body .pap-einheit__materialliste .pap-materialkarte--bevorzugt,
body .pap-materialliste .pap-materialkarte--bevorzugt {
	border-width: 2px;
	border-color: var(--pap-petrol);
	background: var(--pap-auswahl);
}

/* Grafiken */

body .pap-einheit__materialliste figure.pap-materialkarte,
body .pap-materialliste figure.pap-materialkarte {
	display: block;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

body .pap-einheit__materialliste figure.pap-materialkarte::before,
body .pap-materialliste figure.pap-materialkarte::before {
	display: none;
}

body .pap-einheit__materialliste .pap-materialkarte__grafiklink,
body .pap-materialliste .pap-materialkarte__grafiklink {
	display: block;
	background: var(--pap-eingabe);
}

body .pap-einheit__materialliste .pap-materialkarte__bild,
body .pap-materialliste .pap-materialkarte__bild {
	display: block;
	width: 100%;
	height: auto;
	max-height: 32rem;
	object-fit: contain;
}

/* Übergang: alte Grafikbeschriftung */

body .pap-einheit__materialliste .pap-materialkarte__beschriftung {
	display: grid;
	gap: 0.25rem;
	padding: 0.85rem 1rem 0.95rem;
	border-top: 1px solid var(--pap-border);
}

body .pap-einheit__materialliste
.pap-materialkarte__beschriftung
.pap-materialkarte__titel,
body .pap-einheit__materialliste
.pap-materialkarte__beschriftung
.pap-materialkarte__notiz {
	grid-area: auto;
	margin: 0;
}

/* Mobil */

@media (max-width: 640px) {
	body .pap-einheit__materialliste .pap-materialkarte,
	body .pap-materialliste .pap-materialkarte {
		grid-template-columns: 4rem minmax(0, 1fr);
		column-gap: 0.8rem;
		padding: 0.85rem;
	}

	body .pap-einheit__materialliste .pap-materialkarte::before,
	body .pap-materialliste .pap-materialkarte::before {
		width: 4rem;
	}

	body .pap-einheit__materialliste .pap-materialkarte__bild,
	body .pap-materialliste .pap-materialkarte__bild {
		max-height: none;
	}
}
