/* Hinton Promo Video Layout 1.0.2
 * 1.0.2: the wrapper now uses a fixed 320px width capped by max-width:100%, never a bare percentage.
 * Inside Elementor flex columns (the "Watch the walkaround" slot, and the stacked phone layout), a
 * percentage width can't be resolved while the column is sized. The player then fell back to MediaElement's
 * inline min-width:217px, so the 9:16 box measured 217x386. The column was laid out 183px too short, and the
 * rent-to-own band slid up under the video. With a fixed basis, the column always reserves the full height.
 *
 * Earlier notes (1.0.1):
 * Video floats right of the product description on desktop/tablet, stacks above it under 768px.
 * 1.0.1: when MediaElement.js wraps the [video] shortcode (logged-in / unoptimized pages), its
 * inner layers are position:absolute, so the old height:auto !important on .mejs-container
 * collapsed the float to 0px and the description ran underneath the video. The player box now
 * keeps a 9:16 shape instead, so the float always reserves its full height.
 */
body.single-product .elementor-widget-woocommerce-product-content,
body.single-product .woocommerce-Tabs-panel--description {
	display: flow-root;
}
body.single-product .hinton-promo-video {
	float: right;
	clear: right;
	width: 320px;
	max-width: 32%;
	margin: 0 0 20px 28px !important;
	position: relative;
}
body.single-product .hinton-promo-video .wp-video {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
}
/* Plain <video> (MediaElement not running) */
body.single-product .hinton-promo-video > .wp-video > video,
body.single-product .hinton-promo-video > video {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	aspect-ratio: 9 / 16;
	border-radius: 12px;
}
/* MediaElement.js player: give the box a real height; its layers are absolute inside it */
body.single-product .hinton-promo-video .mejs-container {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	aspect-ratio: 9 / 16;
	border-radius: 12px;
	overflow: hidden;
}
body.single-product .hinton-promo-video .mejs-container .mejs-mediaelement,
body.single-product .hinton-promo-video .mejs-container .mejs-layers {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
}
body.single-product .hinton-promo-video .mejs-container video,
body.single-product .hinton-promo-video .mejs-container mediaelementwrapper {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
@media (max-width: 767px) {
	body.single-product .hinton-promo-video {
		float: none !important;
		clear: both;
		width: 320px !important;
		max-width: 100% !important;
		margin: 0 auto 20px !important;
		display: block;
	}
}
/* If the product-template script later moves the video into the side column */
body.single-product .hb-video .hinton-promo-video {
	float: none !important;
	width: 320px !important;
	max-width: 100% !important;
	margin: 0 !important;
}
