/**
 * Pop-up de evento (inc/event-popup.php). Estilo H.O: Playfair + cor barro.
 */

.menin-event-popup[hidden] {
	display: none;
}

.menin-event-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	transition: opacity 0.35s ease;
}

.menin-event-popup.is-open {
	opacity: 1;
}

.menin-event-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, 0.72);
	cursor: pointer;
}

.menin-event-popup__dialog {
	position: relative;
	display: flex;
	width: 100%;
	max-width: 960px;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	background: #AD644E;
	color: #fff;
	overflow: hidden;
	transform: translateY(16px);
	transition: transform 0.35s ease;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.menin-event-popup.is-open .menin-event-popup__dialog {
	transform: none;
}

.menin-event-popup__media {
	flex: 0 0 50%;
	display: block;
	aspect-ratio: 1 / 1;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	background: #141414;
}

.menin-event-popup__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.menin-event-popup__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 20px;
	padding: 56px 48px;
	overflow-y: auto;
}

.menin-event-popup__eyebrow {
	margin: 0;
	font-family: 'Satoshi', sans-serif;
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.85;
}

.menin-event-popup__title {
	margin: 0;
	font-family: 'Playfair Display', serif;
	font-weight: 400;
	font-size: 34px;
	line-height: 1.2;
	color: #fff;
}

.menin-event-popup__text {
	margin: 0;
	font-family: 'Satoshi', sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

.menin-event-popup__cta.btn {
	margin-top: 12px;
	padding: 10px 28px;
}

.menin-event-popup__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(20, 20, 20, 0.35);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease;
}

.menin-event-popup__close:hover,
.menin-event-popup__close:focus-visible {
	background: rgba(20, 20, 20, 0.6);
}

body.menin-event-popup-open {
	overflow: hidden;
}

@media (max-width: 767.98px) {
	.menin-event-popup {
		padding: 16px;
	}

	.menin-event-popup__dialog {
		flex-direction: column;
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
		overflow-y: auto;
	}

	/* Imagem limitada à altura para o botão ficar visível sem scroll. */
	.menin-event-popup__media {
		flex: 0 0 auto;
		width: 100%;
		aspect-ratio: auto;
		height: min(100vw - 32px, 52vh);
		height: min(100vw - 32px, 52dvh);
		max-height: none;
	}

	.menin-event-popup__media img {
		object-fit: contain;
	}

	/* O cartaz já traz a descrição: no telemóvel fica só data, título e botão. */
	.menin-event-popup__text {
		display: none;
	}

	.menin-event-popup__body {
		gap: 12px;
		padding: 22px 24px 26px;
		overflow: visible;
	}

	.menin-event-popup__title {
		font-size: 24px;
	}

	.menin-event-popup__cta.btn {
		margin-top: 6px;
	}

}

@media (prefers-reduced-motion: reduce) {
	.menin-event-popup,
	.menin-event-popup__dialog {
		transition: none;
	}
}
