/**
 * Easy Downloads – Frontend.
 *
 * Die Defaults orientieren sich an ruhigen, großzügigen Karten-/CTA-Layouts.
 * Farben und Typografie erben bevorzugt Elementor Global Styles und bleiben
 * vollständig über Elementor bzw. Shortcode-CSS-Variablen überschreibbar.
 */

.ded-downloads {
	--ded-primary: var(--e-global-color-primary, #1f2933);
	--ded-accent: var(--e-global-color-accent, var(--ded-primary));
	--ded-text: var(--e-global-color-text, #4a5560);
	--ded-card-bg: #fff;
	--ded-border: rgba(31, 41, 51, 0.10);
	--ded-radius: 18px;
	--ded-gap: 20px;
	--ded-columns: 3;

	display: grid;
	gap: var(--ded-gap);
	width: 100%;
	max-width: 100%;
	color: var(--ded-text);
	font-family: var(--e-global-typography-text-font-family, inherit);
}

.ded-downloads--cards {
	grid-template-columns: repeat(var(--ded-columns), minmax(0, 1fr));
}

.ded-downloads--list,
.ded-downloads--compact {
	grid-template-columns: 1fr;
}

.ded-download-item {
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--ded-border);
	border-radius: var(--ded-radius);
	background: var(--ded-card-bg);
	box-shadow: 0 10px 32px rgba(31, 41, 51, 0.055);
	color: var(--ded-text);
}

.ded-downloads--list .ded-download-item {
	display: grid;
	grid-template-columns: minmax(180px, 30%) minmax(0, 1fr);
}

.ded-downloads--list .ded-download-item--no-thumb {
	grid-template-columns: 1fr;
}

.ded-downloads--compact .ded-download-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 16px;
}

.ded-download-thumb {
	display: block;
	width: 100%;
	height: 220px;
	overflow: hidden;
	background: rgba(31, 41, 51, 0.04);
}

.ded-downloads--list .ded-download-thumb {
	height: 100%;
	min-height: 190px;
}

.ded-download-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ded-download-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 9px;
	min-width: 0;
	padding: 20px;
}

.ded-downloads--compact .ded-download-content {
	flex: 1 1 auto;
	gap: 3px;
	padding: 0;
}

.ded-download-category {
	display: inline-flex;
	align-items: center;
	padding: 5px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ded-primary) 8%, transparent);
	color: var(--ded-primary);
	font-size: 0.78em;
	font-weight: 700;
	line-height: 1.2;
}

@supports not (background: color-mix(in srgb, #000 8%, transparent)) {
	.ded-download-category {
		background: rgba(31, 41, 51, 0.06);
	}
}

.ded-download-year {
	color: var(--ded-primary);
	font-size: 0.86em;
	font-weight: 700;
	line-height: 1.25;
}

.ded-download-title {
	margin: 0;
	color: var(--ded-primary);
	font-family: var(--e-global-typography-primary-font-family, inherit);
	font-size: 1.16em;
	font-weight: var(--e-global-typography-primary-font-weight, 700);
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.ded-download-title a {
	color: inherit;
	text-decoration: none;
}

.ded-download-title a:hover,
.ded-download-title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.16em;
}

.ded-download-description {
	margin: 0;
	color: var(--ded-text);
	line-height: 1.55;
}

.ded-download-meta {
	color: var(--ded-text);
	font-size: 0.86em;
	line-height: 1.35;
	opacity: 0.76;
}

.ded-download-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-top: 4px;
	padding: 11px 17px;
	border: 1px solid var(--ded-primary);
	border-radius: 999px;
	background: var(--ded-primary);
	color: #fff;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: transform .15s ease, opacity .15s ease;
}

.ded-download-button:hover,
.ded-download-button:focus-visible {
	color: #fff;
	opacity: .88;
	transform: translateY(-1px);
	text-decoration: none;
}

.ded-download-button:focus-visible,
.ded-download-title a:focus-visible {
	outline: 2px solid var(--ded-primary);
	outline-offset: 3px;
}

.ded-download-file-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--ded-primary) 8%, transparent);
	color: var(--ded-primary);
	font-size: 22px;
}

.ded-downloads--compact .ded-download-title {
	font-size: 1em;
}

.ded-downloads--compact .ded-download-button {
	margin-top: 0;
}

.ded-downloads-empty {
	margin: 0;
	font-style: italic;
	opacity: .72;
}


@media (max-width: 767px) {
	.ded-downloads--cards {
		grid-template-columns: 1fr;
	}

	.ded-downloads--list .ded-download-item {
		grid-template-columns: 1fr;
	}

	.ded-downloads--list .ded-download-thumb {
		height: 220px;
		min-height: 0;
	}

	.ded-downloads--compact .ded-download-item {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.ded-downloads--compact .ded-download-button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ded-download-button {
		transition: none;
	}

	.ded-download-button:hover,
	.ded-download-button:focus-visible {
		transform: none;
	}
}
