/* The guest's menu on the phone: light / dark, the restaurant's colour as the accent (--a, --a2 darker, --al light,
   --on the text on it), cards or a list, sheets that slide up from the bottom. */
@font-face { font-family: Cairo; src: url(/fonts/Cairo-Regular.ttf) format('truetype'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: Cairo; src: url(/fonts/Cairo-Bold.ttf) format('truetype'); font-weight: 700 900; font-display: swap; }

:root { --a: #059669; --a2: #047857; --al: rgb(5 150 105 / 13%); --on: #fff; --bg: #f6f7f9; --card: #fff; --ink: #0f172a; --muted: #64748b; --line: #e5e7eb; --red: #dc2626; --shadow: 0 6px 22px rgb(15 23 42 / 8%); }
:root[data-theme='dark'] { --bg: #0b1120; --card: #131c2e; --ink: #e5e7eb; --muted: #94a3b8; --line: #1f2a40; --shadow: 0 6px 22px rgb(0 0 0 / 35%); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font, Cairo, 'Segoe UI', Tahoma, sans-serif); }
html { font-size: var(--fs, 16px); }
body { padding-bottom: 6rem; }
button, input, textarea { font-family: inherit; font-size: 1rem; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.g-loading { text-align: center; padding: 3rem; color: var(--muted); font-size: 1.5rem; }
.g-closed { text-align: center; padding: 4rem 1.5rem; }
.g-closed .ico { font-size: 3.5rem; }

/* the head */
.hero { position: relative; background: linear-gradient(160deg, var(--a), var(--a2)); color: var(--on); padding: 1rem 1.25rem 1.5rem; text-align: center; border-radius: 0 0 1.75rem 1.75rem; min-height: 14rem; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero .icon { border: 0; background: rgb(255 255 255 / 18%); color: inherit; width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.1rem; }
.table-chip { background: rgb(255 255 255 / 20%); padding: 0.25rem 0.85rem; border-radius: 999px; font-weight: 800; }
.logo { width: 4rem; height: 4rem; margin: 0.25rem auto 0.5rem; border-radius: 1.25rem; background: rgb(255 255 255 / 22%); display: grid; place-items: center; font-size: 2rem; font-weight: 900; }
.hero h1 { margin: 0; font-size: 1.6rem; font-weight: 900; }
.welcome { margin: 0.25rem 0 0.9rem; opacity: 0.92; font-weight: 600; }
.hero-acts { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.hero-btn { border: 0; background: rgb(255 255 255 / 92%); color: #0f172a; border-radius: 999px; padding: 0.55rem 1rem; font-weight: 800; display: inline-flex; gap: 0.35rem; align-items: center; box-shadow: 0 4px 14px rgb(0 0 0 / 15%); }
.hero-btn:disabled { opacity: 0.55; }
.notice { margin: 0.9rem 1rem 0; padding: 0.75rem 1rem; border-radius: 1rem; background: #fef3c7; color: #92400e; font-weight: 700; }

/* the search and the groups */
.sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 0.75rem 1rem 0.5rem; }
.search { width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.6rem 1rem; outline: none; }
.search:focus { border-color: var(--a); }
.chips { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; padding-top: 0.55rem; }
.chips button { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.35rem 0.9rem; font-weight: 800; color: var(--muted); }
.chips button.on { background: var(--a); border-color: var(--a); color: var(--on); }

/* the menu */
.menu { padding: 0 1rem; }
.menu section { scroll-margin-top: 7.5rem; }
.menu h2 { font-size: 1.2rem; margin: 1.1rem 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.count { background: var(--al); color: var(--a2); font-size: 0.8rem; padding: 0 0.55rem; border-radius: 999px; }
:root[data-theme='dark'] .count { color: var(--a); }
.cards .items { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .cards .items { grid-template-columns: repeat(calc(var(--cols, 2) + 1), 1fr); } }
@media (min-width: 960px) { .cards .items { grid-template-columns: repeat(calc(var(--cols, 2) + 2), 1fr); } .menu { max-width: 1100px; margin: 0 auto; } }
.item { background: var(--card); border-radius: var(--r, 1.1rem); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; }
.item.out { opacity: 0.55; }
.item .pic { aspect-ratio: 4 / 3; background: var(--al); display: grid; place-items: center; font-size: 2.2rem; font-weight: 900; color: var(--a); }
.item .pic img { width: 100%; height: 100%; object-fit: cover; }
.item .info { padding: 0.6rem 0.75rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.item h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.second { color: var(--muted); font-weight: 600; }
.desc { margin: 0; color: var(--muted); font-size: 0.85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .row { margin-top: auto; display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; padding-top: 0.3rem; }
.price { color: var(--a2); font-size: 1.02rem; }
:root[data-theme='dark'] .price { color: var(--a); }
.tag { font-size: 0.72rem; font-weight: 800; padding: 0.05rem 0.5rem; border-radius: 999px; background: #e2e8f0; color: #334155; }
.tag.red { background: #fee2e2; color: var(--red); }
.tag.in { background: var(--a); color: var(--on); }
.list .items { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 760px) { .list .items { grid-template-columns: 1fr 1fr; } }
.list .item { flex-direction: row; }
.list .item .pic { width: 108px; aspect-ratio: auto; min-height: 96px; flex: none; }
.none { text-align: center; color: var(--muted); padding: 2rem; }
footer { text-align: center; color: var(--muted); padding: 2rem 1rem 1rem; }
footer .pre { white-space: pre-line; margin: 0 0 0.5rem; }

/* the cart bar and the order's state */
.cart-bar { position: fixed; inset-inline: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 8; border: 0; border-radius: 1.1rem; background: var(--a); color: var(--on); padding: 0.85rem 1rem; display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; box-shadow: 0 10px 30px rgb(0 0 0 / 22%); }
.cart-bar .n { background: rgb(255 255 255 / 25%); min-width: 1.9rem; height: 1.9rem; border-radius: 999px; display: grid; place-items: center; font-weight: 900; }
.grow { flex: 1; }
.status-pill { position: fixed; top: 0.75rem; inset-inline-start: 50%; transform: translateX(50%); z-index: 9; border: 0; border-radius: 999px; padding: 0.4rem 1rem; font-weight: 800; background: #fff; color: #0f172a; box-shadow: 0 6px 18px rgb(0 0 0 / 18%); }
.status-pill.accepted { background: #dcfce7; color: #166534; }
.status-pill.rejected { background: #fee2e2; color: #991b1b; }
/* the kitchen's stages (with its screens) */
.status-pill.making { background: #fef3c7; color: #92400e; }
.status-pill.ready { background: #dbeafe; color: #1e40af; }

/* the sheets */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgb(15 23 42 / 0%); display: flex; align-items: flex-end; justify-content: center; transition: background 0.2s; }
.sheet-back.on { background: rgb(15 23 42 / 45%); }
.sheet { width: 100%; max-width: 620px; max-height: 90vh; overflow: auto; background: var(--card); border-radius: 1.5rem 1.5rem 0 0; padding: 0.5rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.22s ease-out; }
.sheet-back.on .sheet { transform: none; }
.grab { width: 3rem; height: 0.3rem; background: var(--line); border-radius: 999px; margin: 0.2rem auto 0.8rem; }
.sheet h2 { margin: 0.25rem 0 0.5rem; }
.sheet input, .sheet textarea { width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: 0.9rem; padding: 0.65rem 0.9rem; margin: 0.35rem 0; outline: none; resize: none; }
.sheet input:focus, .sheet textarea:focus { border-color: var(--a); }
.big { width: 100%; max-height: 16rem; object-fit: cover; border-radius: 1rem; }
.price-line { font-size: 1.3rem; font-weight: 900; color: var(--a2); margin: 0.25rem 0 0.5rem; }
.add-row { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.5rem; }
.stepper { display: flex; align-items: center; gap: 0.25rem; background: var(--bg); border-radius: 999px; padding: 0.25rem; }
.stepper button { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--card); font-size: 1.3rem; font-weight: 900; box-shadow: var(--shadow); }
.stepper .qty, .stepper b { min-width: 2rem; text-align: center; font-size: 1.1rem; }
.stepper.sm button { width: 2rem; height: 2rem; font-size: 1.05rem; }
.primary { flex: 1; border: 0; border-radius: 999px; background: var(--a); color: var(--on); padding: 0.8rem 1rem; font-weight: 900; font-size: 1.05rem; }
.primary:disabled { opacity: 0.6; }
.block { width: 100%; margin-top: 0.5rem; }
.cart-lines { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.cl { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.cl small { display: block; color: var(--muted); }
.cl .p { font-weight: 800; min-width: 5rem; text-align: end; }
.total-line { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 900; padding: 0.5rem 0; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0; text-align: center; }
.status-sheet { text-align: center; padding: 0.5rem 0 1rem; }
.ring { width: 6rem; height: 6rem; margin: 0.5rem auto; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; border: 0.4rem solid var(--line); }
.ring.waiting { border-color: #f59e0b; animation: pulse 1.6s infinite; }
.ring.accepted { border-color: #16a34a; }
.ring.rejected { border-color: var(--red); }
.ring.making { border-color: #f59e0b; animation: pulse 1.6s infinite; }
.ring.ready { border-color: #2563eb; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(0.94); opacity: 0.8; } }
.code { display: inline-flex; flex-direction: column; gap: 0.15rem; background: var(--al); border-radius: 1rem; padding: 0.6rem 1.5rem; margin-top: 0.5rem; font-weight: 700; }
.code b { font-size: 2rem; letter-spacing: 0.15rem; color: var(--a2); }
.ticket { border-bottom: 1px dashed var(--line); padding-bottom: 0.5rem; margin-bottom: 0.5rem; }
.ticket h3 { margin: 0.4rem 0; font-size: 0.95rem; color: var(--muted); }
.bl { display: flex; gap: 0.5rem; padding: 0.3rem 0; }
.bl .q { min-width: 1.6rem; font-weight: 900; color: var(--a2); }
.bl small { color: var(--muted); }
.br { display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; padding: 0.15rem 0; }

#g-toast { position: fixed; top: 3.5rem; inset-inline: 1rem; z-index: 30; display: flex; flex-direction: column; gap: 0.4rem; align-items: center; pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 0.55rem 1rem; border-radius: 999px; font-weight: 700; box-shadow: 0 6px 20px rgb(0 0 0 / 25%); }
.toast.ok { background: #166534; }
.toast.error { background: #991b1b; }

/* the restaurant's other layouts: big pictures, text only; a short head; the cover picture */
.big .items { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .big .items { grid-template-columns: 1fr 1fr; } }
.big .item .pic { aspect-ratio: 16 / 10; }
.big .item h3 { font-size: 1.15rem; }
.textonly .items { display: flex; flex-direction: column; gap: 0; background: var(--card); border-radius: var(--r, 1.1rem); box-shadow: var(--shadow); overflow: hidden; }
.textonly .item { flex-direction: row; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.textonly .item .pic { display: none; }
.textonly .item .info { flex-direction: row; flex-wrap: wrap; align-items: center; }
.textonly .item h3 { flex: 1; }
.textonly .item .row { margin-top: 0; padding-top: 0; }
.no-desc .desc { display: none; }
.compact-head .hero { min-height: 0; padding: 0.75rem 1rem 1rem; }
.compact-head .logo, .compact-head .welcome { display: none; }
.compact-head .hero h1 { font-size: 1.3rem; }
.has-cover .hero { background: linear-gradient(160deg, rgb(0 0 0 / 35%), rgb(0 0 0 / 55%)), var(--cover) center / cover; color: #fff; }
.sheet, .cart-bar, .hero { border-radius: 0 0 var(--r, 1.75rem) var(--r, 1.75rem); }
.sheet { border-radius: var(--r, 1.5rem) var(--r, 1.5rem) 0 0; }
.cart-bar { border-radius: var(--r, 1.1rem); }

/* the guest's name and his reward */
.member { padding: 0 1rem; }
.member:empty { display: none; }
.member-ask { width: 100%; margin-top: 0.75rem; border: 1.5px dashed var(--a); background: var(--al); color: var(--a2); border-radius: var(--r, 1rem); padding: 0.65rem 1rem; font-weight: 800; }
:root[data-theme='dark'] .member-ask { color: var(--a); }
.member-card { margin-top: 0.75rem; display: flex; align-items: center; gap: 0.5rem; background: var(--card); border-radius: var(--r, 1rem); padding: 0.6rem 0.9rem; box-shadow: var(--shadow); }
.member-card small { color: var(--muted); font-weight: 700; }
.link { border: 0; background: none; color: var(--muted); text-decoration: underline; font-weight: 700; }
.reward { margin-top: 0.5rem; padding: 0.55rem 0.9rem; border-radius: var(--r, 1rem); background: var(--al); color: var(--a2); font-weight: 800; }
.reward.on { background: #fef3c7; color: #92400e; }
.member-sheet { text-align: center; padding-bottom: 0.5rem; }
.member-ico { font-size: 2.6rem; }
.ghost { border: 0; background: none; color: var(--muted); font-weight: 800; padding: 0.75rem; }

/* an item's questions and extras (chips: one answer or several; the needed ones marked), the add button with its
   price, the cart's head and its lines (touch one to change it) */
.tag.opt { background: var(--al); color: var(--a2); }
:root[data-theme='dark'] .tag.opt { color: var(--a); }
.q { margin: 0.75rem 0; padding: 0.65rem 0.75rem; border-radius: var(--r, 1rem); background: var(--bg); border: 1.5px solid transparent; transition: border-color 0.2s; }
.q.missing { border-color: var(--red); animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.q-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.q-hint { color: var(--muted); font-weight: 700; font-size: 0.8rem; }
.q-hint.need { color: var(--red); }
.opts { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.opt { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.45rem 0.9rem; font-weight: 700; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.25; min-height: 2.6rem; justify-content: center; }
.opt small { color: var(--muted); font-weight: 700; font-size: 0.75rem; }
.opt[aria-pressed='true'] { background: var(--a); border-color: var(--a); color: var(--on); }
.opt[aria-pressed='true'] small { color: var(--on); opacity: 0.9; }
.add-btn { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.add-price { background: rgb(255 255 255 / 22%); border-radius: 999px; padding: 0.1rem 0.7rem; font-size: 0.95rem; }
.cart-head { display: flex; align-items: center; gap: 0.6rem; }
.cart-head h2 { margin-bottom: 0.25rem; }
.cart-count { color: var(--muted); font-weight: 700; }
.empty-cart { color: var(--red); font-size: 0.85rem; }
.cl-name { flex: 1; border: 0; background: none; padding: 0; text-align: start; display: flex; flex-direction: column; gap: 0.1rem; }
.cl-edit { color: var(--a2); font-weight: 800; font-size: 0.75rem; }
:root[data-theme='dark'] .cl-edit { color: var(--a); }

/* a delivery from the internet: the guest's details in the cart, the charge line */
.notice.delivery { background: var(--al); color: var(--ink); }
.delivery-box { margin: 0.5rem 0; padding: 0.75rem; border: 1.5px solid var(--line); border-radius: 1rem; }
.delivery-box h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.sheet select.zone { width: 100%; border: 1.5px solid var(--line); background: var(--bg); color: inherit; border-radius: 0.9rem; padding: 0.65rem 0.9rem; margin: 0.35rem 0; font: inherit; }
.charge-line { display: flex; justify-content: space-between; color: var(--muted); padding-top: 0.25rem; }
.charge-line:empty { display: none; }
