/* Modul 9 „Inhalte Downloads“ – nur Klassen .bni-dl-…
   Markup: project/lib/BniDownloads.php */

.bni-dl {
	margin: 1.5rem 0;
}
.bni-dl--grey {
	background: #f2f2f2;
	padding: 1.25rem;
	border-radius: 6px;
}
.bni-dl--line {
	padding-bottom: 1.5rem;
	border-bottom: 2px solid #cf2030;
}
.bni-dl--grey.bni-dl--line {
	border-radius: 6px 6px 0 0;
}
.bni-dl-headline {
	margin: 0 0 1rem;
}

.bni-dl-grid,
.bni-dl-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
/* bni20.css: main ul li::before (roter Punkt) – hier nicht gewünscht */
.bni-dl-grid > li::before,
.bni-dl-list > li::before {
	content: none;
	display: none;
}

/* ---------- Kacheln ---------- */
.bni-dl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: 1rem;
}
.bni-dl-grid > li {
	display: flex;
	min-width: 0;
}

.bni-dl-item {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	width: 100%;
	padding: 0.75rem;
	background: #fff;
	border: 1px solid #c8c8c8;
	border-radius: 6px;
	color: #000;
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s;
}
.bni-dl-item:hover,
.bni-dl-item:focus-visible {
	border-color: #cf2030;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	color: #000;
	text-decoration: none;
}
.bni-dl-item:focus-visible {
	outline: 2px solid #cf2030;
	outline-offset: 2px;
}

.bni-dl-thumb {
	flex: 0 0 64px;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f2f2f2;
	border-radius: 4px;
	overflow: hidden;
}
.bni-dl-thumb img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
.bni-dl-thumb i {
	font-size: 2rem;
	color: #cf2030;
}

.bni-dl-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}
.bni-dl-title {
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.bni-dl-item:hover .bni-dl-title,
.bni-dl-item:focus-visible .bni-dl-title {
	color: #cf2030;
}
.bni-dl-desc {
	font-size: 0.875rem;
	line-height: 1.35;
	color: #64666a;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bni-dl-meta {
	font-size: 0.8rem;
	color: #64666a;
}

.bni-dl-action {
	flex: 0 0 auto;
	align-self: center;
	color: #64666a;
	font-size: 1rem;
}
.bni-dl-item:hover .bni-dl-action,
.bni-dl-item:focus-visible .bni-dl-action {
	color: #cf2030;
}

/* ---------- Liste ---------- */
.bni-dl-list {
	background: #fff;
	border: 1px solid #c8c8c8;
	border-radius: 6px;
	overflow: hidden;
}
.bni-dl-list > li + li {
	border-top: 1px solid #f2f2f2;
}
.bni-dl-list .bni-dl-item {
	align-items: center;
	border: 0;
	border-radius: 0;
	padding: 0.5rem 0.75rem;
}
.bni-dl-list .bni-dl-item:hover,
.bni-dl-list .bni-dl-item:focus-visible {
	box-shadow: none;
	background: #f2f2f2;
}
.bni-dl-list .bni-dl-thumb {
	flex-basis: 36px;
	height: 36px;
	background: transparent;
}
.bni-dl-list .bni-dl-thumb i {
	font-size: 1.4rem;
}
.bni-dl-list .bni-dl-body {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 0.75rem;
}
.bni-dl-list .bni-dl-title {
	min-width: 0;
	max-width: 100%;
}
.bni-dl-list .bni-dl-desc {
	flex-basis: 100%;
	order: 3;
	-webkit-line-clamp: 1;
}

@media (max-width: 575.98px) {
	.bni-dl-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.bni-dl--grey {
		padding: 1rem;
	}
	.bni-dl-list .bni-dl-body {
		flex-direction: column;
		align-items: flex-start;
	}
}
