/*
 * Full-bleed like the Hero block (100vw + negative margins to escape any
 * parent max-width), but sized by aspect-ratio instead of viewport height -
 * this is a mid-page section, not a page-opening hero. 1512x900 is the
 * Figma frame's own ratio ("Section/FullImage").
 */
.wp-block-andrei-saguna-video-lightbox-section {
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-end;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	aspect-ratio: 1512 / 900;
	color: var(--wp--preset--color--base-white);
}

/* Background image + scrim, same composited-layer approach as the Hero
   block's __media, plus the extra bottom-anchored fade the design adds on
   top for legibility right behind the headline. */
.wp-block-andrei-saguna-video-lightbox-section__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: var(--wp--preset--color--neutral-900);
	background-position: 50% center;
	background-size: cover;
	background-repeat: no-repeat;
}

/* Same "full-bleed media, capped/gutter-padded content" split as the Hero
   block's __content - spacing/24 (96px) top and bottom, spacing/4 (16px)
   left and right, same horizontal gutter every other section uses. */
.wp-block-andrei-saguna-video-lightbox-section__content {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
	padding-block: var(--wp--preset--spacing--24);
	padding-inline: var(--wp--preset--spacing--4);
}

.wp-block-andrei-saguna-video-lightbox-section__row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--16);
	width: 100%;
}

.wp-block-andrei-saguna-video-lightbox-section__text-col {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--6);
	flex: 1 1 auto;
	min-width: 0;
}

.wp-block-andrei-saguna-video-lightbox-section__heading {
	margin: 0;
	max-width: 760px;
	font-family: var(--wp--preset--font-family--ivypresto-headline);
	font-size: var(--wp--preset--font-size--h-1);
	line-height: 1.1;
	color: var(--wp--preset--color--base-white);
}

/* #CDD3DA is exactly this palette's "border-default" token - reused here
   rather than a raw hex, since it's the secondary-on-dark text color the
   design calls for. */
.wp-block-andrei-saguna-video-lightbox-section__text {
	margin: 0;
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: var(--wp--preset--font-size--body-base);
	line-height: 1.5;
	color: var(--wp--preset--color--border-default);
}

.wp-block-andrei-saguna-video-lightbox-section__play-trigger,
.wp-block-andrei-saguna-video-lightbox-section__notice {
	flex-shrink: 0;
}

.wp-block-andrei-saguna-video-lightbox-section__play-trigger {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.wp-block-andrei-saguna-video-lightbox-section__play-trigger:hover,
.wp-block-andrei-saguna-video-lightbox-section__play-trigger:focus-visible {
	opacity: 0.85;
}

.wp-block-andrei-saguna-video-lightbox-section__play-icon {
	display: flex;
	width: 64px;
	height: 64px;
}

.wp-block-andrei-saguna-video-lightbox-section__play-icon svg {
	width: 100%;
	height: 100%;
}

.wp-block-andrei-saguna-video-lightbox-section__play-label {
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: var(--wp--preset--font-size--ui-interactive);
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 0.56px;
	text-transform: uppercase;
	text-decoration: underline;
	text-decoration-skip-ink: none;
	color: var(--wp--preset--color--base-white);
	white-space: nowrap;
}

/* Editor-only placeholder shown instead of the play button until a video
   is chosen in the sidebar - render.php simply omits the button entirely
   in that state, so there's nothing to keep in sync here. */
.wp-block-andrei-saguna-video-lightbox-section__notice {
	margin: 0;
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: var(--wp--preset--font-size--body-small);
	color: var(--wp--preset--color--border-default);
}

/* --- Lightbox dialog --- */

.wp-block-andrei-saguna-video-lightbox-section__dialog {
	position: fixed;
	inset: 0;
	margin: auto;
	width: min(1200px, 92vw);
	max-width: none;
	max-height: 92vh;
	aspect-ratio: 16 / 9;
	border: 0;
	padding: 0;
	background: #000;
}

.wp-block-andrei-saguna-video-lightbox-section__dialog::backdrop {
	background: rgba(21, 28, 40, 0.92);
}

.wp-block-andrei-saguna-video-lightbox-section__dialog-video {
	display: block;
	width: 100%;
	height: 100%;
	background: #000;
}

.wp-block-andrei-saguna-video-lightbox-section__dialog-close {
	position: fixed;
	top: var(--wp--preset--spacing--6);
	right: var(--wp--preset--spacing--6);
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.1);
	cursor: pointer;
}

.wp-block-andrei-saguna-video-lightbox-section__dialog-close::before,
.wp-block-andrei-saguna-video-lightbox-section__dialog-close::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 2px;
	background-color: var(--wp--preset--color--base-white);
}

.wp-block-andrei-saguna-video-lightbox-section__dialog-close::before {
	transform: rotate(45deg);
}

.wp-block-andrei-saguna-video-lightbox-section__dialog-close::after {
	transform: rotate(-45deg);
}

/* Visually hidden, but still announced by assistive tech - this theme
   doesn't ship a shared .screen-reader-text utility, so it's scoped here. */
.wp-block-andrei-saguna-video-lightbox-section__dialog-close-label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 767px) {
	.wp-block-andrei-saguna-video-lightbox-section {
		aspect-ratio: auto;
		min-height: 480px;
	}

	.wp-block-andrei-saguna-video-lightbox-section__content {
		padding-block: var(--wp--preset--spacing--6);
	}

	.wp-block-andrei-saguna-video-lightbox-section__row {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--wp--preset--spacing--6);
	}

	.wp-block-andrei-saguna-video-lightbox-section__play-trigger {
		flex-direction: row;
		gap: var(--wp--preset--spacing--3);
	}

	.wp-block-andrei-saguna-video-lightbox-section__dialog {
		width: 92vw;
	}
}
