/* AQVA Menú QR viewer — mobile first. */

/* ------------------------------------------------------------------ */
/* Brand tokens (single source of truth; tune here).                   */
/* ------------------------------------------------------------------ */
.aqva-menu-qr,
.aqva-menu-qr-zoom,
.aqva-menu-qr-immersive {
	--aqva-maroon: #330000;
	--aqva-maroon-deep: #140000;
	--aqva-copper: #bc906b;
	--aqva-copper-rgb: 188, 144, 107;
	--aqva-sheet: #fff;
	--aqva-pill-bg: rgba(31, 0, 0, 0.92);
	--aqva-track: #5a2a2a;
	--aqva-hairline: rgba(var(--aqva-copper-rgb), 0.25);
	--aqva-frame: rgba(var(--aqva-copper-rgb), 0.7);
	--aqva-shimmer: rgba(var(--aqva-copper-rgb), 0.16);
	--aqva-font-display: 'Playfair Display', Georgia, serif;
	--aqva-font-body: 'Open Sans', Arial, sans-serif;
	--aqva-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ------------------------------------------------------------------ */
/* Component (standard layout).                                        */
/* ------------------------------------------------------------------ */
.aqva-menu-qr {
	box-sizing: border-box;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 8px;
	/* Children can never widen the component (and so never the page). */
	overflow-x: clip;
}

.aqva-menu-qr *,
.aqva-menu-qr *::before,
.aqva-menu-qr *::after {
	box-sizing: border-box;
}

.aqva-menu-qr [hidden] {
	display: none !important;
}

.aqva-menu-qr__sr,
.aqva-menu-qr__status.is-loading {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.aqva-menu-qr__status {
	margin: 16px 0;
	text-align: center;
}

.aqva-menu-qr__fallback,
.aqva-menu-qr__noscript {
	margin: 0 0 16px;
	text-align: center;
}

/* Maroon on the white theme background (copper would fail contrast). */
.aqva-menu-qr__fallback a,
.aqva-menu-qr__noscript a,
.aqva-menu-qr__pdf a {
	color: var(--aqva-maroon);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.aqva-menu-qr__fallback a:focus-visible,
.aqva-menu-qr__noscript a:focus-visible,
.aqva-menu-qr__pdf a:focus-visible {
	outline: 3px solid var(--aqva-maroon);
	outline-offset: 3px;
}

/* Discreet, always-present link to the PDF (below the pages). */
.aqva-menu-qr__pdf {
	margin: 4px 0 16px;
	text-align: center;
	font-size: 14px;
	line-height: 1.4;
}

.aqva-menu-qr__pdf a {
	display: inline-block;
	/* Comfortable touch target without looking like a button. */
	padding: 12px 8px;
	font-weight: 400;
}

.aqva-menu-qr__pages {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	min-width: 0;
}

.aqva-menu-qr__page {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--aqva-sheet);
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
	cursor: zoom-in;
	-webkit-tap-highlight-color: transparent;
}

.aqva-menu-qr__page:focus-visible {
	outline: 3px solid var(--aqva-copper);
	outline-offset: -3px;
}

.aqva-menu-qr__page canvas {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 300ms var(--aqva-ease), transform 300ms var(--aqva-ease);
}

.aqva-menu-qr__page.is-rendered canvas {
	opacity: 1;
	transform: none;
}

/* Skeleton: placeholder sheet before the PDF loads, and unrendered pages. */
.aqva-menu-qr__page--skeleton {
	aspect-ratio: 1 / 1.4142;
	cursor: default;
}

.aqva-menu-qr__page:not(.is-rendered) {
	background-image: linear-gradient(
		100deg,
		transparent 30%,
		var(--aqva-shimmer) 50%,
		transparent 70%
	);
	background-size: 250% 100%;
	background-repeat: no-repeat;
	animation: aqva-menu-qr-shimmer 1.6s linear infinite;
}

.aqva-menu-qr__page.is-failed {
	animation: none;
	background-image: none;
	cursor: default;
}

@keyframes aqva-menu-qr-shimmer {
	from {
		background-position: 100% 0;
	}
	to {
		background-position: -150% 0;
	}
}

/*
 * Full-bleed on narrow screens. viewer.js sets --aqva-bleed-width to the
 * viewport width without scrollbar (documentElement.clientWidth) and
 * --aqva-bleed-offset to the exact negative margin that puts the left edge at
 * x=0, so the right edge lands exactly on the viewport edge: no horizontal
 * scroll. The calc() fallback assumes a horizontally centered parent and
 * overlay scrollbars (mobile), where 100vw equals the layout viewport.
 */
@media (max-width: 600px) {
	.aqva-menu-qr {
		width: var(--aqva-bleed-width, 100vw);
		max-width: none;
		margin-left: var(--aqva-bleed-offset, calc(50% - 50vw));
		margin-right: 0;
		padding: 0;
	}

	.aqva-menu-qr__status,
	.aqva-menu-qr__fallback,
	.aqva-menu-qr__noscript,
	.aqva-menu-qr__pdf {
		padding-left: 8px;
		padding-right: 8px;
	}

	.aqva-menu-qr__pages {
		gap: 6px;
	}

	.aqva-menu-qr__page {
		border-radius: 0;
		box-shadow: none;
	}
}

/* ------------------------------------------------------------------ */
/* Page containing the shortcode (body class added server-side).        */
/* Divi 4 markup: #main-content > .container > #content-area >          */
/* #left-area > article > h1.entry-title.main_title.                    */
/* ------------------------------------------------------------------ */
.aqva-menu-qr-page .entry-title,
.aqva-menu-qr-page .main_title,
.aqva-menu-qr-page .et_post_meta_wrapper {
	display: none !important;
}

.aqva-menu-qr-page #main-content .container {
	padding-top: 12px;
}

/* Divi's sidebar divider line. */
.aqva-menu-qr-page #main-content .container::before {
	display: none !important;
}

/* Divi Builder layouts: trim the section/row padding around the viewer. */
.aqva-menu-qr-page .et_pb_section:has(.aqva-menu-qr) {
	padding-top: 12px;
}

.aqva-menu-qr-page .et_pb_row:has(.aqva-menu-qr) {
	padding-top: 0;
}

@media (max-width: 600px) {
	.aqva-menu-qr-page #main-content .container,
	.aqva-menu-qr-page .et_pb_section:has(.aqva-menu-qr) {
		padding-top: 8px;
	}
}

/*
 * [aqva_menu_qr whatsapp="hide"] (also implied by layout="immersive"):
 * hide the Social Chat button. Root is <div class="qlwapp ...">
 * (older versions also id="qlwapp").
 */
.aqva-menu-qr-no-chat .qlwapp,
.aqva-menu-qr-no-chat #qlwapp {
	display: none !important;
}

/* ------------------------------------------------------------------ */
/* Immersive layout: "the menu served on a maroon tablecloth".          */
/* Page level (body.aqva-menu-qr-immersive): only the menu is visible.  */
/* ------------------------------------------------------------------ */
.aqva-menu-qr-immersive #top-header,
.aqva-menu-qr-immersive #main-header,
.aqva-menu-qr-immersive #main-footer,
.aqva-menu-qr-immersive #footer-bottom,
.aqva-menu-qr-immersive .et-l--header,
.aqva-menu-qr-immersive .et-l--footer,
.aqva-menu-qr-immersive .et_pb_scroll_top,
.aqva-menu-qr-immersive #sidebar {
	display: none !important;
}

/* Divi sets padding-top on #page-container inline; the admin bar is untouched. */
.aqva-menu-qr-immersive #page-container,
.aqva-menu-qr-immersive.et_fixed_nav #page-container {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

body.aqva-menu-qr-immersive,
.aqva-menu-qr-immersive #page-container,
.aqva-menu-qr-immersive #et-main-area,
.aqva-menu-qr-immersive #main-content,
.aqva-menu-qr-immersive #main-content .container,
.aqva-menu-qr-immersive #content-area,
.aqva-menu-qr-immersive #left-area,
.aqva-menu-qr-immersive #main-content article,
.aqva-menu-qr-immersive .entry-content {
	background: var(--aqva-maroon) !important;
}

.aqva-menu-qr-immersive #main-content .container,
.aqva-menu-qr-immersive #content-area,
.aqva-menu-qr-immersive #left-area,
.aqva-menu-qr-immersive #main-content article,
.aqva-menu-qr-immersive .entry-content {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/*
 * Divi Builder pages: neutralize the section/row/column/module wrapping the
 * shortcode (progressive enhancement; browsers without :has() keep Divi's
 * spacing). Scoped to wrappers that contain the component.
 */
.aqva-menu-qr-immersive .et_pb_section:has(.aqva-menu-qr),
.aqva-menu-qr-immersive .et_pb_row:has(.aqva-menu-qr),
.aqva-menu-qr-immersive .et_pb_column:has(.aqva-menu-qr),
.aqva-menu-qr-immersive .et_pb_module:has(.aqva-menu-qr),
.aqva-menu-qr-immersive .et_pb_text_inner:has(.aqva-menu-qr),
.aqva-menu-qr-immersive .et_pb_code_inner:has(.aqva-menu-qr) {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
}

/*
 * Component level (works even if the body class is missing). Width: on
 * narrow screens the full-bleed rules above apply (exact viewport width even
 * if a wrapper was not neutralized); wider screens span the content area.
 */
.aqva-menu-qr--immersive {
	position: relative;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--aqva-maroon);
	color: var(--aqva-sheet);
	font-family: var(--aqva-font-body);
}

.aqva-menu-qr__brand {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	background: var(--aqva-maroon);
	border-bottom: 1px solid var(--aqva-hairline);
}

/*
 * Imagify (WebP) wraps the logo in <picture>. A percentage max-width on the
 * <img> would then resolve against the <picture>, shrinking, squashing and
 * left-aligning the logo. Center the wrapper and size the logo against the
 * viewport instead.
 */
.aqva-menu-qr__brand picture {
	display: flex;
	align-items: center;
	justify-content: center;
}

.aqva-menu-qr__brand img {
	display: block;
	width: auto;
	height: 40px;
	max-width: 85vw;
	object-fit: contain;
}

.aqva-menu-qr--immersive .aqva-menu-qr__pages {
	gap: 18px;
	padding: 18px 8px 32px;
}

.aqva-menu-qr--immersive .aqva-menu-qr__page {
	border-radius: 2px;
	outline: 1px solid var(--aqva-frame);
	outline-offset: 3px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.aqva-menu-qr--immersive .aqva-menu-qr__page:focus-visible {
	outline: 2px solid var(--aqva-copper);
	outline-offset: 4px;
}

.aqva-menu-qr--immersive .aqva-menu-qr__status,
.aqva-menu-qr--immersive .aqva-menu-qr__fallback,
.aqva-menu-qr--immersive .aqva-menu-qr__noscript {
	padding: 24px 16px 0;
	color: var(--aqva-sheet);
	font-family: var(--aqva-font-display);
	font-style: italic;
	font-size: 18px;
}

.aqva-menu-qr--immersive .aqva-menu-qr__fallback a,
.aqva-menu-qr--immersive .aqva-menu-qr__noscript a,
.aqva-menu-qr--immersive .aqva-menu-qr__pdf a {
	color: var(--aqva-copper);
}

.aqva-menu-qr--immersive .aqva-menu-qr__fallback a:focus-visible,
.aqva-menu-qr--immersive .aqva-menu-qr__noscript a:focus-visible,
.aqva-menu-qr--immersive .aqva-menu-qr__pdf a:focus-visible {
	outline-color: var(--aqva-copper);
}

/* Room below the link so the floating page indicator never covers it. */
.aqva-menu-qr--immersive .aqva-menu-qr__pdf {
	margin: 0;
	padding: 0 16px calc(72px + env(safe-area-inset-bottom, 0px));
	font-size: 13px;
	letter-spacing: 0.02em;
}

.aqva-menu-qr--immersive .aqva-menu-qr__pages:has(+ .aqva-menu-qr__pdf:not([hidden])) {
	padding-bottom: 8px;
}

@media (min-width: 601px) {
	.aqva-menu-qr--immersive {
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0;
	}
}

@media (min-width: 768px) {
	.aqva-menu-qr__brand {
		height: 72px;
	}

	.aqva-menu-qr__brand img {
		height: 46px;
	}

	.aqva-menu-qr--immersive .aqva-menu-qr__pages {
		max-width: 820px;
		margin: 0 auto;
		gap: 28px;
		padding: 28px 16px;
	}
}

/* Floating page indicator (immersive only; created by viewer.js). */
.aqva-menu-qr__pill {
	-webkit-appearance: none;
	appearance: none;
	position: fixed;
	left: 50%;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	/* 44px touch target, like the zoom view buttons. */
	min-height: 44px;
	margin: 0;
	padding: 10px 16px;
	border: 0.5px solid var(--aqva-copper);
	border-radius: 999px;
	background: var(--aqva-pill-bg);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
	color: var(--aqva-copper);
	font: inherit;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transform: translateX(-50%);
	opacity: 0;
	visibility: hidden;
	transition: opacity 250ms ease, visibility 0s linear 250ms;
	-webkit-tap-highlight-color: transparent;
}

.aqva-menu-qr__pill.is-visible {
	opacity: 1;
	visibility: visible;
	transition: opacity 250ms ease, visibility 0s;
}

.aqva-menu-qr__pill:focus-visible {
	outline: 2px solid var(--aqva-copper);
	outline-offset: 3px;
}

.aqva-menu-qr-zoom-open .aqva-menu-qr__pill {
	display: none;
}

.aqva-menu-qr__pill-count {
	font-family: var(--aqva-font-display);
	font-style: italic;
	font-weight: 500;
	font-size: 16px;
	white-space: nowrap;
}

.aqva-menu-qr__pill-current {
	color: var(--aqva-sheet);
}

.aqva-menu-qr__pill-total {
	color: var(--aqva-copper);
}

.aqva-menu-qr__pill-track {
	position: relative;
	display: block;
	width: 48px;
	height: 3px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--aqva-track);
}

.aqva-menu-qr__pill-fill {
	display: block;
	width: 0;
	height: 100%;
	background: var(--aqva-copper);
	transition: width 250ms var(--aqva-ease);
}

.aqva-menu-qr__pill svg {
	display: block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

/* ------------------------------------------------------------------ */
/* Zoom overlay (both layouts; appended to <body>).                     */
/* ------------------------------------------------------------------ */
.aqva-menu-qr-zoom {
	position: fixed;
	inset: 0;
	/* Above the Divi fixed header (99999) and chat/WhatsApp widgets. */
	z-index: 2147483647;
	display: flex;
	flex-direction: column;
	background: var(--aqva-maroon-deep);
	color: var(--aqva-sheet);
	font-family: var(--aqva-font-body);
	overscroll-behavior: contain;
}

.aqva-menu-qr-zoom[hidden] {
	display: none !important;
}

/*
 * Taps on the chrome never trigger browser double-tap or pinch zoom. `none`
 * (stricter than `manipulation`, which still allows pinch-zoom) is safe here:
 * the bars never scroll and taps still produce clicks.
 */
.aqva-menu-qr-zoom__bar,
.aqva-menu-qr-zoom__btn {
	touch-action: none;
}

.aqva-menu-qr-zoom__bar {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 8px;
}

.aqva-menu-qr-zoom__bar--top {
	padding-top: max(6px, env(safe-area-inset-top, 0px));
}

.aqva-menu-qr-zoom__bar--bottom {
	padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
}

/* 44px touch target with a 40px circular face. */
.aqva-menu-qr-zoom__btn {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--aqva-copper);
	font: inherit;
	line-height: 1;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.aqva-menu-qr-zoom__btn::before {
	content: '';
	position: absolute;
	inset: 2px;
	border: 0.5px solid var(--aqva-copper);
	border-radius: 50%;
	transition: background-color 150ms ease;
}

.aqva-menu-qr-zoom__btn svg {
	position: relative;
	display: block;
}

.aqva-menu-qr-zoom__btn:hover::before {
	background: rgba(var(--aqva-copper-rgb), 0.12);
}

.aqva-menu-qr-zoom__btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.aqva-menu-qr-zoom__btn:disabled:hover::before {
	background: transparent;
}

.aqva-menu-qr-zoom__btn:focus-visible,
.aqva-menu-qr-zoom__scroller:focus-visible {
	outline: 2px solid var(--aqva-copper);
	outline-offset: 2px;
}

.aqva-menu-qr-zoom__counter {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	font-family: var(--aqva-font-display);
	font-style: italic;
	font-weight: 500;
	font-size: 18px;
	color: var(--aqva-sheet);
}

.aqva-menu-qr-zoom__counter-dash {
	color: var(--aqva-copper);
}

.aqva-menu-qr-zoom__error {
	flex: 0 0 auto;
	margin: 0;
	padding: 8px 16px 10px;
	text-align: center;
	font-size: 15px;
	line-height: 1.4;
	color: var(--aqva-sheet);
}

.aqva-menu-qr-zoom__error a {
	color: var(--aqva-copper);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.aqva-menu-qr-zoom__error a:focus-visible {
	outline: 2px solid var(--aqva-copper);
	outline-offset: 2px;
}

.aqva-menu-qr-zoom__scroller {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	/*
	 * No pinch-zoom: the browser would zoom the whole page (controls
	 * included). viewer.js implements its own pinch on the content.
	 */
	touch-action: pan-x pan-y;
	overscroll-behavior: contain;
}

.aqva-menu-qr-zoom__content {
	margin: 0 auto;
	background: var(--aqva-sheet);
}

.aqva-menu-qr-zoom__content canvas {
	display: block;
	width: 100%;
	height: 100%;
	transition: opacity 150ms ease;
}

/* Page change: the old page dims, the new one fades in. */
.aqva-menu-qr-zoom__content canvas.is-stale {
	opacity: 0.25;
}

.aqva-menu-qr-zoom__content canvas.is-entering {
	animation: aqva-menu-qr-fade-in 180ms ease-out;
}

@keyframes aqva-menu-qr-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ------------------------------------------------------------------ */
/* Reduced motion: no shimmer, no translate, instant changes.           */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.aqva-menu-qr__page:not(.is-rendered) {
		animation: none;
		background-image: none;
	}

	.aqva-menu-qr__page canvas,
	.aqva-menu-qr__pill,
	.aqva-menu-qr__pill.is-visible,
	.aqva-menu-qr__pill-fill,
	.aqva-menu-qr-zoom__content canvas,
	.aqva-menu-qr-zoom__btn::before {
		transition: none;
	}

	.aqva-menu-qr__page canvas {
		transform: none;
	}

	.aqva-menu-qr-zoom__content canvas.is-entering {
		animation: none;
	}
}
