/**
 * Lokale Darstellung der KI-Bildkennzeichnung.
 *
 * Die Grundfarben sind ohne Unschärfe bewusst deckend genug für sicheren
 * Kontrast. backdrop-filter ist nur eine progressive optische Verfeinerung.
 */
.mgd-ail-image-wrapper {
	position: relative;
	display: inline-block;
	max-width: 100%;
	vertical-align: top;
}

.mgd-ail-image-wrapper > img,
.mgd-ail-image-wrapper > picture,
.mgd-ail-image-wrapper > a {
	display: block;
	max-width: 100%;
}

.mgd-ail-badge {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	max-width: calc(100% - 24px);
	padding: 5px 9px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 999px;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.32);
	font-family: Arial, "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-align: left;
	text-transform: uppercase;
	pointer-events: none;
}

.mgd-ail-position-top-left { top: 12px; left: 12px; }
.mgd-ail-position-top-right { top: 12px; right: 12px; }
.mgd-ail-position-bottom-left { bottom: 12px; left: 12px; }
.mgd-ail-position-bottom-right { right: 12px; bottom: 12px; }

/* Sicherer Fallback: Auch Browser ohne Glas-Unschärfe zeigen klaren Text. */
.mgd-ail-theme-auto,
.mgd-ail-theme-dark {
	background: rgba(20, 23, 29, 0.92);
	border-color: rgba(255, 255, 255, 0.72);
	color: #ffffff;
}

.mgd-ail-theme-light {
	background: rgba(255, 255, 255, 0.94);
	border-color: rgba(25, 28, 33, 0.28);
	color: #15171b;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
}

/* Der ausführliche Deepfake-Hinweis bleibt für Screenreader erreichbar,
 * benötigt aber keine globale WordPress- oder Theme-Klasse. */
.mgd-ail-badge .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
	.mgd-ail-theme-auto,
	.mgd-ail-theme-dark {
		background: rgba(20, 23, 29, 0.76);
		-webkit-backdrop-filter: blur(10px) saturate(130%);
		backdrop-filter: blur(10px) saturate(130%);
	}

	.mgd-ail-theme-light {
		background: rgba(255, 255, 255, 0.78);
		-webkit-backdrop-filter: blur(10px) saturate(125%);
		backdrop-filter: blur(10px) saturate(125%);
	}
}

@media (max-width: 480px) {
	.mgd-ail-badge {
		min-height: 26px;
		padding: 4px 8px;
		font-size: 11px;
	}

	.mgd-ail-position-top-left { top: 8px; left: 8px; }
	.mgd-ail-position-top-right { top: 8px; right: 8px; }
	.mgd-ail-position-bottom-left { bottom: 8px; left: 8px; }
	.mgd-ail-position-bottom-right { right: 8px; bottom: 8px; }
}

/* Das Badge ist statisch; diese Regel verhindert spätere Animationen bei
 * Menschen, die in ihrem Betriebssystem reduzierte Bewegung ausgewählt haben. */
@media (prefers-reduced-motion: reduce) {
	.mgd-ail-badge {
		transition: none;
		animation: none;
	}
}
