/* Ignite Pop-up: Hinweis am Kadence-Video-Pop-up (Optik wie Zwei-Klick-Karte).
 * Schmale Kacheln (< 420 px):
 *   - Geräte mit Maus: Banner auf dem Bild, nur 2 Zeilen; beim Darüberfahren (oder Tastaturfokus)
 *     der ganze Text. Wer aufs Bild klickt, hat den ganzen Hinweis also vorher gesehen.
 *   - Touch-Geräte: Bildunterschrift mit ganzem Text (kein Darüberfahren, erstes Tippen = Zustimmung).
 *   (seit 1.3.0, nach dem Vorschlag eines Nutzers)
 * Ab 420 px Breite: ganzer Hinweis liegt unten links auf dem Bild. */
.wp-block-kadence-videopopup:has(> .ivz-hinweis) {
	position: relative;
	container-type: inline-size;
}

.ivz-hinweis {
	box-sizing: border-box;
	margin-top: 6px;
	color: inherit;
	font-size: 12px;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
}

.ivz-hinweis strong {
	font-size: 13px;
}

/* Links müssen sich vom Text abheben und gut treffbar sein, sonst öffnet ein Klick daneben das Video. */
.ivz-hinweis a {
	display: inline-block;
	margin: -3px -2px;
	padding: 3px 2px;
	font-weight: bold;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.ivz-nobr {
	white-space: nowrap;
}

.ivz-hinweis a:hover,
.ivz-hinweis a:focus-visible {
	text-decoration-thickness: 2px;
}

@container (min-width: 420px) {
	.ivz-hinweis {
		position: absolute;
		z-index: 3;
		left: 10px;
		bottom: 10px;
		max-width: min(440px, calc(100% - 20px));
		margin: 0;
		padding: 8px 12px;
		border-radius: 6px;
		background: rgba(20, 20, 20, 0.82);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
		font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	}

	.ivz-hinweis,
	.ivz-hinweis * {
		color: #fff !important;
	}

	.ivz-hinweis strong {
		font-size: 15px;
	}

	.ivz-hinweis a {
		color: #9fd6ff !important;
	}

	.ivz-hinweis:hover {
		background: rgba(20, 20, 20, 0.92);
	}

}

/* Schmale Kacheln mit Maus: 2-Zeilen-Banner, weich aufklappen beim Darüberfahren.
 * Unter 200 px bleibt es bei der Bildunterschrift, sonst verdeckt das Banner das Play-Symbol.
 * Die 2. Zeile läuft nach rechts aus (Maske statt „…“), damit Auf- und Zuklappen animierbar sind. */
.ivz-hinweis-text {
	display: block;
}

@media (hover: hover) and (pointer: fine) {
	@container (min-width: 200px) and (max-width: 419.98px) {
		.ivz-hinweis {
			position: absolute;
			z-index: 3;
			left: 6px;
			right: 6px;
			bottom: 6px;
			margin: 0;
			padding: 5px 8px;
			border-radius: 5px;
			background: rgba(20, 20, 20, 0.82);
			box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
			font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
			font-size: 11px;
			line-height: 15px;
			transition: background-color 0.35s ease;
		}

		.ivz-hinweis-text {
			/* genau 2 Zeilen; aufgeklappt höchstens Bildhöhe (16:9) minus Abstände */
			max-height: 30px;
			overflow: hidden;
			-webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 15px) no-repeat,
				linear-gradient(to right, #000 55%, transparent) bottom / 100% 15px no-repeat;
			mask: linear-gradient(#000, #000) top / 100% calc(100% - 15px) no-repeat,
				linear-gradient(to right, #000 55%, transparent) bottom / 100% 15px no-repeat;
			transition: max-height 0.4s ease, -webkit-mask-size 0.4s ease, mask-size 0.4s ease;
		}

		.ivz-hinweis,
		.ivz-hinweis * {
			color: #fff !important;
		}

		.ivz-hinweis strong {
			font-size: 12px;
		}

		.ivz-hinweis a {
			color: #9fd6ff !important;
		}

		.wp-block-kadence-videopopup:hover > .ivz-hinweis,
		.wp-block-kadence-videopopup:focus-within > .ivz-hinweis {
			background: rgba(20, 20, 20, 0.92);
		}

		.wp-block-kadence-videopopup:hover > .ivz-hinweis .ivz-hinweis-text,
		.wp-block-kadence-videopopup:focus-within > .ivz-hinweis .ivz-hinweis-text {
			max-height: calc(56.25cqw - 22px);
			overflow-y: auto;
			/* Verlauf der 2. Zeile nach rechts hinausschieben = Text blendet ein */
			-webkit-mask-size: 100% 100%, 400% 15px;
			mask-size: 100% 100%, 400% 15px;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.ivz-hinweis,
	.ivz-hinweis-text {
		transition: none !important;
	}
}
