/*
 * "AFB shadow title" variation (styles/afb-shadow.json): centring, coral underline, desktop size and shadow.
 * Below the desktop breakpoint, the former title added 3.2rem above and below the text: kept here.
 */
.wp-block-post-title.is-style-afb-shadow {
	position: relative;
	/* Own stacking context: the z-index -1 shadow stays above a coloured page header background. */
	isolation: isolate;
	width: 100%;
	padding-top: calc(var(--wp--preset--spacing--xxl) + var(--wp--preset--spacing--xl));
	padding-bottom: calc(2 * var(--wp--preset--spacing--xl));
	text-align: center;
}

/* Underline: 1.2rem below the text. */
.wp-block-post-title.is-style-afb-shadow::after {
	content: "";
	position: absolute;
	bottom: calc(2 * var(--wp--preset--spacing--xl) - var(--wp--preset--spacing--m));
	left: 50%;
	width: 60px;
	height: var(--wp--custom--title--underline-height);
	background: var(--wp--custom--color--accent);
	transform: translateX(-50%);
}

/* White title (page header): underline in the text colour. */
.wp-block-post-title.is-style-afb-shadow.has-afb-white-color::after {
	background: currentColor;
}

/*
 * Shadow: the title text, large and pale, behind it, read from `data-shadow` (afb-blocks filter), 40px above
 * the text. Hidden below the tablet breakpoint; z-index -1 keeps it under the title text,
 * inside the stacking context of the title (isolation).
 */
.wp-block-post-title.is-style-afb-shadow[data-shadow]::before {
	content: attr(data-shadow);
	content: attr(data-shadow) / "";
	position: absolute;
	top: calc(var(--wp--preset--spacing--xxl) + var(--wp--preset--spacing--xl) - 40px);
	left: 0;
	z-index: -1;
	display: var(--wp--custom--title--shadow-display);
	width: 100%;
	overflow: hidden;
	color: var(--wp--custom--color--tint);
	font-size: 10rem;
	font-weight: bolder;
	line-height: 1.3;
	white-space: nowrap;
	text-align: center;
	pointer-events: none;
	user-select: none;
}

.wp-block-post-title.is-style-afb-shadow.has-afb-white-color[data-shadow]::before {
	opacity: 0.1;
}

/* Breakpoint --wp--custom--breakpoint--tablet. */
@media (min-width: 990px) {
	.wp-block-post-title.is-style-afb-shadow[data-shadow]::before {
		display: var(--wp--custom--title--shadow-display-tablet);
	}
}

/* Breakpoint --wp--custom--breakpoint--desktop: spacing of the variation (theme.json). */
@media (min-width: 1280px) {
	.wp-block-post-title.is-style-afb-shadow {
		padding-top: var(--wp--preset--spacing--xxl);
		padding-bottom: var(--wp--preset--spacing--xl);
		font-size: 8rem;
	}

	.wp-block-post-title.is-style-afb-shadow::after {
		bottom: calc(var(--wp--preset--spacing--xl) - var(--wp--preset--spacing--m));
	}

	.wp-block-post-title.is-style-afb-shadow[data-shadow]::before {
		top: calc(var(--wp--preset--spacing--xxl) - 50px);
		font-size: 18rem;
	}
}
