/* The printed-menu look from the prototype: two columns of name + description,
   separated by hairlines, with no prices anywhere. */
.rosie-menu__section + .rosie-menu__section {
	margin-top: var(--wp--preset--spacing--60);
}

/* Landed on from a card above, so the heading has to clear the sticky header.
   The request band needs no such offset: its own top padding is the air. */
.rosie-menu[id],
.rosie-menu__section { scroll-margin-top: 6rem; }

.rosie-menu__heading {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	text-transform: uppercase;
	color: var(--wp--preset--color--pink-dark);
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 0.6rem;
}

/* The dashed rule that runs off to the right of every section heading. */
.rosie-menu__heading::after {
	content: "";
	flex: 1;
	border-top: 2px dashed var(--wp--preset--color--line);
}

/* A section's intro is a lead, at the lead's size — it had been reading at
   body size, a step under the demo's. */
.rosie-menu__lead {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--large);
	max-width: 70ch;
	margin: 0 0 1.2rem;
}

.rosie-menu__list {
	display: grid;
	gap: 0 2.5rem;
}

.has-2-columns .rosie-menu__list { grid-template-columns: repeat(2, 1fr); }
.has-3-columns .rosie-menu__list { grid-template-columns: repeat(3, 1fr); }

.rosie-menu__item {
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.rosie-menu__name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	text-transform: uppercase;
	font-size: 1rem;
	letter-spacing: -0.005em;
	margin: 0 0 0.2rem;
}

.rosie-menu__note {
	font-size: 0.9rem;
	color: var(--wp--preset--color--ink-soft);
	margin: 0;
}

.rosie-menu__photo {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--wp--custom--radius-small);
	margin-bottom: 0.6rem;
}

.rosie-menu__section-note {
	background: var(--wp--preset--color--pink-soft);
	border: 1px solid #f6c8e0;
	border-radius: var(--wp--custom--radius-small);
	padding: 1rem 1.2rem;
	font-size: 0.9rem;
	color: var(--wp--preset--color--ink-soft);
	margin-top: 1.2rem;
}

.rosie-menu__section-note p { margin: 0; }

.rosie-menu__action { margin-top: 1.6rem; }

@media (width <= 760px) {
	.has-2-columns .rosie-menu__list,
	.has-3-columns .rosie-menu__list { grid-template-columns: 1fr; }
}

/* ---------- the menu as an order pad ----------
   On the catering page every dish carries a checkbox, and what is ticked is
   written into the request form further down. The look stays the printed
   menu's: a quiet square in the margin, pink once it is ticked. */

.rosie-menu__how {
	/*
	 * It is the lid on the pad, so it sits nearer the cards above it than the
	 * menu below: 2.2rem under a panel this tall read as a hairline against
	 * the display heading that follows.
	 */
	margin: 0 0 clamp(2.6rem, 1.8rem + 2vw, 4rem);
	padding: 1.2rem 1.4rem;
	background: var(--wp--preset--color--pink-soft);
	border-radius: var(--wp--custom--radius);
	box-shadow: var(--wp--custom--shadow-small);
}

.rosie-menu__how-title {
	margin: 0 0 0.9rem;
	font-family: var(--wp--preset--font-family--small);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--pink-dark);
}

/* Three steps across on a desktop, stacked on a phone — they are read in
   order either way, and the numbers say so. */
.rosie-menu__steps {
	counter-reset: step;
	display: grid;
	gap: 0.8rem 1.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.rosie-menu__steps {
		grid-template-columns: repeat(3, 1fr);
	}
}

.rosie-menu__steps li {
	counter-increment: step;
	position: relative;
	padding-left: 2.4rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--wp--preset--color--ink);
}

.rosie-menu__steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-content: center;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 50%;
	background: var(--wp--preset--color--pink);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--small);
	font-weight: 700;
	font-size: 0.85rem;
}

.rosie-menu.is-pickable .rosie-menu__item {
	display: grid;
	grid-template-columns: 1.15rem 1fr;
	column-gap: 0.85rem;
	align-items: start;
	cursor: pointer;
	/* The row is the target, so it needs room to be hit. */
	padding-inline: 0.5rem;
	margin-inline: -0.5rem;
	border-radius: var(--wp--custom--radius-small);
	transition: background 0.12s ease;
}

/* Two picks in a row ran together into one slab with square joins where they
   met. They are each a card now, with the hairline standing down under a
   filled one and a little air between them doing the separating instead. */
.rosie-menu.is-pickable .rosie-menu__list { row-gap: 0.4rem; }
.rosie-menu.is-pickable .rosie-menu__item.is-picked { border-bottom-color: transparent; }

.rosie-menu.is-pickable .rosie-menu__item > *:not(.rosie-menu__pick) { grid-column: 2; }
.rosie-menu.is-pickable .rosie-menu__item:hover { background: var(--wp--preset--color--cream); }
.rosie-menu.is-pickable .rosie-menu__item.is-picked { background: var(--wp--preset--color--pink-soft); }
.rosie-menu.is-pickable .rosie-menu__item.is-picked .rosie-menu__name { color: var(--wp--preset--color--pink-dark); }

.rosie-menu__pick {
	grid-column: 1;
	grid-row: 1 / -1;
	align-self: start;
	appearance: none;
	-webkit-appearance: none;
	width: 1.15rem;
	height: 1.15rem;
	margin: 0.2rem 0 0;
	border: 2px solid var(--wp--preset--color--tan);
	border-radius: 5px;
	background: var(--wp--preset--color--white);
	display: grid;
	place-content: center;
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease;
}

/* The tick: two sides of a square, turned onto its corner. */
.rosie-menu__pick::after {
	content: "";
	width: 0.58rem;
	height: 0.3rem;
	border-left: 2px solid var(--wp--preset--color--white);
	border-bottom: 2px solid var(--wp--preset--color--white);
	transform: translateY(-0.08rem) rotate(-45deg);
	opacity: 0;
}

.rosie-menu__pick:checked {
	background: var(--wp--preset--color--pink);
	border-color: var(--wp--preset--color--pink);
}
.rosie-menu__pick:checked::after { opacity: 1; }
.rosie-menu__pick:focus-visible {
	outline: 3px solid var(--wp--preset--color--pink);
	outline-offset: 2px;
}

/* The running total. It sits under the consent banner, which outranks it on
   a first visit and is gone for good after that. */
.rosie-menu__tray {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 70;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.6rem 1.2rem;
	padding: 0.9rem var(--wp--custom--gutter) calc(0.9rem + env(safe-area-inset-bottom));
	background: var(--wp--preset--color--dark);
	box-shadow: 0 -6px 24px rgb(0 0 0 / 22%);
}

.rosie-menu__tray[hidden] { display: none; }

/* One bar, two jobs: the instruction until something is picked, the running
   total from then on. */
.rosie-menu__tray.is-empty .rosie-menu__tray-count,
.rosie-menu__tray.is-empty .rosie-menu__tray-clear { display: none; }
.rosie-menu__tray:not(.is-empty) .rosie-menu__tray-hint { display: none; }

.rosie-menu__tray-hint,
.rosie-menu__tray-count {
	margin: 0;
	font-family: var(--wp--preset--font-family--small);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--wp--preset--color--white);
}

.rosie-menu__tray-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0;
}

.rosie-menu__tray-clear {
	background: none;
	border: 0;
	padding: 0.4rem 0.2rem;
	font-family: var(--wp--preset--font-family--small);
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--wp--preset--color--tan);
	text-decoration: underline;
	cursor: pointer;
}
.rosie-menu__tray-clear:hover { color: var(--wp--preset--color--white); }

.rosie-menu__tray .wp-element-button {
	padding: 0.7em 1.4em;
	font-size: 0.95rem;
}
