/*
 * Dynamic Query Loop Cover link.
 */

.wp-block-cover.has-query-cover-post-link {
	position: relative;
	cursor: pointer;
}

/*
 * The stretched link covers the entire Cover block.
 */
.wp-block-cover.has-query-cover-post-link
	> .query-cover-post-link__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	border-radius: inherit;
}

/*
 * Place the Cover content above the stretched link.
 *
 * Non-interactive content ignores pointer events so clicking the title,
 * paragraph or other text still activates the Cover link.
 */
.wp-block-cover.has-query-cover-post-link
	> .wp-block-cover__inner-container {
	position: relative;
	z-index: 3;
	pointer-events: none;
}

/*
 * Preserve separately interactive elements inside the Cover.
 */
.wp-block-cover.has-query-cover-post-link
	> .wp-block-cover__inner-container
	:is(
		a,
		button,
		input,
		select,
		textarea,
		summary,
		[role="button"],
		[tabindex]
	) {
	pointer-events: auto;
}

/*
 * Visible keyboard focus.
 */
.wp-block-cover.has-query-cover-post-link
	> .query-cover-post-link__overlay:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: -6px;
}