/* PP Banners — image banners (page top + [pp_banner] shortcode). */

.pp-banner picture,
.pp-banner__link {
	display: block;
}

.pp-banner__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
}

/* Top of the page, edge to edge. */
.pp-banner--page.pp-banner--full {
	line-height: 0;
}

/* Top of the page, lined up with the content well. */
.pp-banner--page.pp-banner--contained {
	max-width: var(--pp-container);
	margin: 0 auto;
	padding: var(--pp-sp-6) var(--pp-gutter) 0;
	box-sizing: border-box;
}

.pp-banner--contained .pp-banner__img,
.pp-banner--inline .pp-banner__img {
	border-radius: var(--pp-r-2xl);
}

/* Inside page content. */
.pp-banner--inline {
	margin: 0 0 var(--pp-sp-6);
}

/*
 * "Hide the page title" (page setting): the template's h1 stays in the page for
 * search engines and screen readers but takes no space. Headings typed into the
 * page content are left alone, as is the Black Friday hero (it handles banners
 * itself and always shows its "ended" heading).
 */
.pp-banner-hides-title #pp-main h1:not(.entry-content h1):not(.ppbf-hero h1) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.pp-banner__link:focus-visible {
	outline: 3px solid var(--pp-magenta);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.pp-banner--page.pp-banner--contained {
		padding: var(--pp-sp-4) var(--pp-sp-4) 0;
	}

	.pp-banner--contained .pp-banner__img,
	.pp-banner--inline .pp-banner__img {
		border-radius: var(--pp-r-xl);
	}
}
