/**
 * PX Video Popup - Modal styles
 *
 * Full-screen popup for playing YouTube videos.
 * Globally enqueued via CSS glob in enqueue.php.
 *
 * Trigger styles (.px-video__poster, .px-video__play, etc.) live in
 * /assets/css/px-video.css (shared with inline video facade).
 */


/* ── Popup overlay ───────────────────────────── */

.px-video-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-d2);
}

.px-video-popup[hidden] {
	display: none;
}


/* ── Backdrop (navy + blur, instant) ─────────── */

.px-video-popup__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(16, 80, 112, 0.85);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}


/* ── Dialog (video + close button) ───────────── */

.px-video-popup__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 960px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--space-d075);
	animation: px-popup-in var(--duration-normal) var(--ease-smooth) both;
}

@keyframes px-popup-in {
	from {
		opacity: 0;
		transform: scale(0.96);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}


/* ── Close button (above video) ──────────────── */

.px-video-popup__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: none;
	color: var(--white);
	cursor: pointer;
	transition: background-color var(--duration-fast) var(--ease-smooth);
}

.px-video-popup__close:hover {
	background-color: rgba(255, 255, 255, 0.15);
}

.px-video-popup__close:focus-visible {
	outline: solid 3px var(--white);
	outline-offset: 2px;
}

.px-video-popup__close svg {
	width: 24px;
	height: 24px;
}


/* ── Video player (16:9, no border-radius) ───── */

.px-video-popup__player {
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: var(--black);
	overflow: hidden;
}

.px-video-popup__player iframe {
	width: 100%;
	height: 100%;
	border: 0;
}


/* ── Responsive ──────────────────────────────── */

@media (max-width: 767px) {
	.px-video-popup {
		padding: var(--space-d1);
	}
}
