/* =========================================================
   GO FIESTA — Popup banner
   Image-led promo modal. The image sets the size; the shell
   is just a frame, a close button and a scrim.
   ========================================================= */

.gf-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: clamp(16px, 4vw, 40px);
	background: rgba(42, 10, 10, 0.72);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.gf-popup.is-open {
	opacity: 1;
	visibility: visible;
}

.gf-popup__box {
	position: relative;
	width: min(var(--gf-popup-w, 460px), 100%);
	max-height: calc(100dvh - clamp(32px, 8vw, 80px));
	border-radius: var(--gf-radius-lg, 28px);
	overflow: visible;
	transform: translateY(18px) scale(0.97);
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.gf-popup.is-open .gf-popup__box {
	transform: none;
}

/* The banderitas rail ties the popup to the rest of the site */
.gf-popup__frame {
	position: relative;
	border-radius: inherit;
	overflow: hidden;
	background: var(--gf-maroon-deep, #4a0a0d);
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
	border: 4px solid var(--gf-gold, #ffc53d);
	max-height: inherit;
}

.gf-popup__frame .gf-banderitas {
	position: absolute;
	inset: 0 0 auto;
	z-index: 2;
}

.gf-popup__media {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100dvh - clamp(48px, 10vw, 96px));
	object-fit: contain;
	background: var(--gf-maroon-deep, #4a0a0d);
}

a.gf-popup__link {
	display: block;
	line-height: 0;
	border-radius: inherit;
}

/* Text block — only rendered when a heading or body is set */
.gf-popup__text {
	padding: 22px 26px 26px;
	text-align: center;
	background: var(--gf-maroon, #6b1013);
	color: var(--gf-cream, #fff4e0);
}
.gf-popup__text h2 {
	margin: 0 0 8px;
	font-family: var(--gf-font-display), sans-serif;
	font-size: clamp(1.3rem, 3vw, 1.7rem);
	color: var(--gf-gold, #ffc53d);
	line-height: 1.15;
}
.gf-popup__text p {
	margin: 0 0 18px;
	font-size: 0.97rem;
	color: rgba(255, 244, 224, 0.84);
}
.gf-popup__text .gf-btn {
	margin: 0;
}

/* Close button sits on the frame corner, not inside the image */
.gf-popup__close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 5;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 3px solid var(--gf-cream, #fff4e0);
	background: var(--gf-red, #d62828);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.6);
	transition: transform 0.18s ease, background 0.18s ease;
}
.gf-popup__close:hover,
.gf-popup__close:focus-visible {
	background: var(--gf-maroon, #6b1013);
	transform: rotate(90deg) scale(1.06);
}
.gf-popup__close:focus-visible {
	outline: 3px solid var(--gf-gold, #ffc53d);
	outline-offset: 2px;
}

/* Countdown hint — reassures that it will come back, and that it can be silenced */
.gf-popup__hint {
	margin: 14px auto 0;
	padding-inline: 8px;
	max-width: 44ch;
	text-align: center;
	font-size: 0.8rem;
	line-height: 1.45;
	color: rgba(255, 244, 224, 0.72);
}

.gf-popup__sep {
	margin-inline: 4px;
	opacity: 0.6;
}
.gf-popup__hint button {
	background: none;
	border: 0;
	padding: 0;
	color: var(--gf-gold, #ffc53d);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

body.gf-popup-open {
	overflow: hidden;
}

@media (max-width: 560px) {
	.gf-popup {
		/* Leave room for the close button to sit outside the frame. */
		padding: 26px 20px;
	}
	.gf-popup__close {
		top: -12px;
		right: -12px;
		width: 40px;
		height: 40px;
	}
	.gf-popup__hint {
		font-size: 0.76rem;
		max-width: none;
	}
	/* Stack cleanly instead of orphaning the separator on its own line. */
	.gf-popup__hint .gf-popup__sep {
		display: none;
	}
	.gf-popup__hint button {
		display: block;
		margin: 4px auto 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gf-popup,
	.gf-popup__box {
		transition: none;
	}
}
