/*
 * Holiday popup on the homepage — Naccarato Insurance
 *
 * A native <dialog> opened with showModal(): focus trap, Esc and the top
 * layer (above the chat button) come from the browser. Same format as the
 * old Popup Builder windows: 16:9, up to 728px wide, on a dark overlay
 * (black at 80%).
 * Depends on tokens.css.
 */

.holiday-popup {
	width: min(728px, calc(100vw - 32px));
	max-width: none;
	margin: auto;
	padding: 0;
	border: 0;
	background: #000;
	color: #fff;
	overflow: visible;
	box-shadow: 0 10px 40px rgb(0 0 0 / 0.5);
}

.holiday-popup:not([open]) {
	display: none;
}

.holiday-popup::backdrop {
	background-color: rgb(0 0 0 / 0.8);
}

.holiday-popup__stage {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}

.holiday-popup__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

.holiday-popup__video[hidden],
.holiday-popup__sound[hidden],
.holiday-popup__error[hidden] {
	display: none;
}

/* Close: a ring in the brand red, half over the corner so it never covers
   the picture, 44px touch target. */
.holiday-popup__close {
	position: absolute;
	top: -18px;
	right: -18px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0 0 3px;
	border: 2px solid var(--color-primary, #6c1524);
	border-radius: 50%;
	background: #fff;
	color: var(--color-primary, #6c1524);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.holiday-popup__close:hover,
.holiday-popup__close:focus-visible {
	background: var(--color-primary, #6c1524);
	color: #fff;
}

/* On a narrow screen there is no room outside the window: inside, top right. */
@media (max-width: 779px) {
	.holiday-popup__close {
		top: 8px;
		right: 8px;
		width: 40px;
		height: 40px;
		border-color: #fff;
		background: rgb(0 0 0 / 0.6);
		color: #fff;
	}
}

/* Only while the video plays muted. */
.holiday-popup__sound {
	position: absolute;
	left: 50%;
	bottom: 56px;
	z-index: 1;
	transform: translateX(-50%);
	padding: 10px 20px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: rgb(0 0 0 / 0.65);
	color: #fff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.holiday-popup__sound:hover,
.holiday-popup__sound:focus-visible {
	background: var(--color-primary, #6c1524);
}

.holiday-popup__error {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	margin: 0;
	padding: 24px;
	text-align: center;
}

html.holiday-popup-open {
	overflow: hidden;
}
