/**
 * Home promo popup — brand #200C80, radius 0, portrait flyer.
 */

.hm-promo {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: grid;
	place-items: center;
	padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.hm-promo[hidden] {
	display: none !important;
}

.hm-promo__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 4, 40, 0.72);
	cursor: pointer;
}

.hm-promo__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	max-width: min(560px, 94vw);
	max-height: 90vh;
	width: auto;
	outline: none;
}

.hm-promo__close {
	position: absolute;
	top: -2px;
	right: -2px;
	z-index: 2;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--hm-brand, #200c80);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	transform: translate(35%, -35%);
	box-shadow: 0 2px 10px rgba(10, 4, 40, 0.35);
}

.hm-promo__close:hover,
.hm-promo__close:focus-visible {
	background: var(--hm-brand-dark, #16085c);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.hm-promo__figure {
	margin: 0;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	box-shadow: 0 12px 40px rgba(10, 4, 40, 0.45);
}

.hm-promo__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 0;
	vertical-align: middle;
}

body.hm-promo-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
	.hm-promo:not([hidden]) .hm-promo__backdrop {
		animation: hm-promo-fade 180ms ease-out;
	}

	.hm-promo:not([hidden]) .hm-promo__dialog {
		animation: hm-promo-rise 220ms ease-out;
	}
}

@keyframes hm-promo-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes hm-promo-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
