/**
 * Menu editorial — modo FLIPBOOK (folhear). Mostra uma página de cada vez com
 * animação de virar. Carregado sobre editorial.css quando view=flipbook.
 */

body.view-flipbook{
	overflow:hidden;
	height:100vh;
	height:100dvh; /* altura dinâmica: lida com a barra de endereço do Android */
	margin:0;
}

.mst-flipbook{
	position:fixed;
	inset:0;
	display:flex;
	flex-direction:column;
	height:100vh;
	height:100dvh;
}

.mst-flip-stage{
	position:relative;
	flex:1 1 auto;
	min-height:0;
	perspective:2400px;
	overflow:hidden;
	cursor:grab;
	touch-action:none; /* deixa o JS gerir pinch/pan/swipe */
}
.mst-flip-stage.is-zoomed{cursor:grab}
.mst-flip-stage.is-zoomed:active{cursor:grabbing}
/* Os links dos pratos recebem o cursor de mão, acima do palco */
.mst-flip-stage .dish-link{cursor:pointer;position:relative;z-index:5}

/* Cada página é uma folha: tamanho real (210×296mm), centrada e escalada por JS */
.mst-flip-stage .page{
	position:absolute;
	left:50%;
	top:50%;
	margin:0;
	transform-origin:center center;
	transition:transform .55s cubic-bezier(.2,.7,.2,1), opacity .42s ease;
	opacity:0;
	backface-visibility:hidden;
	box-shadow:0 14px 50px rgba(0,0,0,.28);
	will-change:transform,opacity;
}

/* Barra de controlo */
.mst-flip-ui{
	flex:0 0 auto;
	display:flex;
	align-items:center;
	justify-content:center;
	gap:20px;
	padding:12px;
	background:rgba(0,0,0,.05);
	touch-action:manipulation; /* sem duplo-toque-zoom nativo nos controlos */
}
.mst-flip-btn{
	width:46px;height:46px;
	border:0;border-radius:999px;
	background:var(--brand,#B0703E);
	color:#fff;cursor:pointer;
	display:flex;align-items:center;justify-content:center;
	transition:opacity .2s ease,transform .15s ease;
	touch-action:manipulation;
	-webkit-tap-highlight-color:transparent;
	-webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.mst-flip-btn:hover{opacity:.9}
.mst-flip-btn:active{transform:scale(.94)}
.mst-flip-btn[disabled]{opacity:.32;cursor:default}
.mst-flip-btn svg{width:22px;height:22px}
.mst-flip-count{
	font:500 14px/1 var(--font-body,sans-serif);
	color:var(--muted,#8a7f74);
	min-width:64px;text-align:center;letter-spacing:.5px;
}
.mst-flip-count b{color:var(--ink,#2b2520);font-weight:600}

/* Em impressão, o flipbook volta a documento empilhado (cada página A4) */
@media print{
	body.view-flipbook{overflow:visible;height:auto}
	.mst-flipbook{position:static}
	.mst-flip-ui{display:none}
	.mst-flip-stage{perspective:none;overflow:visible;height:auto}
	.mst-flip-stage .page{
		position:relative;left:auto;top:auto;
		transform:none !important;opacity:1 !important;
		box-shadow:none;margin:0;page-break-after:always;
	}
}
