/**
 * The ten block-editor quote pages (`inc/quote-pages.php`).
 *
 * The pages style themselves (each carries its own `<style>` blocks); this file holds
 * only what prod's Restly child theme added on top, and the theme now adds instead.
 */

/* The pages were laid out under Restly, which has no root padding. Core gives every
   constrained block inside the content `has-global-padding` (50px a side on desktop) on
   top of the pages' own gutters, which narrowed each hero by 100px. Zeroing the variables,
   not the padding, keeps core's matching negative margins on full-width children in step. */
.wp-block-post-content {
	--wp--style--root--padding-left: 0px;
	--wp--style--root--padding-right: 0px;
}

/* The still hero photo that replaces the rotator or the hub's orbit. */
.oc-still-hero img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* The hub's still sits where the orbit was, at the orbit's width. */
.oc-hub .oc-still-hero {
	position: relative;
	width: 100%;
	max-width: 596px;
	margin: 4px 0 0;
}

/* A placeholder in the shape of the quote form while HubSpot loads it: an empty target
   (a legacy v2 form not created yet) or a frame embed HubSpot hasn't sized. Laid over
   the box rather than in flow, so the iframe isn't pushed down while it measures; clipped
   to the box, since the popup's targets reserve less height than the placeholder draws.
   It goes after 12s, so a blocked or failed HubSpot leaves an empty box rather than a
   fake form whose button does nothing. */
.oc-hs-target {
	position: relative;
}

.oc-hs-target:not(:has(iframe, form)) {
	overflow: hidden;
}

.oc-hs-target:not(:has(iframe, form))::before {
	content: "";
	position: absolute;
	inset: 22px 20px auto;
	z-index: 0;
	min-height: 260px;
	border-radius: 8px;
	pointer-events: none;
	background:
		linear-gradient(#5b6472, #5b6472) 0 8px / 42% 11px no-repeat,
		linear-gradient(#eef1f4, #eef1f4) 0 28px / 100% 42px no-repeat,
		linear-gradient(#5b6472, #5b6472) 0 86px / 55% 11px no-repeat,
		linear-gradient(#eef1f4, #eef1f4) 0 106px / 100% 42px no-repeat,
		linear-gradient(#f47920, #f47920) 0 170px / 100% 48px no-repeat,
		linear-gradient(#dde3ea, #dde3ea) 0 236px / 28% 8px no-repeat;
	animation: oc-hs-placeholder-gone 0s 12s forwards;
}

@keyframes oc-hs-placeholder-gone {
	to {
		visibility: hidden;
	}
}

.oc-hs-target > .hs-form-frame {
	position: relative;
	z-index: 1;
}

/* Ported 2026-12-01 from prod's Restly child, so they survive the theme switch. This
   file loads on the ten quote pages only, which is the scope prod gave each rule. */

/* Pack J's "CK1" (Nov 12): the Cookiebot banner pinned to the bottom, its message
   smaller, and a dismissed banner kept hidden. `html body.page` matches prod's weight
   (`html body.page-id-N`), which out-ranks the compact card's `body:has(…)` below, so
   a dismissed banner stays hidden and the card sits on the bottom edge, as on prod. */
html body.page #cookiebanner[style*="display: none"] {
	display: none !important;
}

html body.page #cookiebanner {
	bottom: 0 !important;
	transition: none !important;
}

html body.page #cookiebanner .c-message {
	font-size: 11px !important;
	line-height: 1.35 !important;
}

/* "Mobile chat hide" (client-approved Nov 23, 2026): no HubSpot chat bubble on phones. */
@media (max-width: 767px) {
	#hubspot-messages-iframe-container,
	#hubspot-messages-iframe-container.widget-align-right,
	#hubspot-messages-iframe-container.widget-align-left {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
}

/* "Cookie compact add" (client-approved Nov 23, 2026: "so all 10 match"): the compact
   Cookiebot card RUT956 and RUTM20 carry in their own content, here for every quote
   page. Six pages' in-content copies lost their @media blocks to stray </p><p> tags;
   on the pages with a clean copy this repeats the same rules. Verbatim from prod. */
/* OptConnect LP: compact Cookiebot consent card (legacy #cookiebanner).
   Scoped to landing-page roots. Overrides Cookiebot inline/injected styles.
   >=900px (side-by-side hero): bottom-left card in the copy column, clears the form.
   <900px (stacked hero / mobile): compact bottom bar; full consent text kept (no clamp). */
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner {
	position: fixed !important;
	z-index: 2147483645 !important;
	box-sizing: border-box !important;
	background: rgba(36, 36, 39, 0.97) !important;
	color: #fff !important;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38) !important;
	opacity: 1 !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	overflow: visible !important;
	transform: none !important;
	pointer-events: none !important;
}
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	#c-right,
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	.c-button {
	pointer-events: auto !important;
}
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	#c-left,
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	#c-right {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	position: static !important;
}
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	.c-header {
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em !important;
	text-transform: none !important;
	line-height: 1.3 !important;
	margin: 0 0 4px !important;
	padding: 0 !important;
}
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	.c-message {
	color: #d7dbe3 !important;
	font-size: 12.5px !important;
	line-height: 1.4 !important;
	margin: 0 !important;
	padding: 0 !important;
	max-height: none !important;
	overflow: visible !important;
}
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	.c-button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #f47920 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 5px !important;
	padding: 8px 16px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	text-align: center !important;
	min-height: 0 !important;
	height: auto !important;
	width: auto !important;
	white-space: nowrap !important;
	box-sizing: border-box !important;
}
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	.c-button:hover {
	background: #dd6a16 !important;
}
body:has(
		.oc-hub,
		.oc-e400-lp,
		.oc-e300-lp,
		.oc-s700-lp,
		.oc-s400-lp,
		.oc-r920-lp,
		.oc-rut241-lp,
		.oc-rut956-lp,
		.oc-rutm20-lp,
		.oc-rutm50-lp
	)
	#cookiebanner
	> div[style*="clear"] {
	display: none !important;
	height: 0 !important;
}
/* Side-by-side hero: compact card bottom-left, stays in copy column */
@media (min-width: 900px) {
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner {
		left: 16px !important;
		right: auto !important;
		bottom: 16px !important;
		top: auto !important;
		width: min(372px, calc(48vw - 28px)) !important;
		max-width: 372px !important;
		height: auto !important;
		max-height: none !important;
		padding: 14px 14px 12px !important;
		border-radius: 10px !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 10px !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner
		#c-left {
		display: block !important;
		flex: 1 1 auto !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner
		#c-right {
		display: block !important;
		align-self: flex-start !important;
	}
}
/* Stacked hero / mobile: compact bottom bar; OK beside copy; body pad while open */
@media (max-width: 899.98px) {
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner {
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		top: auto !important;
		width: 100% !important;
		max-width: none !important;
		height: auto !important;
		max-height: none !important;
		padding: 10px 12px !important;
		border-radius: 0 !important;
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
		gap: 10px !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner
		#c-left {
		flex: 1 1 auto !important;
		min-width: 0 !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner
		.c-header {
		font-size: 12px !important;
		margin: 0 0 2px !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner
		.c-message {
		font-size: 11.5px !important;
		line-height: 1.35 !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner
		#c-right {
		flex: 0 0 auto !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		)
		#cookiebanner
		.c-button {
		padding: 8px 14px !important;
		font-size: 12.5px !important;
	}
	body:has(
			.oc-hub,
			.oc-e400-lp,
			.oc-e300-lp,
			.oc-s700-lp,
			.oc-s400-lp,
			.oc-r920-lp,
			.oc-rut241-lp,
			.oc-rut956-lp,
			.oc-rutm20-lp,
			.oc-rutm50-lp
		):has(#cookiebanner[style*="display: block"]) {
		padding-bottom: 200px !important;
	}
}
