/**
 * Elevar com seta — is-style-lzm-hover-elevate-notch.
 *
 * Seta triangular à direita (::after), cor = fundo do bloco (inherit).
 * No hover: lift (token post-card-hover-lift) + seta some.
 * Sem sombra — só elevação + seta.
 *
 * A ponta fica fora do card (right: -13px). No slider Embla o slide
 * seguinte cobria a seta (sumia em repouso); no hover o z-index:5
 * revelava e opacity→0 escondia (= pisca). Solução: slides à esquerda
 * com z-index maior que os da direita + sem transition na opacity.
 */
.wp-block-group.is-style-lzm-hover-elevate-notch {
	position: relative;
	z-index: 1;
	overflow: visible;
	transition: transform var(--wp--custom--post-card-transition-duration, 0.2s)
		ease;
}

/* Título com link próprio (não card inteiro): sem sublinhado, como no protótipo. */
.wp-block-group.is-style-lzm-hover-elevate-notch .wp-block-heading a {
	color: inherit;
	text-decoration: none;
}

.wp-block-group.is-style-lzm-hover-elevate-notch .wp-block-heading a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.wp-block-group.is-style-lzm-hover-elevate-notch::after {
	content: "";
	position: absolute;
	right: -13px;
	top: 50%;
	width: 26px;
	height: 30px;
	transform: translateY(-50%);
	background-color: inherit;
	opacity: 1;
	z-index: 2;
	pointer-events: none;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/*
 * Embla: overflow do viewport continua hidden (necessário), mas cada slide
 * não deve clipar a seta; z-index decrescente = ponta por cima do vizinho.
 */
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > .embla__slide,
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > .wp-block-post {
	overflow: visible;
}

.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(1) {
	z-index: 30;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(2) {
	z-index: 29;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(3) {
	z-index: 28;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(4) {
	z-index: 27;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(5) {
	z-index: 26;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(6) {
	z-index: 25;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(7) {
	z-index: 24;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(8) {
	z-index: 23;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(9) {
	z-index: 22;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(10) {
	z-index: 21;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(11) {
	z-index: 20;
}
.wp-block-wpmundi-slider .embla__container:has(.is-style-lzm-hover-elevate-notch) > :nth-child(12) {
	z-index: 19;
}

/* Flex/grid: mesmos cards lado a lado fora do slider */
.is-layout-flex:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(1),
.is-layout-grid:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(1) {
	z-index: 30;
}
.is-layout-flex:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(2),
.is-layout-grid:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(2) {
	z-index: 29;
}
.is-layout-flex:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(3),
.is-layout-grid:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(3) {
	z-index: 28;
}
.is-layout-flex:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(4),
.is-layout-grid:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(4) {
	z-index: 27;
}
.is-layout-flex:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(5),
.is-layout-grid:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(5) {
	z-index: 26;
}
.is-layout-flex:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(6),
.is-layout-grid:has(> .wp-block-group.is-style-lzm-hover-elevate-notch) > .wp-block-group.is-style-lzm-hover-elevate-notch:nth-child(6) {
	z-index: 25;
}

@media (hover: hover) {
	.wp-block-group.is-style-lzm-hover-elevate-notch:hover {
		z-index: 50;
		transform: translateY(
			calc(-1 * var(--wp--custom--post-card-hover-lift, 0px))
		);
	}

	.wp-block-group.is-style-lzm-hover-elevate-notch:hover::after {
		opacity: 0;
	}

	.wp-block-wpmundi-slider
		.embla__container:has(.is-style-lzm-hover-elevate-notch)
		> :has(> .is-style-lzm-hover-elevate-notch:hover),
	.wp-block-wpmundi-slider
		.embla__container:has(.is-style-lzm-hover-elevate-notch)
		> :has(.is-style-lzm-hover-elevate-notch:hover) {
		z-index: 100;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-group.is-style-lzm-hover-elevate-notch {
		transition: none;
	}

	.wp-block-group.is-style-lzm-hover-elevate-notch:hover {
		transform: none;
	}
}
