/* Downloads-Sektion der Ressourcen-Detailseite (MKT-976).
   Aufklappbar, mit Border oben/unten (wie eine Navigation), über dem Inhaltsverzeichnis.
   Wird per downloads.js in einen gemeinsamen Sticky-Wrapper mit der TOC gehängt. */

/* Gemeinsamer Sticky-Container: Downloads + TOC scrollen zusammen mit. */
.td-sidebar-sticky {
	align-self: start;
	position: sticky;
	top: 120px;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
/* Im Wrapper übernimmt der Wrapper das Sticky – die TOC selbst wird statisch,
   damit nicht zwei Sticky-Ebenen kollidieren. (Ohne Downloads bleibt die TOC
   wie bisher eigenständig sticky, siehe ressource-single.css.) */
.td-sidebar-sticky #brxe-tocwrp {
	position: static !important;
	top: auto !important;
}

/* --- Downloads-Sektion --- */
.td-dl {
	border-top: 1px solid var(--td-border, #e3e7ec);
	border-bottom: 1px solid var(--td-border, #e3e7ec);
	text-align: left;
	gap: 0;
}
.td-dl__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 12px 2px;
	background: none;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 1.4rem;
	font-weight: 600;
	color: var(--td-charcoal, #1f2937);
	text-align: left;
}
.td-dl__chev {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	color: var(--td-muted, #6b7280);
	transition: transform 0.2s ease;
}
.td-dl:not(.is-open) .td-dl__chev {
	transform: rotate(-90deg);
}

.td-dl__list {
	list-style: none;
	margin: 0;
	padding: 0 0 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
}
.td-dl:not(.is-open) .td-dl__list {
	display: none;
}

.td-dl__item {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	padding: 5px 6px;
	border-radius: 8px;
	text-decoration: none;
	text-align: left;
	color: var(--td-charcoal, #1f2937);
}
.td-dl__item:hover {
	background: var(--td-green-50, #eef6f2);
}
.td-dl__icon {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	color: var(--primary, #db1f3e);
}
.td-dl__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.td-dl__label {
	font-weight: 600;
	font-size: 1.4rem;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.td-dl__meta {
	font-size: 0.8rem;
	letter-spacing: 0.03em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--td-muted, #6b7280);
}

/* Auf schmalen Screens klappt die Sidebar in den Fluss (wie die TOC) – kein Sticky. */
@media (max-width: 991px) {
	.td-sidebar-sticky {
		position: static;
	}
}
