/*
 * Video Hero component (SDB One Foundation).
 *
 * The component carries the same Frames classes as the template's Default
 * Hero (fr-hero-hotel, fr-background-alpha, fr-cta-links-alpha, …), so
 * spacing, type and color come from each brand's own classes and tokens.
 * These rules only restate what the video layer needs, using the same
 * variables those classes use — so the hero still holds together on a site
 * that is missing one of the classes (the install notes which).
 */

.sdb-video-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	justify-content: center;
	min-height: min(80svh, 52rem);
	padding-top: var(--section-space-xl);
	padding-bottom: var(--section-space-xl);
	row-gap: var(--container-gap);
}

/* Two classes to beat .fr-hero-hotel__content-wrapper's centering — the
   Default Hero overrides it the same way, at element level. */
.sdb-video-hero .sdb-video-hero__content {
	position: relative;
	z-index: 1;
	row-gap: var(--content-gap);
	align-items: flex-start;
	text-align: left;
	color: var(--text-light);
}

/* The wrapper stays at the content width so the left edge lines up with the
   rest of the page; the copy itself is held to a readable measure and kept
   over the tinted side of the overlay. */
.sdb-video-hero__content > * {
	max-width: var(--width-l);
}

.sdb-video-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	column-gap: var(--space-xs);
	row-gap: var(--content-gap);
}

/* Background stack: poster, then video, then overlay. Primary behind it all
   keeps light text readable before anything has loaded. */
.sdb-video-hero__background {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--primary);
}

.sdb-hero-video,
.sdb-hero-video__poster,
.sdb-hero-video__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.sdb-hero-video__poster,
.sdb-hero-video__media {
	display: block;
	object-fit: cover;
}

/* Reduced motion: the still poster, not a frozen first frame. */
.sdb-hero-video.is-reduced .sdb-hero-video__media {
	visibility: hidden;
}

/* Stronger than the Default Hero's primary-50 → transparent: footage moves
   and brightens under the copy, so the copy side sits on the darkest brand tint
   and the far side keeps a light one rather than none. Two classes to beat
   .fr-background-alpha__overlay's flat tint — and its z-index: -1, which
   would paint the overlay underneath the (positioned) video. */
.sdb-video-hero .sdb-video-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		90deg,
		var(--primary-ultra-dark-trans-80) 0%,
		var(--primary-ultra-dark-trans-60) 45%,
		var(--primary-ultra-dark-trans-20) 100%
	);
}

/* Text spans the width on small screens, so tint the whole frame evenly. */
@media (max-width: 767px) {
	.sdb-video-hero .sdb-video-hero__overlay {
		background: var(--primary-ultra-dark-trans-70);
	}
}

/* Pause / play. Above the overlay inside the background's stacking
   context, and in the section's bottom padding, clear of the content. */
.sdb-hero-video__toggle {
	position: absolute;
	right: var(--space-m);
	bottom: var(--space-m);
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--white-trans-50, rgba(255, 255, 255, 0.5));
	border-radius: 50%;
	background: var(--neutral-ultra-dark-trans-60, rgba(0, 0, 0, 0.6));
	color: var(--white, #fff);
	cursor: pointer;
}

.sdb-hero-video__toggle:hover {
	background: var(--primary);
}

.sdb-hero-video__toggle:focus-visible {
	outline: 2px solid var(--white, #fff);
	outline-offset: 2px;
}

.sdb-hero-video__toggle svg {
	width: 1.1rem;
	height: 1.1rem;
}

.sdb-hero-video__icon-play,
.sdb-hero-video__toggle[aria-pressed="true"] .sdb-hero-video__icon-pause {
	display: none;
}

.sdb-hero-video__toggle[aria-pressed="true"] .sdb-hero-video__icon-play {
	display: block;
}
