/* =========================================================
   CEA Hero Video Widget
   ========================================================= */

.cea-reviews-videos {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: #1a1a1a;
	cursor: pointer;
}

/* ---------- Fallback gradient ---------- */
.cea-reviews-videos__fallback {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* ---------- Poster ---------- */
.cea-reviews-videos__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
	transition: opacity 0.6s ease;
}

.cea-reviews-videos.is-playing .cea-reviews-videos__poster {
	opacity: 0;
	pointer-events: none;
}

/* ---------- Video ---------- */
.cea-reviews-videos__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
}

.cea-reviews-videos__video--mobile {
	display: none;
}

/* ---------- Overlay ---------- */
.cea-reviews-videos__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	pointer-events: none;
	transition: background-color 0.6s ease, opacity 0.6s ease;
	padding-left: 30px;
}

/* ---------- Logo (top-left) ---------- */
.cea-reviews-videos__logo {
	align-self: flex-start;
	transition: transform 0.6s ease, opacity 0.6s ease;
	margin-left: 30px; 
}

.cea-reviews-videos__logo img {
	display: block;
	height: auto;
}

/* ---------- Play / Pause Button (center) ---------- */
.cea-reviews-videos__play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	pointer-events: auto;
	display: inline-block;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Kill ALL browser defaults on button */
.cea-reviews-videos__play-btn:hover,
.cea-reviews-videos__play-btn:focus,
.cea-reviews-videos__play-btn:focus-visible,
.cea-reviews-videos__play-btn:active {
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	border: none !important;
	color: inherit !important;
}

.cea-reviews-videos__play-btn i,
.cea-reviews-videos__play-btn svg {
	display: block;
}

/* --- Icon toggle: play vs pause --- */
.cea-reviews-videos__icon {
	display: inline-block;
	line-height: 0;
}

.cea-reviews-videos__icon--pause {
	display: none;
}

.cea-reviews-videos.is-playing .cea-reviews-videos__icon--play {
	display: none;
}

.cea-reviews-videos.is-playing .cea-reviews-videos__icon--pause {
	display: inline-block;
}

/* ---------- Content (bottom-left) ---------- */
.cea-reviews-videos__content {
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: transform 0.6s ease, opacity 0.6s ease;
	margin-left: 30px;
}

.cea-reviews-videos__pre-title {
	text-transform: uppercase;
	letter-spacing: 0.15em;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
}

.cea-reviews-videos__title {
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.15;
	margin: 0;
	padding: 0;
}

/* =========================================================
   Playing State — Fade-out animations
   ========================================================= */
body .cea-reviews-videos.is-playing .cea-reviews-videos__logo {
	transform: translateY(-100%) !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

body .cea-reviews-videos.is-playing .cea-reviews-videos__play-btn {
	opacity: 0 !important;
	pointer-events: none !important;
	transform: translate(-50%, -50%) scale(0.8) !important;
}

body .cea-reviews-videos.is-playing .cea-reviews-videos__content {
	transform: translateY(100%) !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

body .cea-reviews-videos.is-playing .cea-reviews-videos__overlay {
	background-color: transparent !important;
}

/* =========================================================
   Hover while playing — reveal overlay to allow pause
   ========================================================= */
body .cea-reviews-videos.is-playing:hover .cea-reviews-videos__overlay {
	background-color: rgba(0, 0, 0, 0.30) !important;
}

body .cea-reviews-videos.is-playing:hover .cea-reviews-videos__logo {
	transform: translateY(0) !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

body .cea-reviews-videos.is-playing:hover .cea-reviews-videos__play-btn {
	opacity: 1 !important;
	pointer-events: auto !important;
	transform: translate(-50%, -50%) scale(1) !important;
}

body .cea-reviews-videos.is-playing:hover .cea-reviews-videos__content {
	transform: translateY(0) !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* =========================================================
   Mobile — Switch to 9:16
   ========================================================= */
@media (max-width: 767px) {
	.cea-reviews-videos {
		aspect-ratio: 9 / 16;
		position: relative;
		margin: 0;
		z-index: 1;
		display: block;
		overflow: hidden;
	}

	.cea-reviews-videos__video--desktop {
		display: none;
	}

	.cea-reviews-videos__video--mobile {
		display: block;
	}

	/* Reduce play/pause icons to 70% */
	.cea-reviews-videos__play-btn i,
	.cea-reviews-videos__play-btn svg {
		transform: scale(0.7);
	}

	/* Adjust text sizes */
	.cea-reviews-videos__pre-title {
		font-size: 11px;
		letter-spacing: 0.12em;
	}

	.cea-reviews-videos__title {
		font-size: 1.5rem;
		line-height: 1.2;
	}

	/* Reduce padding on mobile */
	.cea-reviews-videos__overlay {
		padding-left: 20px;
	}

	.cea-reviews-videos__logo {
		margin-left: 20px;
	}

	.cea-reviews-videos__content {
		margin-left: 20px;
		gap: 4px;
	}
}
