/* Hoteles Hi Querétaro Promo Popup — v1.0.0
   Mismo lenguaje visual que el pop up de Fundidora (hoteles-hi-destinos-popup). */

@font-face {
	font-family: "Outfit HiQ";
	src: url("../fonts/outfit-latin.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

.hiqp-overlay,
.hiqp-overlay *,
.hiqp-reopen,
.hiqp-reopen * {
	box-sizing: border-box;
}

.hiqp-overlay[hidden],
.hiqp-reopen[hidden] {
	display: none !important;
}

body.hiqp-scroll-lock {
	overflow: hidden;
}

/* ---------- Overlay ---------- */
#hiqp-popup {
	--hiqp-orange: #eb4f05;
	--hiqp-orange-deep: #c94204;
	--hiqp-magenta: #ff00de;
	--hiqp-brown: #493326;
	--hiqp-ink: #2d211a;
	--hiqp-cream: #f5efe8;
	--hiqp-muted: #74675e;
	--hiqp-white: #ffffff;

	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	place-items: center;
	padding: max(28px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px)) max(28px, env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px));
	font-family: "Outfit HiQ", "Outfit Hi", Arial, Helvetica, sans-serif;
	line-height: 1.4;
	opacity: 0;
	transition: opacity 220ms ease;
	-webkit-font-smoothing: antialiased;
}

#hiqp-popup.is-visible {
	opacity: 1;
}

#hiqp-popup .hiqp-scrim {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(37, 24, 16, 0.72);
	box-shadow: none;
	cursor: pointer;
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

/* ---------- Dialog ---------- */
#hiqp-popup .hiqp-dialog {
	position: relative;
	z-index: 1;
	isolation: isolate;
	width: min(820px, 100%);
	max-height: calc(100vh - 56px);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	margin: 0;
	padding: 34px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 30px;
	background:
		radial-gradient(circle at calc(100% - 45px) 35px, transparent 73px, rgba(235, 79, 5, 0.08) 74px, rgba(235, 79, 5, 0.08) 150px, transparent 151px),
		var(--hiqp-cream);
	color: var(--hiqp-ink);
	text-align: left;
	box-shadow: 0 30px 90px rgba(28, 17, 10, 0.42);
	opacity: 0;
	transform: translateY(18px) scale(0.97);
	transition:
		opacity 280ms ease,
		transform 350ms cubic-bezier(0.22, 0.8, 0.24, 1);
}

@supports (height: 100dvh) {
	#hiqp-popup .hiqp-dialog {
		max-height: calc(100dvh - 56px);
	}
}

#hiqp-popup.is-visible .hiqp-dialog {
	opacity: 1;
	transform: none;
}

#hiqp-popup .hiqp-close {
	position: absolute;
	z-index: 3;
	top: 18px;
	right: 18px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	min-width: 0;
	margin: 0;
	padding: 0 0 2px;
	border: 0;
	border-radius: 50%;
	background: var(--hiqp-brown);
	color: var(--hiqp-white);
	font-family: inherit;
	font-size: 25px;
	font-weight: 400;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
}

#hiqp-popup .hiqp-close:hover {
	background: var(--hiqp-orange);
}

#hiqp-popup .hiqp-close:focus-visible {
	outline: 3px solid rgba(235, 79, 5, 0.35);
	outline-offset: 2px;
}

/* ---------- Heading ---------- */
#hiqp-popup .hiqp-heading {
	display: grid;
	gap: 6px;
	padding: 6px 56px 22px 0;
}

#hiqp-popup .hiqp-eyebrow {
	margin: 0;
	color: var(--hiqp-orange);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: 0.12em;
	text-transform: none;
}

#hiqp-popup .hiqp-brand {
	font-size: 1.15em;
	letter-spacing: 0.02em;
}

#hiqp-popup .hiqp-description {
	margin: 0;
	color: var(--hiqp-muted);
	font-size: 15px;
	line-height: 1.55;
}

#hiqp-popup .hiqp-description b {
	color: var(--hiqp-ink);
	font-weight: 600;
}

/* ---------- Offer cards ---------- */
#hiqp-popup .hiqp-offers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

#hiqp-popup .hiqp-offer {
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
	min-width: 0;
	margin: 0;
	border-radius: 22px;
	background: var(--hiqp-white);
	box-shadow: 0 12px 32px rgba(73, 51, 38, 0.11);
}

#hiqp-popup .hiqp-visual {
	position: relative;
	height: 210px;
	overflow: hidden;
}

#hiqp-popup .hiqp-visual > img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: center 55%;
}

#hiqp-popup .hiqp-copy {
	padding: 18px 20px 20px;
}

#hiqp-popup .hiqp-copy > :last-child {
	margin-bottom: 0;
}

#hiqp-popup .hiqp-tag {
	display: inline-block;
	margin: 0 0 6px;
	color: var(--hiqp-orange);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

#hiqp-popup .hiqp-lead {
	margin: 0 0 8px;
	padding: 0;
	color: var(--hiqp-ink);
	font-family: inherit;
	font-size: clamp(30px, 4vw, 40px);
	font-weight: 800;
	line-height: 0.95;
	letter-spacing: -0.045em;
	text-transform: none;
	text-wrap: balance;
}

#hiqp-popup .hiqp-hl {
	color: var(--hiqp-magenta);
}

#hiqp-popup .hiqp-hl-orange {
	color: var(--hiqp-orange);
}

#hiqp-popup .hiqp-copy p {
	margin: 0;
	color: var(--hiqp-muted);
	font-size: 14px;
	line-height: 1.45;
}

#hiqp-popup .hiqp-copy p strong {
	color: var(--hiqp-ink);
	font-weight: 600;
}

/* Sunday visual: week strip + tilted price */
#hiqp-popup .hiqp-visual--sunday {
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 10px;
	background: var(--hiqp-brown);
}

#hiqp-popup .hiqp-visual--sunday::after {
	content: "";
	position: absolute;
	right: -46px;
	bottom: -70px;
	width: 180px;
	height: 180px;
	border: 36px solid rgba(255, 0, 222, 0.1);
	border-radius: 50%;
	pointer-events: none;
}

#hiqp-popup .hiqp-week {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

#hiqp-popup .hiqp-week li {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.45);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	list-style: none;
}

#hiqp-popup .hiqp-week li::before,
#hiqp-popup .hiqp-week li::marker {
	content: none;
}

#hiqp-popup .hiqp-week li.is-sunday {
	width: auto;
	height: 34px;
	padding: 0 14px;
	border: 0;
	border-radius: 999px;
	background: var(--hiqp-magenta);
	color: var(--hiqp-white);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	box-shadow: 0 0 0 4px rgba(255, 0, 222, 0.25), 0 8px 20px rgba(255, 0, 222, 0.35);
}

#hiqp-popup .hiqp-price {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	gap: 3px;
	margin: 0;
	color: var(--hiqp-magenta);
	line-height: 0.85;
	white-space: nowrap;
	transform: rotate(-7deg);
}

#hiqp-popup .hiqp-price-sign {
	margin-top: 8px;
	font-size: 40px;
	font-weight: 800;
}

#hiqp-popup .hiqp-price-amount {
	font-size: 116px;
	font-weight: 800;
	letter-spacing: -0.05em;
	font-variant-numeric: tabular-nums;
}

#hiqp-popup .hiqp-price-unit {
	align-self: flex-end;
	margin: 0 0 12px 6px;
	color: var(--hiqp-white);
	font-size: 19px;
	font-weight: 600;
}

/* ---------- Buttons ---------- */
#hiqp-popup .hiqp-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin-top: 20px;
}

#hiqp-popup .hiqp-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 14px 22px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

#hiqp-popup .hiqp-btn svg {
	flex: none;
	width: 18px;
	height: 18px;
}

#hiqp-popup .hiqp-btn--primary,
#hiqp-popup .hiqp-btn--primary:visited {
	background: var(--hiqp-brown);
	color: var(--hiqp-white);
}

#hiqp-popup .hiqp-btn--primary:hover,
#hiqp-popup .hiqp-btn--primary:focus-visible {
	background: var(--hiqp-orange);
	color: var(--hiqp-white);
}

#hiqp-popup .hiqp-btn--primary small {
	font-size: 14px;
	font-weight: 500;
	opacity: 0.85;
}

#hiqp-popup .hiqp-btn--secondary,
#hiqp-popup .hiqp-btn--secondary:visited {
	border-color: var(--hiqp-brown);
	background: transparent;
	color: var(--hiqp-brown);
}

#hiqp-popup .hiqp-btn--secondary:hover,
#hiqp-popup .hiqp-btn--secondary:focus-visible {
	border-color: var(--hiqp-orange);
	color: var(--hiqp-orange);
}

#hiqp-popup .hiqp-btn:focus-visible {
	outline: 3px solid rgba(235, 79, 5, 0.3);
	outline-offset: 2px;
}

/* ---------- Floating reopen button ---------- */
#hiqp-reopen {
	position: fixed;
	z-index: 999998;
	left: max(20px, env(safe-area-inset-left, 0px));
	bottom: max(20px, env(safe-area-inset-bottom, 0px));
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 12px 18px 12px 14px;
	border: 0;
	border-radius: 999px;
	background: #eb4f05;
	color: #ffffff;
	font-family: "Outfit HiQ", "Outfit Hi", Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	box-shadow: 0 10px 28px rgba(235, 79, 5, 0.38);
	cursor: pointer;
}

#hiqp-reopen:hover,
#hiqp-reopen:focus-visible {
	background: #c94204;
}

#hiqp-reopen:focus-visible {
	outline: 3px solid rgba(235, 79, 5, 0.3);
	outline-offset: 2px;
}

#hiqp-reopen .hiqp-reopen-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

/* =========================================================
   Adaptativo
   ========================================================= */

/* Laptops y pantallas poco altas (ej. 1366x768, iPad horizontal) */
@media (min-width: 641px) and (max-height: 820px) {
	#hiqp-popup .hiqp-dialog { padding: 26px 30px 28px; }
	#hiqp-popup .hiqp-heading { padding-bottom: 16px; }
	#hiqp-popup .hiqp-visual { height: 168px; }
	#hiqp-popup .hiqp-price-amount { font-size: 96px; }
	#hiqp-popup .hiqp-price-sign { font-size: 34px; }
	#hiqp-popup .hiqp-price-unit { margin-bottom: 10px; font-size: 17px; }
	#hiqp-popup .hiqp-lead { font-size: clamp(28px, 3.4vw, 36px); }
	#hiqp-popup .hiqp-actions { margin-top: 16px; }
}

/* Tablets en vertical y ventanas medianas */
@media (min-width: 641px) and (max-width: 900px) {
	#hiqp-popup { padding: max(24px, env(safe-area-inset-top, 0px)) 24px max(24px, env(safe-area-inset-bottom, 0px)); }
	#hiqp-popup .hiqp-dialog { padding: 28px; }
	#hiqp-popup .hiqp-price-amount { font-size: clamp(84px, 12vw, 116px); }
}

/* Celulares */
@media (max-width: 640px) {
	#hiqp-popup {
		align-items: end;
		padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
	}
	#hiqp-popup .hiqp-dialog {
		max-height: calc(100vh - 20px);
		padding: 18px 14px 14px;
		border-radius: 24px;
	}
	@supports (height: 100dvh) {
		#hiqp-popup .hiqp-dialog { max-height: calc(100dvh - 20px); }
	}
	#hiqp-popup .hiqp-dialog {
		background:
			radial-gradient(circle at 100% 10px, transparent 73px, rgba(235, 79, 5, 0.08) 74px, rgba(235, 79, 5, 0.08) 150px, transparent 151px),
			var(--hiqp-cream);
	}
	#hiqp-popup .hiqp-close { top: 12px; right: 12px; width: 32px; height: 32px; font-size: 21px; }
	#hiqp-popup .hiqp-heading { gap: 4px; padding: 2px 40px 12px 2px; }
	#hiqp-popup .hiqp-eyebrow { font-size: 11px; }
	#hiqp-popup .hiqp-description { font-size: 13px; line-height: 1.4; }
	#hiqp-popup .hiqp-offers { grid-template-columns: 1fr; gap: 8px; }
	#hiqp-popup .hiqp-offer { border-radius: 16px; }
	#hiqp-popup .hiqp-visual { height: 104px; }
	#hiqp-popup .hiqp-visual--sunday { height: 112px; gap: 4px; }
	#hiqp-popup .hiqp-visual--sunday::after { right: -36px; bottom: -56px; width: 130px; height: 130px; border-width: 26px; }
	#hiqp-popup .hiqp-week { gap: 4px; }
	#hiqp-popup .hiqp-week li { width: 22px; height: 22px; font-size: 10px; }
	#hiqp-popup .hiqp-week li.is-sunday { height: 26px; padding: 0 10px; font-size: 10px; }
	#hiqp-popup .hiqp-price-sign { margin-top: 5px; font-size: 22px; }
	#hiqp-popup .hiqp-price-amount { font-size: 64px; }
	#hiqp-popup .hiqp-price-unit { margin-bottom: 7px; font-size: 14px; }
	#hiqp-popup .hiqp-copy { padding: 12px 14px 14px; }
	#hiqp-popup .hiqp-tag { margin-bottom: 4px; font-size: 9px; }
	#hiqp-popup .hiqp-lead { margin-bottom: 6px; font-size: 26px; }
	#hiqp-popup .hiqp-copy p { font-size: 13px; }
	#hiqp-popup .hiqp-actions { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 12px; }
	#hiqp-popup .hiqp-btn { justify-content: center; padding: 13px 18px; font-size: 14px; }
	#hiqp-reopen { left: max(14px, env(safe-area-inset-left, 0px)); bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
}

/* Celulares chicos (iPhone SE, Android compactos) */
@media (max-width: 360px), (max-width: 640px) and (max-height: 700px) {
	#hiqp-popup .hiqp-description { display: none; }
	#hiqp-popup .hiqp-heading { padding-bottom: 10px; }
	#hiqp-popup .hiqp-visual { height: 84px; }
	#hiqp-popup .hiqp-visual--sunday { height: 92px; }
	#hiqp-popup .hiqp-copy { padding: 10px 14px 12px; }
	#hiqp-popup .hiqp-week li { width: 20px; height: 20px; }
	#hiqp-popup .hiqp-price-amount { font-size: 56px; }
	#hiqp-popup .hiqp-lead { font-size: 23px; }
	#hiqp-popup .hiqp-btn { padding: 12px 14px; }
	#hiqp-popup .hiqp-btn--primary small { font-size: 13px; }
}

/* Pantallas muy bajas en vertical (320x568) */
@media (max-width: 640px) and (max-height: 600px) {
	#hiqp-popup .hiqp-dialog { padding-top: 14px; }
	#hiqp-popup .hiqp-visual { height: 72px; }
	#hiqp-popup .hiqp-visual--sunday { height: 84px; gap: 2px; }
	#hiqp-popup .hiqp-price-amount { font-size: 50px; }
	#hiqp-popup .hiqp-lead { font-size: 21px; margin-bottom: 4px; }
	#hiqp-popup .hiqp-copy p { font-size: 12px; }
	#hiqp-popup .hiqp-btn { padding: 11px 14px; }
	#hiqp-popup .hiqp-actions { margin-top: 10px; }
}

/* Celulares en horizontal (pantalla muy baja) */
@media (min-width: 641px) and (max-height: 520px) {
	#hiqp-popup { padding: max(10px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
	#hiqp-popup .hiqp-dialog { max-height: calc(100vh - 20px); padding: 16px 20px; border-radius: 22px; }
	@supports (height: 100dvh) {
		#hiqp-popup .hiqp-dialog { max-height: calc(100dvh - 20px); }
	}
	#hiqp-popup .hiqp-close { top: 10px; right: 10px; width: 32px; height: 32px; font-size: 21px; }
	#hiqp-popup .hiqp-description { display: none; }
	#hiqp-popup .hiqp-heading { padding: 0 44px 10px 0; }
	#hiqp-popup .hiqp-offers { gap: 10px; }
	#hiqp-popup .hiqp-visual { height: 88px; }
	#hiqp-popup .hiqp-visual--sunday { gap: 4px; }
	#hiqp-popup .hiqp-week li { width: 22px; height: 22px; font-size: 10px; }
	#hiqp-popup .hiqp-week li.is-sunday { height: 26px; padding: 0 10px; font-size: 10px; }
	#hiqp-popup .hiqp-price-amount { font-size: 54px; }
	#hiqp-popup .hiqp-price-sign { margin-top: 5px; font-size: 22px; }
	#hiqp-popup .hiqp-price-unit { margin-bottom: 7px; font-size: 14px; }
	#hiqp-popup .hiqp-copy { padding: 10px 14px 12px; }
	#hiqp-popup .hiqp-lead { font-size: 24px; }
	#hiqp-popup .hiqp-actions { margin-top: 10px; }
	#hiqp-popup .hiqp-btn { padding: 11px 18px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	#hiqp-popup,
	#hiqp-popup .hiqp-dialog {
		transition: none;
	}
	#hiqp-popup .hiqp-dialog {
		transform: none;
	}
}
