/* Mariolee Tools – passt sich hellen und dunklen Themes an.
   Farben leiten sich von der Textfarbe des Themes ab (currentColor).
   Akzentfarbe anpassbar über: .mlt-stadtrat, .mlt-aff { --mlt-accent: #...; } */

.mlt-stadtrat,
.mlt-aff {
	--mlt-accent: #2563eb;
	--mlt-accent-text: #fff;
	--mlt-line: rgba(127, 127, 127, 0.3);
	--mlt-soft: rgba(127, 127, 127, 0.08);
	--mlt-muted: 0.72;
	--mlt-radius: 12px;
	box-sizing: border-box;
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
	.mlt-stadtrat,
	.mlt-aff {
		--mlt-line: color-mix(in srgb, currentColor 18%, transparent);
		--mlt-soft: color-mix(in srgb, currentColor 5%, transparent);
	}
}

@media (prefers-color-scheme: dark) {
	.mlt-stadtrat,
	.mlt-aff {
		--mlt-accent: #60a5fa;
		--mlt-accent-text: #0b1220;
	}
}

/* Viele Themes setzen eine Klasse statt prefers-color-scheme */
.is-dark-theme .mlt-stadtrat,
.is-dark-theme .mlt-aff,
.dark-mode .mlt-stadtrat,
.dark-mode .mlt-aff,
[data-theme="dark"] .mlt-stadtrat,
[data-theme="dark"] .mlt-aff {
	--mlt-accent: #60a5fa;
	--mlt-accent-text: #0b1220;
}

.mlt-stadtrat *,
.mlt-aff * {
	box-sizing: border-box;
}

.mlt-notice {
	padding: 0.75em 1em;
	border: 1px dashed var(--mlt-line, rgba(127, 127, 127, 0.4));
	border-radius: 8px;
	font-size: 0.9em;
}

/* ---------- Stadtrat-Übersicht ---------- */

.mlt-stadtrat {
	margin: 1.5em 0;
}

.mlt-filter {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin: 0 0 1rem;
}

@media (min-width: 640px) {
	.mlt-filter {
		grid-template-columns: 2fr 1fr 1fr;
		align-items: end;
	}
}

.mlt-field label {
	display: block;
	font-size: 0.8em;
	font-weight: 600;
	margin-bottom: 0.3em;
	opacity: var(--mlt-muted);
}

.mlt-field input,
.mlt-field select {
	width: 100%;
	min-height: 44px;
	padding: 0.5em 0.75em;
	font: inherit;
	color: inherit;
	background: var(--mlt-soft);
	border: 1px solid var(--mlt-line);
	border-radius: 8px;
	margin: 0;
}

.mlt-field select option {
	color: #111;
	background: #fff;
}

.mlt-field input:focus,
.mlt-field select:focus {
	outline: 2px solid var(--mlt-accent);
	outline-offset: 1px;
}

.mlt-count {
	font-size: 0.85em;
	opacity: var(--mlt-muted);
	margin: 0 0 0.75rem;
}

.mlt-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

/* Spalten richten sich nach der Breite des Inhaltsbereichs, nicht des Bildschirms */
.mlt-stadtrat {
	container-type: inline-size;
}

@container (min-width: 520px) {
	.mlt-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container (min-width: 740px) {
	.mlt-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.mlt-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	background: var(--mlt-soft);
	border: 1px solid var(--mlt-line);
	border-radius: var(--mlt-radius);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.mlt-card:hover {
	border-color: var(--mlt-accent);
}

.mlt-card[hidden] {
	display: none;
}

.mlt-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.6rem;
	font-size: 0.8em;
}

.mlt-card__meta time {
	opacity: var(--mlt-muted);
}

.mlt-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	border: 1px solid var(--mlt-accent);
	color: var(--mlt-accent);
	font-weight: 600;
	line-height: 1.4;
}

.mlt-card,
.mlt-card * {
	word-break: normal;
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.mlt-card__title {
	margin: 0;
	font-size: 1.05em;
	line-height: 1.3;
}

.mlt-card__title a {
	color: inherit;
	text-decoration: none;
}

.mlt-card__title a:hover,
.mlt-card__title a:focus {
	text-decoration: underline;
}

.mlt-card__excerpt {
	margin: 0;
	font-size: 0.92em;
	line-height: 1.5;
	opacity: 0.85;
	flex: 1;
}

.mlt-card__more {
	align-self: flex-start;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--mlt-accent);
	text-decoration: none;
}

.mlt-card__more:hover,
.mlt-card__more:focus {
	text-decoration: underline;
}

.mlt-empty {
	padding: 1.5em;
	text-align: center;
	border: 1px dashed var(--mlt-line);
	border-radius: var(--mlt-radius);
	opacity: var(--mlt-muted);
}

.mlt-empty[hidden] {
	display: none;
}

/* ---------- Affiliate-Boxen ---------- */

.mlt-aff {
	margin: 1.5em 0;
}

.mlt-aff__box {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	align-items: center;
	padding: 1.2rem;
	background: var(--mlt-soft);
	border: 1px solid var(--mlt-line);
	border-radius: var(--mlt-radius);
}

@media (min-width: 640px) {
	.mlt-aff__box {
		grid-template-columns: 140px 1fr;
	}
}

.mlt-aff__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 0.5rem;
	border-radius: 8px;
	background: #fff;
	border: 1px solid var(--mlt-line);
}

.mlt-aff__logo img {
	max-width: 100%;
	max-height: 56px;
	height: auto;
	width: auto;
	display: block;
}

.mlt-aff__name {
	font-weight: 700;
	font-size: 1.05em;
	color: #111;
}

.mlt-aff__text {
	margin: 0 0 0.8rem;
	line-height: 1.5;
}

.mlt-aff__button,
.mlt-aff__button:visited {
	display: inline-block;
	min-height: 44px;
	padding: 0.65em 1.2em;
	border-radius: 8px;
	background: var(--mlt-accent);
	color: var(--mlt-accent-text);
	font-weight: 600;
	text-decoration: none;
	line-height: 1.4;
}

.mlt-aff__button:hover,
.mlt-aff__button:focus {
	filter: brightness(1.08);
	text-decoration: none;
	color: var(--mlt-accent-text);
}

.mlt-aff__risk {
	grid-column: 1 / -1;
	margin: 0;
	padding: 0.75em 0.9em;
	font-size: 0.85em;
	line-height: 1.45;
	border-left: 3px solid #d97706;
	background: rgba(217, 119, 6, 0.1);
	border-radius: 4px;
}

.mlt-aff__label {
	margin: 0.35em 0 0;
	font-size: 0.75em;
	opacity: var(--mlt-muted);
	text-align: right;
}
