/**
 * Customer ordering app.
 *
 * Mobile first and deliberately small: this loads on a phone, on restaurant
 * wifi, while someone is hungry.
 */

:root {
	--rqo-primary: #c0392b;
	--rqo-accent: #e67e22;
	--rqo-dark: #141414;
	--rqo-cream: #faf6ef;
	--rqo-body: #57514e;
	--rqo-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--rqo-font-head: inherit;
	--rqo-radius: 14px;
	--rqo-bar: 76px;
}

html.rqo-standalone,
html.rqo-standalone body.rqo-body {
	margin: 0;
	padding: 0;
	background: var(--rqo-cream);
}

.rqo-app,
.rqo-app * {
	box-sizing: border-box;
}

.rqo-app {
	font-family: var(--rqo-font);
	color: var(--rqo-body);
	font-size: 16px;
	line-height: 1.5;
	max-width: 640px;
	margin-inline: auto;
	padding-bottom: calc(var(--rqo-bar) + env(safe-area-inset-bottom, 0px) + 12px);
	-webkit-font-smoothing: antialiased;
}

.rqo-app img { max-width: 100%; display: block; }
.rqo-app button { font: inherit; cursor: pointer; }

/* ------------------------------------------------------------------ header */

.rqo-head {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--rqo-cream);
	padding: 14px 16px 10px;
	border-bottom: 1px solid rgba(0, 0, 0, .07);
}

.rqo-head__top {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rqo-head__logo { width: 42px; height: 42px; object-fit: contain; flex: none; }

.rqo-head__name {
	font-family: var(--rqo-font-head);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--rqo-dark);
	line-height: 1.15;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: .01em;
}

.rqo-head__table {
	margin-inline-start: auto;
	flex: none;
	background: var(--rqo-primary);
	color: #fff;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: .8rem;
	font-weight: 600;
	white-space: nowrap;
}

.rqo-head__table--none { background: rgba(0, 0, 0, .1); color: var(--rqo-body); }

.rqo-search {
	margin-top: 10px;
	position: relative;
}

.rqo-search input {
	width: 100%;
	padding: 11px 16px;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: .95rem;
	color: var(--rqo-dark);
}

.rqo-search input:focus { outline: 2px solid var(--rqo-accent); outline-offset: 1px; }

.rqo-tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 10px 16px 4px;
	scrollbar-width: none;
	position: sticky;
	top: 118px;
	z-index: 19;
	background: var(--rqo-cream);
}

.rqo-tabs::-webkit-scrollbar { display: none; }

.rqo-tab {
	flex: none;
	border: 1px solid rgba(0, 0, 0, .12);
	background: #fff;
	color: var(--rqo-dark);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: .85rem;
	font-weight: 600;
	white-space: nowrap;
}

.rqo-tab.is-active {
	background: var(--rqo-dark);
	border-color: var(--rqo-dark);
	color: #fff;
}

/* ------------------------------------------------------------------- notes */

.rqo-banner {
	margin: 12px 16px;
	padding: 12px 14px;
	border-radius: var(--rqo-radius);
	background: #fff;
	border: 1px dashed rgba(0, 0, 0, .18);
	font-size: .9rem;
}

.rqo-banner strong { color: var(--rqo-dark); display: block; }

/* ------------------------------------------------------------------- items */

.rqo-section { padding: 8px 16px 0; }

.rqo-section__title {
	font-family: var(--rqo-font-head);
	font-size: 1.05rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--rqo-dark);
	margin: 18px 0 10px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.rqo-section__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(0, 0, 0, .1);
}

.rqo-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	width: 100%;
	text-align: start;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .07);
	border-radius: var(--rqo-radius);
	padding: 12px;
	margin-bottom: 10px;
}

.rqo-item:active { transform: scale(.995); }
.rqo-item.is-out { opacity: .55; }

.rqo-item__thumb {
	width: 76px;
	height: 76px;
	border-radius: 10px;
	object-fit: cover;
	flex: none;
	background: var(--rqo-cream);
}

.rqo-item__body { flex: 1; min-width: 0; }

.rqo-item__name {
	font-weight: 600;
	color: var(--rqo-dark);
	margin: 0 0 2px;
	font-size: .98rem;
	display: flex;
	align-items: center;
	gap: 6px;
}

.rqo-item__desc {
	margin: 0 0 6px;
	font-size: .84rem;
	color: var(--rqo-body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rqo-item__price {
	font-weight: 700;
	color: var(--rqo-primary);
	font-size: .95rem;
}

.rqo-item__price small {
	font-weight: 500;
	color: var(--rqo-body);
	font-size: .78rem;
}

.rqo-item__add {
	flex: none;
	align-self: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: var(--rqo-primary);
	color: #fff;
	font-size: 1.3rem;
	line-height: 1;
	display: grid;
	place-items: center;
}

.rqo-item__add[disabled] { background: rgba(0, 0, 0, .15); }

.rqo-dot {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	border: 2px solid currentColor;
	display: inline-grid;
	place-items: center;
	flex: none;
}

.rqo-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.rqo-dot--veg { color: #2e7d32; }
.rqo-dot--nonveg { color: #c0392b; }
.rqo-dot--both { color: #b8860b; }

.rqo-spice { color: var(--rqo-primary); font-size: .75rem; letter-spacing: -1px; }

.rqo-tagline { text-align: center; font-size: .82rem; padding: 18px 16px 4px; opacity: .7; }

/* ------------------------------------------------------------------- sheet */

.rqo-sheet-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	z-index: 40;
	opacity: 0;
	animation: rqo-fade .2s forwards;
}

@keyframes rqo-fade { to { opacity: 1; } }

.rqo-sheet {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 41;
	background: #fff;
	border-radius: 20px 20px 0 0;
	max-height: 88vh;
	overflow-y: auto;
	padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
	max-width: 640px;
	margin-inline: auto;
	transform: translateY(100%);
	animation: rqo-rise .26s cubic-bezier(.2, .8, .3, 1) forwards;
}

@keyframes rqo-rise { to { transform: translateY(0); } }

.rqo-sheet__grip {
	width: 42px;
	height: 4px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .18);
	margin: 0 auto 14px;
}

.rqo-sheet__title {
	font-family: var(--rqo-font-head);
	font-size: 1.2rem;
	color: var(--rqo-dark);
	margin: 0 0 4px;
	font-weight: 700;
}

.rqo-sheet__desc { font-size: .9rem; margin: 0 0 14px; }

.rqo-group { margin-bottom: 16px; }

.rqo-group__name {
	font-weight: 600;
	color: var(--rqo-dark);
	font-size: .9rem;
	margin-bottom: 8px;
	display: flex;
	gap: 8px;
	align-items: center;
}

.rqo-group__req {
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	background: var(--rqo-accent);
	color: #fff;
	border-radius: 999px;
	padding: 2px 8px;
}

.rqo-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 10px;
	margin-bottom: 8px;
	font-size: .92rem;
}

.rqo-option.is-on { border-color: var(--rqo-primary); background: rgba(0, 0, 0, .02); }
.rqo-option input { accent-color: var(--rqo-primary); width: 18px; height: 18px; }
.rqo-option.is-out { opacity: .6; }
.rqo-group__out { margin: 8px 0 0; font-size: .85rem; color: #6b5f57; }
.rqo-sheet__out { font-size: 1rem; line-height: 1.5; margin: 0 0 18px; }
.rqo-option__price { margin-inline-start: auto; font-weight: 600; color: var(--rqo-dark); }

.rqo-field { margin-bottom: 14px; }
.rqo-field label { display: block; font-size: .85rem; font-weight: 600; color: var(--rqo-dark); margin-bottom: 5px; }
.rqo-field input,
.rqo-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid rgba(0, 0, 0, .14);
	border-radius: 10px;
	font: inherit;
	font-size: .92rem;
}

.rqo-qty {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 6px 0 16px;
}

.rqo-qty button {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .15);
	background: #fff;
	font-size: 1.2rem;
	line-height: 1;
}

.rqo-qty span { font-weight: 700; font-size: 1.1rem; min-width: 2ch; text-align: center; color: var(--rqo-dark); }

.rqo-btn {
	width: 100%;
	border: 0;
	border-radius: 999px;
	background: var(--rqo-primary);
	color: #fff;
	font-weight: 700;
	padding: 15px 20px;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.rqo-btn[disabled] { opacity: .5; }
.rqo-btn--ghost { background: transparent; color: var(--rqo-dark); border: 1px solid rgba(0, 0, 0, .18); }
.rqo-btn--dark { background: var(--rqo-dark); }

/* ------------------------------------------------------------------ basket */

.rqo-bar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 30;
	max-width: 640px;
	margin-inline: auto;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(8px);
	border-top: 1px solid rgba(0, 0, 0, .08);
}

.rqo-bar__btn {
	width: 100%;
	border: 0;
	border-radius: 999px;
	background: var(--rqo-primary);
	color: #fff;
	padding: 14px 18px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 12px;
}

.rqo-bar__count {
	background: rgba(255, 255, 255, .22);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: .85rem;
}

.rqo-bar__total { margin-inline-start: auto; }

.rqo-line {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.rqo-line__name { font-weight: 600; color: var(--rqo-dark); font-size: .93rem; }
.rqo-line__meta { font-size: .8rem; }
.rqo-line__price { margin-inline-start: auto; font-weight: 600; color: var(--rqo-dark); white-space: nowrap; }

.rqo-line__qty {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.rqo-line__qty button {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .15);
	background: #fff;
	line-height: 1;
}

.rqo-totals { margin: 14px 0; font-size: .92rem; }
.rqo-totals__row { display: flex; justify-content: space-between; padding: 5px 0; }
.rqo-totals__row--grand {
	border-top: 1px dashed rgba(0, 0, 0, .18);
	margin-top: 6px;
	padding-top: 10px;
	font-weight: 700;
	color: var(--rqo-dark);
	font-size: 1.05rem;
}

.rqo-error {
	background: #fdecea;
	border: 1px solid #f5c6cb;
	color: #8b1a12;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: .88rem;
	margin-bottom: 12px;
}

/* ------------------------------------------------------------------ status */

.rqo-status { padding: 30px 20px; text-align: center; }

.rqo-status__tick {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: var(--rqo-primary);
	color: #fff;
	display: grid;
	place-items: center;
	margin: 0 auto 16px;
	font-size: 2rem;
}

.rqo-status__title {
	font-family: var(--rqo-font-head);
	font-size: 1.5rem;
	color: var(--rqo-dark);
	margin: 0 0 6px;
	font-weight: 700;
}

.rqo-status__number { font-size: 2.4rem; font-weight: 800; color: var(--rqo-primary); margin: 6px 0; }
.rqo-status__note { margin: 12px auto 0; max-width: 32ch; font-weight: 600; }
.rqo-status--stopped .rqo-status__tick { background: #6b6b6b; }

/* The way back to an order sent from this phone. */
.rqo-banner--order {
	display: block;
	width: 100%;
	border: 0;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.rqo-steps { display: grid; gap: 10px; margin: 22px 0; text-align: start; }

.rqo-step {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .08);
	font-size: .92rem;
}

.rqo-step.is-done { border-color: var(--rqo-primary); }
.rqo-step.is-done .rqo-step__dot { background: var(--rqo-primary); }

.rqo-step__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .15);
	flex: none;
}

.rqo-receipt {
	text-align: start;
	background: #fff;
	border-radius: var(--rqo-radius);
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, .08);
}

.rqo-skeleton { padding: 40px 16px; text-align: center; opacity: .6; }

@media (prefers-reduced-motion: reduce) {
	.rqo-sheet, .rqo-sheet-backdrop { animation: none; transform: none; opacity: 1; }
}

/* ------------------------------------------------------- seating question */

/* Asked once, only when a phone arrives at a table that already has a quiet
   tab on it. Deliberately the whole screen: it is a fork in the road, not a
   notice to dismiss. */
.rqo-seating {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var( --rqo-bg, #faf6ef );
	z-index: 40;
}

.rqo-seating__card {
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 18px;
	padding: 28px 24px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, .12 );
	text-align: center;
}

.rqo-seating__card h2 {
	margin: 0 0 12px;
	font-size: 22px;
	line-height: 1.25;
}

.rqo-seating__card p {
	margin: 0 0 22px;
	color: #5c5c5c;
	line-height: 1.5;
}

.rqo-seating__card .rqo-btn {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 15px 18px;
	border-radius: 12px;
	border: 0;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}

.rqo-seating__card .rqo-btn--primary {
	background: var( --rqo-primary, #c0392b );
	color: #fff;
}

.rqo-seating__card .rqo-btn--ghost {
	background: transparent;
	color: var( --rqo-primary, #c0392b );
	border: 2px solid currentColor;
}

/* One basket per table ----------------------------------------------------- */

.rqo-shared,
.rqo-sent {
	display: grid;
	gap: 4px;
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: .9rem;
	line-height: 1.4;
}

.rqo-shared {
	background: var(--rqo-cream);
	border-left: 4px solid var(--rqo-primary);
}

.rqo-shared strong,
.rqo-sent strong { color: var(--rqo-dark); }

.rqo-sent {
	background: #e9f6ec;
	border-left: 4px solid #2e7d32;
}

.rqo-line__by { font-style: italic; }

.rqo-tableorders { margin: 18px 0 0; }
.rqo-tableorders h3 { margin: 0 0 8px; font-size: .95rem; color: var(--rqo-dark); }

.rqo-tableorder {
	display: grid;
	gap: 2px;
	width: 100%;
	margin: 0 0 8px;
	padding: 10px 12px;
	border: 1px solid rgba( 0, 0, 0, .1 );
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: .88rem;
	text-align: left;
	cursor: pointer;
}

.rqo-tableorder__head strong { color: var(--rqo-dark); }
.rqo-tableorder__lines { color: var(--rqo-body); }
.rqo-tableorder__link { color: var(--rqo-primary); font-weight: 600; }
