/* Public menu: shared by every template. Colors come from the CSS variables set in views/menu/index.pug */

:root {
	--scale: 1;
	--soft: color-mix(in srgb, var(--accent) 12%, var(--card));
	--pad: max(16px, env(safe-area-inset-left));
}
html.big {
	--scale: 1.15;
}
* {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}
html {
	scroll-behavior: smooth;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font:
		calc(15px * var(--scale))/1.45 Inter,
		system-ui,
		-apple-system,
		sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-align: left;
}
a {
	color: inherit;
}
svg {
	flex: none;
}
.wrap {
	max-width: 760px;
	margin: 0 auto;
}

.draft {
	background: #fde68a;
	color: #713f12;
	text-align: center;
	font-size: 13px;
	padding: 6px var(--pad);
}

/* Cover + identity */
.hero {
	position: relative;
	height: clamp(150px, 42vw, 260px);
	background: var(--accent);
	overflow: hidden;
}
.hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.hero.pattern {
	background:
		radial-gradient(
			circle at 15% 30%,
			color-mix(in srgb, var(--on-accent) 14%, transparent) 0 18%,
			transparent 19%
		),
		radial-gradient(
			circle at 85% 70%,
			color-mix(in srgb, var(--on-accent) 10%, transparent) 0 24%,
			transparent 25%
		),
		radial-gradient(
			circle at 60% 10%,
			color-mix(in srgb, var(--on-accent) 8%, transparent) 0 10%,
			transparent 11%
		),
		linear-gradient(
			135deg,
			var(--accent),
			color-mix(in srgb, var(--accent) 70%, #000)
		);
}
.hero::after {
	content: '';
	position: absolute;
	inset: auto 0 0;
	height: 45%;
	background: linear-gradient(transparent, rgb(0 0 0 / 0.25));
}
.tools {
	position: absolute;
	top: max(12px, env(safe-area-inset-top));
	right: var(--pad);
	display: flex;
	gap: 8px;
	z-index: 2;
}
.tools .lang-btn {
	width: auto;
	padding: 0 12px;
	gap: 5px;
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
}
.lang-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}
.lang-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid var(--line);
	text-decoration: none;
	font-weight: 600;
}
.lang-list a b {
	font-size: 12px;
	padding: 3px 7px;
	border-radius: 6px;
	background: var(--chip);
	color: var(--muted);
}
.lang-list a.on {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent);
}
.tools button {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgb(255 255 255 / 0.9);
	color: #222;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
}
.id {
	text-align: center;
	padding: 0 var(--pad);
	margin-top: -52px;
	position: relative;
	z-index: 1;
}
.logo {
	width: 104px;
	height: 104px;
	border-radius: 26px;
	background: var(--card);
	box-shadow: 0 6px 24px rgb(0 0 0 / 0.14);
	display: grid;
	place-items: center;
	margin: 0 auto;
	overflow: hidden;
	border: 4px solid var(--card);
}
.logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.logo b {
	font-family: var(--display);
	font-size: 40px;
	color: var(--accent);
}
h1 {
	font-family: var(--display);
	font-size: calc(clamp(26px, 7vw, 34px) * var(--scale));
	line-height: 1.1;
	margin: 14px 0 4px;
	letter-spacing: -0.01em;
}
h1 {
	overflow-wrap: anywhere;
}
.tagline {
	margin: 0 auto;
	color: var(--muted);
	max-width: 46ch;
}
.meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 14px;
	margin-top: 10px;
	font-size: 14px;
	color: var(--muted);
}
.status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ink);
}
.status::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--muted);
}
.status.open::before {
	background: #16a34a;
	box-shadow: 0 0 0 3px rgb(22 163 74 / 0.2);
}
.status.closed::before {
	background: #dc2626;
}
.status b {
	font-weight: 600;
}
.note {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--soft);
	color: var(--accent);
}

.actions {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 16px var(--pad) 4px;
	scrollbar-width: none;
	justify-content: safe center;
}
.actions::-webkit-scrollbar {
	display: none;
}
/* With a mouse the hidden-scrollbar row can't be dragged: wrap it instead.
   Covers the demo on the site and menus opened on a computer */
html.embedded .actions {
	flex-wrap: wrap;
	justify-content: center;
}
@media (hover: hover) and (pointer: fine) {
	.actions {
		flex-wrap: wrap;
		justify-content: center;
	}
}
.act {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 14px;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid var(--line);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	min-height: 40px;
}
.act.social {
	width: 40px;
	padding: 0;
	justify-content: center;
}
.act:first-child {
	background: var(--accent);
	color: var(--on-accent);
	border-color: var(--accent);
}

/* Sticky category bar */
.bar {
	position: sticky;
	top: 0;
	z-index: 10;
	margin-top: 18px;
	background: color-mix(in srgb, var(--bg) 90%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.bar-in {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 0 10px var(--pad);
}
.search-btn {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--chip);
}
.chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-right: var(--pad);
	scroll-padding: 0 40px;
}
.chips::-webkit-scrollbar {
	display: none;
}
.chips-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}
/* Arrows to move the category row with a mouse; the script shows each one while
   there are categories hidden on its side */
.chips-arrow {
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	width: 56px;
	align-items: center;
	color: var(--ink);
}
.chips-arrow svg {
	width: 30px;
	height: 30px;
	padding: 7px;
	border-radius: 50%;
	background: var(--card);
	border: 1px solid var(--line);
	box-shadow: 0 2px 6px rgb(0 0 0 / 8%);
}
.chips-arrow.prev {
	left: 0;
	justify-content: flex-start;
	background: linear-gradient(to right, var(--bg) 45%, transparent);
}
.chips-arrow.next {
	right: 0;
	justify-content: flex-end;
	padding-right: 10px;
	background: linear-gradient(to left, var(--bg) 45%, transparent);
}
@media (hover: hover) and (pointer: fine) {
	.chips-wrap.can-prev .prev,
	.chips-wrap.can-next .next {
		display: flex;
	}
}
.chips a {
	flex: none;
	padding: 9px 15px;
	border-radius: 999px;
	background: var(--chip);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	transition:
		background 0.2s,
		color 0.2s;
}
.chips a.on {
	background: var(--accent);
	color: var(--on-accent);
}
.searchbox {
	display: none;
	padding: 0 var(--pad) 10px;
}
.bar.searching .searchbox {
	display: block;
}
.searchbox input {
	width: 100%;
	font: inherit;
	font-size: 16px;
	padding: 11px 14px;
	border-radius: 12px;
	border: 1px solid var(--line);
	background: var(--card);
	color: var(--ink);
	outline-color: var(--accent);
}

/* Categories and dishes */
main {
	padding: 4px var(--pad) 24px;
}
.cat {
	scroll-margin-top: 76px;
	padding-top: 26px;
}
.cat-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}
.cat-head h2 {
	font-family: var(--display);
	font-size: calc(24px * var(--scale));
	margin: 0;
	letter-spacing: -0.01em;
}
.cat-head span {
	font-size: 12px;
	color: var(--muted);
}
.cat-desc {
	color: var(--muted);
	margin: 4px 0 0;
	font-size: 0.93em;
}
.list {
	margin-top: 10px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	overflow: hidden;
}
.row {
	display: flex;
	gap: 14px;
	width: 100%;
	padding: 14px 16px;
	border-bottom: 1px solid var(--line);
	align-items: flex-start;
}
.row:last-child {
	border-bottom: 0;
}
.row:active {
	background: var(--soft);
}
.row img {
	order: 2;
	width: 84px;
	height: 84px;
	border-radius: 14px;
	object-fit: cover;
}
.dish-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.dish-name {
	font-weight: 600;
	font-size: 1.04em;
	line-height: 1.3;
}
.fav {
	display: inline-flex;
	vertical-align: -1px;
	margin-right: 5px;
	color: #eab308;
	font-style: normal;
}
.dish-desc {
	color: var(--muted);
	font-size: 0.9em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dish-vars {
	font-size: 0.9em;
	color: var(--muted);
}
.dish-vars b {
	color: var(--ink);
	font-weight: 600;
}
.dish-vars em {
	font-style: normal;
	margin: 0 7px;
	opacity: 0.5;
}
.dish-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 3px;
}
.dish-price {
	font-weight: 700;
	color: var(--accent);
}
.dish-price small {
	font-weight: 500;
	color: var(--muted);
	font-size: 0.8em;
}
.tags {
	display: inline-flex;
	gap: 5px;
	flex-wrap: wrap;
}
.tags span {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--chip);
	color: var(--muted);
}
.out {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
}
.sold-out {
	opacity: 0.55;
}

.grid {
	margin-top: 12px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
@media (min-width: 620px) {
	.grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}
}
.tile {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
	overflow: hidden;
}
.tile img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	background: var(--chip);
}
.tile:not(.has-photo)::before {
	content: '';
	display: block;
	aspect-ratio: 1;
	background: var(--soft);
}
.tile .dish-body {
	padding: 10px 12px 12px;
}
.tile .dish-name {
	font-size: 0.97em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tile .dish-desc {
	font-size: 0.85em;
}
.tile:active {
	transform: scale(0.98);
}

.empty {
	text-align: center;
	color: var(--muted);
	padding: 48px 0;
	display: none;
}

/* Venue info */
.info {
	margin: 8px var(--pad) 0;
	padding: 20px;
	border-radius: 20px;
	background: var(--card);
	border: 1px solid var(--line);
}
.info h3 {
	font-family: var(--display);
	font-size: 20px;
	margin: 0 0 12px;
}
.info p {
	margin: 0 0 10px;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	color: var(--muted);
}
.info p svg {
	margin-top: 2px;
	color: var(--accent);
}
.hours {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	margin-top: 4px;
}
.hours th {
	text-align: left;
	font-weight: 500;
	color: var(--muted);
	padding: 5px 0;
}
.hours td {
	text-align: right;
	padding: 5px 0;
}
.hours tr.today th,
.hours tr.today td {
	color: var(--ink);
	font-weight: 700;
}
footer {
	text-align: center;
	color: var(--muted);
	font-size: 12px;
	padding: 24px var(--pad) calc(28px + env(safe-area-inset-bottom));
}
footer a {
	text-decoration: none;
	font-weight: 600;
}

/* Bottom sheets */
dialog {
	border: 0;
	padding: 0;
	margin: auto auto 0;
	width: 100%;
	max-width: 560px;
	max-height: 92vh;
	border-radius: 24px 24px 0 0;
	background: var(--card);
	color: var(--ink);
	overflow: auto;
}
dialog[open] {
	animation: up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
dialog::backdrop {
	background: rgb(0 0 0 / 0.45);
	backdrop-filter: blur(2px);
}
@keyframes up {
	from {
		transform: translateY(100%);
	}
}
@media (min-width: 700px) {
	dialog {
		margin: auto;
		border-radius: 24px;
	}
	dialog[open] {
		animation: pop 0.2s ease-out;
	}
	@keyframes pop {
		from {
			opacity: 0;
			transform: scale(0.96);
		}
	}
}
.sheet-img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.sheet-body {
	padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
}
.sheet-close {
	position: sticky;
	top: 12px;
	float: right;
	margin: 12px 12px -50px 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgb(255 255 255 / 0.92);
	color: #222;
	z-index: 2;
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
}
.grab {
	width: 40px;
	height: 5px;
	border-radius: 3px;
	background: var(--line);
	margin: 10px auto 0;
}
.sheet-body h3 {
	font-family: var(--display);
	font-size: calc(24px * var(--scale));
	margin: 6px 0 6px;
	line-height: 1.15;
	padding-right: 36px;
}
.sheet-body .price {
	font-size: 1.25em;
	font-weight: 700;
	color: var(--accent);
}
.sheet-body .desc {
	color: var(--muted);
	margin: 10px 0 0;
	white-space: pre-line;
}
.sheet-vars {
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
}
.sheet-vars li {
	display: flex;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
}
.sheet-vars li:last-child {
	border-bottom: 0;
}
.sheet-vars b {
	color: var(--accent);
}
.wifi-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
}
.wifi-row span {
	color: var(--muted);
}
.wifi-row code {
	font:
		600 16px ui-monospace,
		monospace;
}
.copy {
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 600;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: calc(24px + env(safe-area-inset-bottom));
	transform: translate(-50%, 120px);
	background: #111;
	color: #fff;
	padding: 10px 16px;
	border-radius: 12px;
	font-size: 14px;
	transition: transform 0.25s;
	z-index: 100;
}
.toast.on {
	transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	dialog[open] {
		animation: none;
	}
}
.sheet-tags {
	margin-top: 14px;
}

/* Dish name line: name, and in some templates a dotted leader and the price */
.dish-title {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.dish-title .dish-price {
	white-space: nowrap;
}
.leader {
	flex: 1;
	min-width: 16px;
	border-bottom: 2px dotted var(--line);
	transform: translateY(-4px);
}

/* Each dish in its own card (café template) */
.cards {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cards .row {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 18px;
}

/* Shown inside a phone frame in the institutional site */
html.embedded {
	scrollbar-width: none;
}
html.embedded::-webkit-scrollbar {
	display: none;
}
