/* Merlows promo video pop-up (inc/promo-popup.php, assets/js/promo-popup.js).
   A native <dialog> shown with showModal() sits in the browser's top layer, so it needs no z-index. */

.mlws-promo {
	--mp-navy: #0E2A5C;
	--mp-gold: #D4AF37;
	--mp-crimson: #A3172A;   /* darker than the brand crimson: 6.9:1 on cream for the small kicker */
	--mp-cream: #FAF8F3;
	--mp-ink: #0F172A;
	--mp-muted: #475569;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--mp-ink);
	width: min(960px, calc(100vw - 32px));
	max-width: none;
	max-height: none;
	overflow: visible;
}
.mlws-promo::backdrop { background: rgba(7, 12, 22, 0.74); }
html.mlws-promo-open { overflow: hidden; }

.mlws-promo__inner {
	display: flex;
	flex-direction: column;
	max-height: calc(100dvh - 32px);
	background: var(--mp-cream);
	border-top: 4px solid var(--mp-gold);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

.mlws-promo__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px 14px 24px;
}
.mlws-promo__kicker {
	margin: 0 0 4px;
	font: 700 12px/1.3 'Outfit', 'Inter', system-ui, sans-serif;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mp-crimson);
}
.mlws-promo__title {
	margin: 0;
	font: 700 clamp(19px, 2.4vw, 26px)/1.2 'Outfit', 'Inter', system-ui, sans-serif;
	color: var(--mp-navy);
}

.mlws-promo__close {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: -4px -6px 0 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mp-navy);
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.mlws-promo__close:hover { background: rgba(14, 42, 92, 0.08); }

.mlws-promo__media {
	position: relative;
	background: #070C16;
	aspect-ratio: 16 / 9;
	width: 100%;
	min-height: 0;
}
.mlws-promo__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #070C16;
}

.mlws-promo__play {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	border: 0;
	padding: 0;
	background: linear-gradient(to top, rgba(7, 12, 22, 0.55), rgba(7, 12, 22, 0.05) 55%);
	color: #fff;
	cursor: pointer;
}
.mlws-promo__play-icon {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	padding-left: 4px;   /* optical centre of the triangle */
	border-radius: 50%;
	background: var(--mp-gold);
	color: var(--mp-navy);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, background-color 0.2s ease;
}
.mlws-promo__play:hover .mlws-promo__play-icon { background: #E2C25A; }
.mlws-promo__play-label {
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(7, 12, 22, 0.7);
	font: 700 15px/1.2 'Outfit', 'Inter', system-ui, sans-serif;
}
.mlws-promo.is-playing .mlws-promo__play { display: none; }
.mlws-promo__play:disabled { cursor: default; }
.mlws-promo__play:disabled .mlws-promo__play-icon { display: none; }

.mlws-promo__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 20px 16px 24px;
}
.mlws-promo__note {
	margin: 0;
	font: 500 14px/1.4 'Inter', system-ui, sans-serif;
	color: var(--mp-muted);
}
.mlws-promo__cta {
	flex: none;
	min-height: 48px;
	padding: 0 26px;
	border: 0;
	border-radius: 0;
	background: var(--mp-navy);
	color: #fff;
	font: 700 16px/1 'Outfit', 'Inter', system-ui, sans-serif;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.mlws-promo__cta:hover { background: #1B4F8A; }

.mlws-promo__close:focus-visible,
.mlws-promo__cta:focus-visible,
.mlws-promo__video:focus-visible { outline: 3px solid var(--mp-gold); outline-offset: 2px; }
.mlws-promo__play:focus-visible { outline: none; }
.mlws-promo__play:focus-visible .mlws-promo__play-icon { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--mp-navy); }

/* Phones in portrait get the 9:16 cut, sized to the screen height. */
.mlws-promo.is-tall { width: min(440px, calc(100vw - 24px)); }
.mlws-promo.is-tall .mlws-promo__inner { max-height: calc(100dvh - 24px); }
.mlws-promo.is-tall .mlws-promo__head { padding: 14px 12px 10px 18px; }
.mlws-promo.is-tall .mlws-promo__media {
	aspect-ratio: 9 / 16;
	width: auto;
	height: min(62dvh, calc(min(440px, 100vw - 24px) * 16 / 9));
	margin: 0 auto;
}
.mlws-promo.is-tall .mlws-promo__foot { padding: 12px 12px 14px 18px; }

@media (max-width: 480px) {
	.mlws-promo__note { font-size: 13px; }
	.mlws-promo__cta { padding: 0 18px; }
}

/* Short screens (phones in landscape): give the height to the video. */
@media (max-height: 520px) {
	.mlws-promo__kicker, .mlws-promo__note { display: none; }
	.mlws-promo__head { padding: 8px 12px 6px 18px; align-items: center; }
	.mlws-promo__title { font-size: 17px; }
	.mlws-promo__foot { padding: 8px 12px; justify-content: flex-end; }
	.mlws-promo__cta { min-height: 44px; }
}

@media (prefers-reduced-motion: no-preference) {
	.mlws-promo[open] .mlws-promo__inner { animation: mlws-promo-in 0.24s ease-out; }
	.mlws-promo[open]::backdrop { animation: mlws-promo-fade 0.24s ease-out; }
	.mlws-promo__play:hover .mlws-promo__play-icon { transform: scale(1.06); }
}
@keyframes mlws-promo-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes mlws-promo-fade { from { opacity: 0; } to { opacity: 1; } }
