/**
 * Online ordering.
 *
 * Deliberately NOT part of theme.css: that file is the Tailwind v4 source that
 * compiles to dist/styles.css, so anything added there is invisible on the live
 * site until the build runs again. This is plain CSS, enqueued only on the
 * ordering page, using the same token values as the theme.
 */

.order-app {
	--ink: #17140F;
	--cream: #FBF7EE;
	--tomato: #A81E14;
	--brass: #B08A46;
	--bark: #2B241D;
	--line: rgba(43, 36, 29, 0.14);

	background: var(--cream);
	color: var(--bark);
	font-family: "Source Sans 3", system-ui, sans-serif;
}

/**
 * The theme does not set a global border-box, so the grid's 80rem max-width
 * plus its own side padding came to more than the viewport and pushed the cart
 * column off the right edge at exactly 1280px wide.
 */
.order-app,
.order-app *,
.order-app *::before,
.order-app *::after {
	box-sizing: border-box;
}

.order-app [x-cloak] { display: none !important; }

/* ── Fulfilment bar ─────────────────────────────────────────────────── */

.order-bar {
	position: sticky;
	top: 64px;
	z-index: 30;
	background: var(--cream);
	border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) { .order-bar { top: 96px; } }
@media (min-width: 1024px) { .order-bar { top: 112px; } }

.order-bar-inner {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0.85rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.fulfil-toggle {
	display: inline-flex;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 3px;
	background: #fff;
}

.fulfil-toggle button {
	appearance: none;
	border: 0;
	background: none;
	cursor: pointer;
	padding: 0.5rem 1.4rem;
	border-radius: 999px;
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--bark);
	transition: background 0.18s, color 0.18s;
}

.fulfil-toggle button.is-on {
	background: var(--tomato);
	color: var(--cream);
}

.order-state {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: 0.95rem;
}

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-open { background: #3E7C4A; }
.dot-shut { background: #9A9289; }

/* ── Layout ─────────────────────────────────────────────────────────── */

.order-grid {
	max-width: 80rem;
	margin: 0 auto;
	padding: 2rem 1.25rem 7rem;
	display: grid;
	gap: 2.5rem;
}

/**
 * A grid item defaults to min-width:auto, meaning it refuses to shrink below
 * its widest child. The horizontally-scrolling course rail is wider than the
 * screen by design, so it was dragging the whole column out with it and
 * putting 640px of horizontal scroll on a phone. min-width:0 lets the column
 * take the grid's width and the rail scroll inside it, which was the intent.
 */
.order-grid > * {
	min-width: 0;
}

@media (min-width: 1024px) {
	.order-grid {
		grid-template-columns: 1fr 22rem;
		align-items: start;
		padding-bottom: 4rem;
	}
}

.order-loading,
.order-error {
	padding: 2rem 0;
	font-size: 1.05rem;
}

.order-error { color: var(--tomato); }
.order-error a { color: var(--tomato); }

/* ── Course rail ────────────────────────────────────────────────────── */

.course-rail {
	display: flex;
	gap: 1.5rem;
	overflow-x: auto;
	padding-bottom: 0.85rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--line);
	scrollbar-width: none;
}

.course-rail::-webkit-scrollbar { display: none; }

.course-rail a {
	flex: none;
	text-decoration: none;
	color: var(--bark);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	padding-bottom: 0.2rem;
	border-bottom: 2px solid transparent;
}

.course-rail a:hover { border-bottom-color: var(--brass); }

/* ── Menu ───────────────────────────────────────────────────────────── */

.course { scroll-margin-top: 10rem; margin-bottom: 3.5rem; }

.course h2 {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(1.7rem, 4vw, 2.3rem);
	color: var(--ink);
	margin: 0 0 0.4rem;
}

.course-intro {
	margin: 0 0 1.5rem;
	max-width: 46ch;
	color: rgba(43, 36, 29, 0.72);
}

.item-list { list-style: none; margin: 0; padding: 0; }

.item-row { border-bottom: 1px solid var(--line); }

.item-hit {
	width: 100%;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.15rem 0.25rem;
	background: none;
	border: 0;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: inherit;
	transition: background 0.15s;
}

.item-hit:hover:not(:disabled) { background: rgba(176, 138, 70, 0.07); }
.item-hit:disabled { cursor: not-allowed; opacity: 0.45; }

.item-main { display: block; }

.item-name {
	display: block;
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.18rem;
	font-weight: 700;
	color: var(--ink);
}

.item-badge {
	display: inline-block;
	margin-left: 0.6rem;
	font-family: "Archivo", system-ui, sans-serif;
	font-style: normal;
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--tomato);
	vertical-align: middle;
}

.item-desc {
	display: block;
	margin-top: 0.3rem;
	max-width: 52ch;
	font-size: 0.95rem;
	color: rgba(43, 36, 29, 0.68);
}

.item-price {
	flex: none;
	text-align: right;
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 700;
	color: var(--brass);
	font-size: 1.02rem;
}

.item-out {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.65rem;
	font-style: normal;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tomato);
}

/* ── Cart ───────────────────────────────────────────────────────────── */

.order-cart { position: relative; }

@media (min-width: 1024px) {
	.order-cart { position: sticky; top: 11rem; }
}

.cart-inner {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 1.5rem;
}

.cart-inner h2 {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.4rem;
	margin: 0 0 1rem;
	color: var(--ink);
}

.cart-empty { color: rgba(43, 36, 29, 0.6); margin: 0; }

.cart-lines { list-style: none; margin: 0; padding: 0; }

.cart-lines > li {
	padding: 0.9rem 0;
	border-top: 1px solid var(--line);
}

.cart-line-top {
	display: flex;
	gap: 0.6rem;
	align-items: baseline;
}

.cart-qty {
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 700;
	color: var(--brass);
	flex: none;
}

.cart-name { flex: 1; font-weight: 600; color: var(--ink); }

.cart-amt {
	flex: none;
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 700;
}

.cart-opts {
	list-style: none;
	margin: 0.35rem 0 0 1.5rem;
	padding: 0;
	font-size: 0.85rem;
	color: rgba(43, 36, 29, 0.68);
}

.cart-notes {
	margin: 0.35rem 0 0 1.5rem;
	font-size: 0.85rem;
	font-style: italic;
	color: rgba(43, 36, 29, 0.68);
}

.cart-line-actions {
	display: flex;
	gap: 0.4rem;
	align-items: center;
	margin: 0.55rem 0 0 1.5rem;
}

.cart-line-actions button {
	appearance: none;
	border: 1px solid var(--line);
	background: #fff;
	cursor: pointer;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 3px;
	font-size: 1rem;
	line-height: 1;
	color: var(--bark);
}

.cart-line-actions button:hover { border-color: var(--brass); }

.cart-remove {
	width: auto !important;
	padding: 0 0.6rem;
	font-size: 0.75rem !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tomato) !important;
}

.cart-problems {
	margin-top: 1rem;
	padding: 0.85rem;
	background: rgba(168, 30, 20, 0.08);
	border-left: 3px solid var(--tomato);
}

.cart-problems p { margin: 0 0 0.35rem; font-size: 0.9rem; color: var(--tomato); }
.cart-problems p:last-child { margin-bottom: 0; }

.cart-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: 1.1rem;
	padding-top: 1rem;
	border-top: 2px solid var(--ink);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 1.1rem;
}

.cart-note,
.cart-shut {
	margin: 0.6rem 0 0;
	font-size: 0.82rem;
	color: rgba(43, 36, 29, 0.62);
}

.cart-go { width: 100%; margin-top: 1.1rem; justify-content: center; }
.cart-go:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Item dialog ────────────────────────────────────────────────────── */

.item-modal { position: fixed; inset: 0; z-index: 100; }

.item-modal-back {
	position: absolute;
	inset: 0;
	background: rgba(23, 20, 15, 0.72);
}

.item-modal-card {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: min(34rem, 100%);
	max-height: 92vh;
	overflow-y: auto;
	background: var(--cream);
	padding: 1.75rem;
	border-radius: 6px 6px 0 0;
}

@media (min-width: 640px) {
	.item-modal-card {
		top: 50%;
		bottom: auto;
		transform: translate(-50%, -50%);
		border-radius: 6px;
	}
}

.item-close {
	position: absolute;
	top: 0.75rem;
	right: 1rem;
	appearance: none;
	border: 0;
	background: none;
	font-size: 1.9rem;
	line-height: 1;
	cursor: pointer;
	color: var(--bark);
}

.item-modal-card h3 {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.6rem;
	margin: 0 2rem 0.4rem 0;
	color: var(--ink);
}

.modal-desc { margin: 0 0 0.5rem; color: rgba(43, 36, 29, 0.72); }

.modal-base {
	margin: 0 0 1.25rem;
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 700;
	color: var(--brass);
}

.opt-group {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 0 0 1rem;
	padding: 1rem 0 0;
}

.opt-group legend {
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink);
	padding: 0;
}

.opt-group legend em {
	font-style: normal;
	margin-left: 0.5rem;
	color: var(--tomato);
	letter-spacing: 0.08em;
}

.opt {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.45rem 0;
	cursor: pointer;
}

.opt input { width: 1.05rem; height: 1.05rem; accent-color: var(--tomato); }
.opt span { flex: 1; }

.opt em {
	font-style: normal;
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 0.85rem;
	color: var(--brass);
}

.modal-notes { display: block; margin: 1rem 0; }

.modal-notes span {
	display: block;
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 0.4rem;
}

.modal-notes textarea {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: 3px;
	font: inherit;
	background: #fff;
	resize: vertical;
}

.modal-foot {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1.25rem;
}

.qty-step {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: #fff;
}

.qty-step button {
	appearance: none;
	border: 0;
	background: none;
	cursor: pointer;
	width: 2.4rem;
	height: 2.6rem;
	font-size: 1.1rem;
	color: var(--bark);
}

.qty-step span {
	min-width: 2rem;
	text-align: center;
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 700;
}

.modal-foot .btn {
	flex: 1;
	justify-content: space-between;
}

.modal-warn {
	margin: 0.75rem 0 0;
	font-size: 0.88rem;
	color: var(--tomato);
}

/* ── Mobile dock ────────────────────────────────────────────────────── */

.cart-dock {
	position: fixed;
	left: 1rem;
	right: 1rem;
	bottom: 5.25rem;
	z-index: 40;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.95rem 1.3rem;
	background: var(--ink);
	color: var(--cream);
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 0.82rem;
	box-shadow: 0 10px 30px rgba(23, 20, 15, 0.3);
}

@media (min-width: 1024px) { .cart-dock { display: none !important; } }

/* ── Checkout ───────────────────────────────────────────────────────── */

.checkout-h1 {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(2rem, 5vw, 2.8rem);
	color: var(--ink);
	margin: 0 0 1.5rem;
}

.checkout-empty,
.checkout-blocked {
	padding: 1.25rem;
	background: #fff;
	border-left: 3px solid var(--brass);
	margin-bottom: 2rem;
}

.checkout-blocked { border-left-color: var(--tomato); }
.checkout-blocked p { margin: 0 0 0.6rem; }
.checkout-blocked p:last-child { margin-bottom: 0; }

.checkout-admin-note {
	font-size: 0.85rem;
	color: rgba(43, 36, 29, 0.66);
	border-top: 1px dashed var(--line);
	padding-top: 0.6rem;
}

.co-block {
	padding: 1.5rem 0;
	border-top: 1px solid var(--line);
}

.co-block:first-of-type { border-top: 0; padding-top: 0; }

.co-block h2 {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.3rem;
	color: var(--ink);
	margin: 0 0 1rem;
}

.co-fulfil { margin-bottom: 0.5rem; }

.co-hint { margin: 0.6rem 0 0; color: rgba(43, 36, 29, 0.66); font-size: 0.92rem; }

.co-fields {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.co-fields { grid-template-columns: 1fr 1fr; }
	.co-wide { grid-column: 1 / -1; }
}

.co-field { display: block; }

.co-field > span {
	display: block;
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 0.35rem;
	color: var(--ink);
}

.co-field > span em {
	font-style: normal;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	color: rgba(43, 36, 29, 0.55);
}

.co-field input,
.co-notes {
	width: 100%;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: #fff;
	font: inherit;
	font-size: 1rem; /* 16px stops iOS zooming the page on focus */
}

.co-field input:focus,
.co-notes:focus {
	outline: 2px solid var(--brass);
	outline-offset: 1px;
}

.tip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.tip-row button {
	appearance: none;
	cursor: pointer;
	border: 1px solid var(--line);
	background: #fff;
	border-radius: 999px;
	padding: 0.55rem 1.3rem;
	font-family: "Archivo", system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--bark);
}

.tip-row button.is-on {
	background: var(--tomato);
	border-color: var(--tomato);
	color: var(--cream);
}

.co-tip-custom { margin-top: 1rem; max-width: 12rem; }

.co-totals { margin: 1rem 0 0; }

.co-totals > div {
	display: flex;
	justify-content: space-between;
	padding: 0.3rem 0;
	font-size: 0.95rem;
}

.co-totals dt, .co-totals dd { margin: 0; }
.co-totals dd { font-family: "Archivo", system-ui, sans-serif; }

.co-eta, .co-pay {
	margin: 0.8rem 0 0;
	font-size: 0.9rem;
	color: rgba(43, 36, 29, 0.7);
}

.co-fail {
	margin: 0.8rem 0 0;
	padding: 0.7rem;
	background: rgba(168, 30, 20, 0.08);
	border-left: 3px solid var(--tomato);
	color: var(--tomato);
	font-size: 0.9rem;
}

/* ── Order status ───────────────────────────────────────────────────── */

.status-grid { grid-template-columns: 1fr; max-width: 46rem; }

@media (min-width: 1024px) {
	.status-grid { grid-template-columns: 1fr; }
}

.status-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 1.75rem;
	margin-bottom: 1.5rem;
}

.status-eyebrow {
	margin: 0 0 0.4rem;
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--brass);
}

.status-card h1 {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(1.8rem, 5vw, 2.4rem);
	color: var(--ink);
	margin: 0 0 0.5rem;
}

.status-card h2 {
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink);
	margin: 1.75rem 0 0.75rem;
}

.status-card h2:first-child { margin-top: 0; }

.status-eta { margin: 0 0 1.5rem; font-size: 1.05rem; }

.status-rail {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.85rem;
}

.status-rail li {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	color: rgba(43, 36, 29, 0.42);
}

.status-rail li.is-done { color: var(--ink); }

.rail-dot {
	width: 13px;
	height: 13px;
	border-radius: 50%;
	border: 2px solid currentColor;
	flex: none;
}

.status-rail li.is-done .rail-dot { background: var(--tomato); border-color: var(--tomato); }

.rail-label { font-family: "Archivo", system-ui, sans-serif; font-weight: 600; font-size: 0.9rem; }

.status-refresh {
	margin: 1.75rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	font-size: 0.88rem;
	color: rgba(43, 36, 29, 0.66);
}

.status-lines { list-style: none; margin: 0; padding: 0; }

.status-lines li {
	display: flex;
	gap: 0.75rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--line);
}

.status-qty { font-family: "Archivo", system-ui, sans-serif; font-weight: 700; color: var(--brass); }
.status-name { flex: 1; }

.status-name em {
	display: block;
	font-style: normal;
	font-size: 0.85rem;
	color: rgba(43, 36, 29, 0.6);
}

.status-note { font-style: italic !important; }

.status-amt { font-family: "Archivo", system-ui, sans-serif; font-weight: 700; }
