/* KI-Kennzeichnung – Overlay-Darstellung */

.mvaik-overlay {
	position: relative;
	display: inline-block;
	line-height: 0;
	max-width: 100%;
}

/* :where() hält die Spezifität niedrig (wie bisher .mvaik-overlay img) und nimmt
   Wrapper im Füll-Modus aus, damit dort die Bildregeln des Themes greifen. */
.mvaik-overlay:where(:not(.mvaik-overlay--fill):not(.mvaik-overlay--stretch)) img {
	max-width: 100%;
	height: auto;
}

/* Füll-Modus: Das Theme positioniert das Bild absolut in einem Kasten mit festem
   Seitenverhältnis (z. B. Elementor-Raster). Der Wrapper muss dann den Kasten
   ausfüllen, sonst wird er zum 0×0 großen Bezugsrahmen und das Bild schrumpft.
   Die Klasse setzt frontend.js, sobald es ein absolut positioniertes Bild erkennt. */
.mvaik-overlay.mvaik-overlay--fill {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	max-width: none;
}

/* Elternkasten mit aspect-ratio, Bild im normalen Fluss: Wrapper streckt sich
   auf die volle Kastengröße, damit height:100% am Bild weiter greift. */
.mvaik-overlay.mvaik-overlay--stretch {
	display: block;
	width: 100%;
	height: 100%;
}

/* Bekannte Elementor-Raster (Posts- und Portfolio-Widget mit Bildverhältnis)
   direkt per CSS, damit dort schon vor dem Skript nichts springt. Nur mit
   .elementor-has-item-ratio: ohne Verhältnis liegt das Bild im normalen Fluss.
   Die Bildregeln von Elementor bleiben unangetastet und greifen weiter. */
.elementor-has-item-ratio .elementor-post__thumbnail > .mvaik-overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	max-width: none;
}

/* Elementor-Bild-Widgets: volle Breite beibehalten */
.mvaik-overlay--elementor {
	display: block;
}

.mvaik-overlay--elementor img {
	width: 100%;
}

/* Theme-gerendertes Beitragsbild (z. B. Jupiter): volle Breite beibehalten,
   damit Bilder mit width:100% nicht kollabieren. */
.mvaik-overlay--featured {
	display: block;
}

.mvaik-overlay--featured img {
	max-width: 100%;
	height: auto;
}

figure[data-mvaik] {
	position: relative;
}

.mvaik-badge {
	position: absolute;
	z-index: 2;
	line-height: 1;
	white-space: nowrap;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 600;
	letter-spacing: 0.2px;
	border-radius: 0;
	pointer-events: none;
	box-sizing: border-box;
}

/* Positionen */
.mvaik-pos-top-left    { top: 6px;    left: 6px;  right: auto; bottom: auto; }
.mvaik-pos-top-right   { top: 6px;    right: 6px; left: auto;  bottom: auto; }
.mvaik-pos-bottom-left { bottom: 6px; left: 6px;  right: auto; top: auto; }
.mvaik-pos-bottom-right{ bottom: 6px; right: 6px; left: auto;  top: auto; }

/* Größen */
.mvaik-size-small  { font-size: 11px; padding: 2px 6px; }
.mvaik-size-medium { font-size: 14px; padding: 3px 8px; }
.mvaik-size-large  { font-size: 18px; padding: 4px 11px; }
