/*
 * Pippin site-wide layout. Loaded on every page.
 *
 * Footer at the bottom of short pages. ELEMENTOR LIMITATION: neither Elementor nor the Hello theme has a setting to
 * keep the Theme Builder footer at the bottom of the window when a page is shorter than the window, so short pages
 * (Newsletter, 404, thank-you pages) showed empty white space under the footer. The page is header, content and
 * footer directly in <body>: as a column at least one window tall (less the admin bar), the footer takes up the
 * spare space, and inside it the footer's first (navy) block grows, so the footer just looks taller: its content at
 * the top, the red bar at the very bottom, and no white band above it. Pages taller than the window are unchanged.
 */
body:has(> .elementor-location-footer) {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}
body:has(> .elementor-location-footer) > .elementor-location-footer,
body:has(> .elementor-location-footer) > .elementor-location-footer > .e-con:only-child {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}
body:has(> .elementor-location-footer) > .elementor-location-footer > .e-con:only-child > .e-con:first-child {
	flex-grow: 1;
}

/* "Have concerns about AI?" after the first paragraph of an article that mentions AI (class-ai-note.php). */
.pt-ai-note {
	margin: 0 0 1.5em;
	padding: 12px 16px;
	border-left: 3px solid #37aada;
	border-radius: 0 10px 10px 0;
	background: #f5fbfe;
	font-size: 0.9375rem;
	line-height: 1.5;
}
.pt-ai-note__label {
	font-weight: 600;
	color: #22294e;
}
.pt-ai-note a {
	color: #d83040;
	font-weight: 600;
	text-decoration: none;
}
.pt-ai-note a:hover {
	color: #54bde9;
}

/* Anchor links land below the sticky header: site.js keeps --pt-header-offset at its visible height (80px on
   desktop and tablet, 52px on phones, the fallbacks until the script runs). */
html {
	scroll-padding-top: var(--pt-header-offset, 80px);
}
@media (max-width: 767px) {
	html {
		scroll-padding-top: var(--pt-header-offset, 52px);
	}
}

/*
 * Billboard "Download Brochure" buttons (a third billboard action linking to /downloads/#download-<slug>; Pippin WP
 * Resources opens the brochure's card in a modal): a ghost button (white text and a download icon, no fill or
 * outline) on its own line under Order Now and Book a Demo, so it stays below them in priority. The billboard add-on
 * only has Primary and Secondary styles.
 */
.pt-billboard-left .pt-billboard-actions:has(.pt-billboard-action-button[href*="#download-"]) {
	flex-wrap: wrap;
}
.pt-billboard-left .pt-billboard-action:has(.pt-billboard-action-button[href*="#download-"]) {
	flex-basis: 100%;
	margin-top: -4px;
	text-align: left;
}
.pt-billboard-left .pt-billboard-action-button.secondary[href*="#download-"] {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background-color: transparent;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	text-underline-offset: 4px;
}
.pt-billboard-left .pt-billboard-action-button.secondary[href*="#download-"]::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v11m0 0l-4.5-4.5M12 15l4.5-4.5M5 19.5h14' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v11m0 0l-4.5-4.5M12 15l4.5-4.5M5 19.5h14' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pt-billboard-left .pt-billboard-action-button.secondary[href*="#download-"]:hover {
	border: 0;
	background-color: transparent;
	color: #fff;
	text-decoration: underline;
}
@media (max-width: 767px) {
	.pt-billboard-left .pt-billboard-action:has(.pt-billboard-action-button[href*="#download-"]) {
		margin-top: -8px;
		text-align: center;
	}
}
