/* Home hero with background video (see hero-video.js).
 * Styles key off the server-rendered .pwh-m-video class (not the JS-added one), so the size,
 * poster, colours and layout are all in place on first paint, before the video loads.
 * Phones: portrait cut in a 2:3 box (cropped equally top and bottom).
 * Tablet/desktop: 16:9 cut (portrait video centred over a blurred copy of itself). */

/* ---- Shared ---- */
.pwh-m-video > .elementor-widget-wrap,
.pwh-m-video > .elementor-container {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	height: auto;
	min-height: 0;
	align-content: center;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-size: cover !important;
	background-position: 50% 50% !important;
	background-repeat: no-repeat !important;
	background-color: #2b2420 !important;
}
.pwh-m-video__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}
.pwh-m-video__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
	display: block;
}
/* Scrim so the copy reads over the footage. */
.pwh-m-video__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .5) 35%, rgba(0, 0, 0, .5) 65%, rgba(0, 0, 0, .3) 100%);
}
.pwh-m-video .elementor-widget {
	position: relative;
	z-index: 1;
	width: 100%;
	text-align: center;
}
.pwh-m-video .elementor-widget-text-editor {
	margin-left: auto !important;
	margin-right: auto !important;
}
.pwh-m-video .elementor-widget-button .elementor-button-wrapper {
	text-align: center;
	justify-content: center;
}
.pwh-m-video .elementor-heading-title,
.pwh-m-video .elementor-widget-text-editor,
.pwh-m-video .elementor-widget-text-editor * {
	color: #fff !important;
	text-align: center !important;
}
.pwh-m-video .elementor-heading-title {
	text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
.pwh-m-video .elementor-widget-button .elementor-button {
	background-color: #fff !important;
	color: #141414 !important;
	border-color: #fff !important;
}

/* ---- Phones ---- */
@media (max-width: 767px) {
	.pwh-m-video > .elementor-widget-wrap,
	.pwh-m-video > .elementor-container {
		aspect-ratio: 2 / 3;
		background-image: var(--pwh-hero-poster, none) !important;
		/* Title + line top-left, button bottom-left. */
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		justify-content: flex-start !important;
		align-items: stretch !important;
		align-content: stretch !important;
		text-align: left;
		padding: 28px 22px 40px !important;
	}
	.pwh-m-video .elementor-heading-title,
	.pwh-m-video .elementor-widget-text-editor,
	.pwh-m-video .elementor-widget-text-editor * {
		text-align: left !important;
	}
	.pwh-m-video .elementor-widget {
		text-align: left;
	}
	.pwh-m-video .elementor-widget-text-editor {
		max-width: 260px;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	.pwh-m-video .elementor-widget-button {
		margin-top: auto !important;
	}
	.pwh-m-video .elementor-widget-button .elementor-button-wrapper {
		text-align: left;
		justify-content: flex-start;
	}
	/* Darker at the top and bottom, where the copy is; clear in the middle. */
	.pwh-m-video__media::after {
		background: linear-gradient(to bottom, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .25) 28%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .5) 100%);
	}
	/* Compact copy. */
	.pwh-m-video .elementor-heading-title {
		font-size: 30px !important;
		line-height: 1.2 !important;
	}
	.pwh-m-video .elementor-widget-heading {
		margin-bottom: 10px !important;
	}
	.pwh-m-video .elementor-widget-text-editor {
		font-size: 14px !important;
		line-height: 1.55 !important;
		margin-bottom: 14px !important;
	}
	.pwh-m-video .elementor-widget-text-editor p {
		margin-bottom: 0 !important;
	}
	/* Copy wrapped in <span class="pwh-hide-m"> is desktop-only (e.g. "Book a chair…"). */
	.pwh-m-video .pwh-hide-m {
		display: none !important;
	}}

/* Phones in landscape: a 2:3 box would be far taller than the screen. */
@media (max-width: 767px) and (orientation: landscape) {
	.pwh-m-video > .elementor-widget-wrap,
	.pwh-m-video > .elementor-container {
		aspect-ratio: auto;
		min-height: 100svh;
	}
}

/* ---- Tablet / desktop ---- */
@media (min-width: 768px) {
	.pwh-m-video > .elementor-widget-wrap,
	.pwh-m-video > .elementor-container {
		/* Same shape as the 16:9 desktop cut; capped on very wide screens (slight crop top and bottom). */
		aspect-ratio: 16 / 9;
		max-height: 820px;
		background-image: var(--pwh-hero-poster-d, none) !important;
		padding: 40px 24px !important;
	}
	.pwh-m-video__media::after {
		background: radial-gradient(ellipse at center, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .25) 100%);
	}
	.pwh-m-video .elementor-widget-text-editor {
		max-width: 560px;
	}
}

/* Docked / pinned "Book a slot" button (phones; see hero-video.js). It starts level with the Ask AI button at the
 * bottom-left, rides up with the page and sticks at the top-left. Its position comes from a transform set by JS. */
.pwh-sticky-book {
	display: none !important; /* phones only; beats Elementor's .elementor-button display */
}
@media (max-width: 767px) {
	.pwh-sticky-book {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		position: fixed;
		top: 0;
		left: 16px;
		height: 40px;
		padding-top: 0 !important;
		padding-bottom: 0 !important;
		line-height: 1 !important;
		box-sizing: border-box;
		z-index: 990;
		white-space: nowrap;
		background-color: #fff !important;
		color: #141414 !important;
		border: 0 !important;
		box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
		will-change: transform;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity .2s ease, visibility 0s linear .2s;
	}
	.pwh-sticky-book * {
		color: #141414 !important;
	}
	.pwh-sticky-book.is-on {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transition: opacity .2s ease, visibility 0s;
	}
}
