/* Shared click-to-play video: the product-page thumbnail, play button, and
   Storylane tour overlay. Used by Product Video Proof and Video Only; markup
   from actabl_bb_video_media() in includes/video.php. */

.actabl-video,
.actabl-video *,
.actabl-video *::before,
.actabl-video *::after {
	box-sizing: border-box;
}

.actabl-video {
	border-radius: 14px;
	display: block;
	overflow: hidden;
	position: relative;
	width: 100%;
}

/* Button reset for the click-to-play state.

   The parent theme styles bare `button:hover`, `button:focus` and
   `button:active` with a purple fill, a 1px #314cd6 border and white text.
   Doubling the class keeps this reset ahead of those on specificity whatever
   order the stylesheets load in, which is what once painted a purple edge over
   the thumbnail on hover and left it there after clicking through. */
button.actabl-video.actabl-video,
button.actabl-video.actabl-video:hover,
button.actabl-video.actabl-video:focus,
button.actabl-video.actabl-video:active {
	background: none;
	border: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	margin: 0;
	outline: none;
	padding: 0;
}

/* Keyboard focus still gets a ring; a mouse click does not. Listed after the
   rule above and at matching specificity, since an element matching
   :focus-visible also matches :focus. */
button.actabl-video.actabl-video:focus-visible {
	outline: 3px solid #c5ccff;
	outline-offset: 3px;
}

.actabl-video img.actabl-video__thumb {
	display: block;
	height: auto;
	width: 100%;
}

.actabl-video.is-playing {
	aspect-ratio: 16 / 9;
}

/* A Storylane demo is not 16:9. Its frame is a share of the width plus a fixed
   strip for the player controls, which aspect-ratio cannot express, so the
   script writes that shape as padding-bottom and the box itself holds no
   height. The light fill is what Storylane paints behind a loading demo. */
.actabl-video.is-demo {
	aspect-ratio: auto;
	background: #f3f5f7;
	height: 0;
}

.actabl-video iframe {
	border: 0;
	display: block;
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	width: 100%;
}

.actabl-video img.actabl-video__play {
	aspect-ratio: 1 / 1;
	height: auto;
	left: 50%;
	margin: 0;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: transform 200ms ease;
	width: clamp(72px, 13.5%, 101px);
}

.actabl-video:hover img.actabl-video__play,
.actabl-video:focus-visible img.actabl-video__play {
	transform: translate(-50%, -50%) scale(1.08);
}

/* Take a Tour overlay, shown over a Storylane demo's thumbnail in place of
   the play button. Same scrim, heading and button as the Storylane preview
   embeds on the AI Insights and Altitude pages, set in Inter rather than
   Storylane's Poppins, which the site does not load. The whole thumbnail is
   the button, so the CTA here is a span styled as one. */
.actabl-video__tour {
	align-items: center;
	background-color: rgba(40, 37, 54, 0.9);
	display: flex;
	flex-direction: column;
	inset: 0;
	justify-content: center;
	padding: 16px;
	position: absolute;
	text-align: center;
}

.actabl-video__tour-heading {
	color: #ffffff;
	font-family: Inter, sans-serif;
	font-size: clamp(20px, 2.664vw, 28px);
	font-weight: 500;
	line-height: 1.25;
	margin-bottom: clamp(20px, 1.776vw, 24px);
	max-width: 53%;
	text-shadow: 0 1px 2px rgba(26, 19, 72, 0.4);
}

.actabl-video__tour-cta {
	align-items: center;
	background-color: #6478e0;
	border-radius: 8px;
	box-shadow: 0 0 15px rgba(26, 19, 72, 0.45);
	color: #ffffff;
	display: inline-flex;
	font-family: Inter, sans-serif;
	font-size: clamp(16px, 1.599vw, 20px);
	font-weight: 600;
	height: clamp(40px, 3.996vw, 50px);
	line-height: 1.2;
	padding: 0 clamp(15px, 1.776vw, 20px);
	text-transform: uppercase;
	transition: background-color 0.4s;
	white-space: nowrap;
}

.actabl-video:hover .actabl-video__tour-cta,
.actabl-video:focus-visible .actabl-video__tour-cta {
	background-color: #5568d5;
}

@media (max-width: 1024px) {
	.actabl-video__tour-heading {
		max-width: 90%;
	}
}
