/*
 * Verbindet Generationen Bücherei: Buchtipps, Ausleihe und Katalog auf der Website.
 * Ergänzt das CSS der Bausteine des Grund-Plugins (Klasse .vgg-b mit der Hauptfarbe als --vgg-primary,
 * --vgg-on-primary, --vgg-primary-text). Schrift, Schriftgröße und Textfarbe kommen vom Theme; das Plugin setzt nur
 * Raster, Abstände, Linien und die Hauptfarbe. Mobil zuerst, keine fremden Ressourcen.
 */

.vgg-b ul.vgg-bue-liste {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
	gap: var(--vgg-b-gap, 1rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vgg-b ul.vgg-bue-liste > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vgg-b ul.vgg-bue-liste > li::before {
	content: none;
}

.vgg-b .vgg-bue-tipp {
	display: grid;
	gap: 0.75rem;
	height: 100%;
	padding: 1rem 1.1rem 1.1rem;
	border: 1px solid var(--vgg-b-line, rgba(0, 0, 0, 0.16));
	border-top: 4px solid var(--vgg-primary);
	border-radius: 8px;
}

.vgg-b .vgg-bue-tipp--bild {
	grid-template-columns: 5.5rem minmax(0, 1fr);
	align-items: start;
}

.vgg-b .vgg-bue-tipp__bild {
	margin: 0;
}

.vgg-b .vgg-bue-tipp__bild img {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 4px;
}

.vgg-b .vgg-bue-tipp__text {
	min-width: 0;
}

.vgg-b .vgg-bue-tipp p {
	margin: 0 0 0.35rem;
}

/* Eigene Zeile statt .vgg-b__meta: dort ist der Text leicht ausgeblendet, das würde die Marke blasser machen. */
.vgg-b .vgg-bue-tipp .vgg-bue-tipp__meta {
	font-size: 0.9em;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.5rem;
}

.vgg-b .vgg-bue-tipp .vgg-b__marke {
	margin-right: 0;
}

.vgg-b .vgg-bue-tipp :is(h2, h3, h4).vgg-b__titel {
	margin: 0 0 0.2rem;
	font-size: 1.2em;
	line-height: 1.3;
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.vgg-b .vgg-bue-tipp__autor {
	font-style: italic;
}

.vgg-b .vgg-bue-tipp .vgg-b__inhalt {
	margin-top: 0.35rem;
}

/* Ausleihe und Gebühren */

.vgg-b--ausleihe .vgg-b__inhalt {
	margin-bottom: 1rem;
}

.vgg-b table.vgg-bue-gebuehren {
	max-width: 36rem;
}

.vgg-b table.vgg-bue-gebuehren caption {
	margin: 0 0 0.35rem;
	font-weight: 700;
	text-align: left;
}

.vgg-b .vgg-bue-gebuehren thead th {
	font-size: 0.9em;
	opacity: 0.85;
}

.vgg-b .vgg-bue-gebuehren th[scope="row"] {
	width: 65%;
	font-weight: 400;
}

.vgg-b .vgg-bue-gebuehren td {
	white-space: nowrap;
}

/* Online-Katalog: Knopf in der Hauptfarbe, Schriftfarbe darauf mit Kontrast nach WCAG AA */

.vgg-b .vgg-bue-katalog {
	margin: 0 0 0.5rem;
}

.vgg-b a.vgg-bue-katalog__knopf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.65rem 1.5rem;
	border: 2px solid var(--vgg-primary);
	border-radius: 999px;
	background: var(--vgg-primary);
	color: var(--vgg-on-primary);
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
}

.vgg-b a.vgg-bue-katalog__knopf:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.vgg-b a.vgg-bue-katalog__knopf:focus-visible {
	outline: 3px solid var(--vgg-primary-text);
	outline-offset: 3px;
}
