/* Batch B1 (373): QR table ordering. The "Table 7" card takes the place of the
   Dine-in / Takeaway / Delivery choice on Home and in the checkout.
   Neutral surface on purpose: orange stays for actions, gold for offers and rewards. */
.table-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--cx-radius-md, 14px);
  box-shadow: var(--cx-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.18));
  color: var(--text);
}
.table-chip-checkout { flex-wrap: wrap; margin-bottom: 20px; padding: 13px 14px; }
.table-chip-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
}
.table-chip-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.table-chip-copy { flex: 1 1 auto; min-width: 0; text-align: start; }
.table-chip-copy small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.table-chip-copy strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.table-chip-note {
  flex: 1 1 100%;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: start;
}
/* A calm "you are connected to this table" light. */
.table-chip-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 204, 122, 0.16);
  vertical-align: 1px;
}
.table-chip-leave {
  flex: 0 0 auto;
  max-width: 38%;
  min-height: 44px;
  padding: 0 2px;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: end;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.table-chip-leave:active { color: var(--text); }

/* "Leave Table 7?" */
.table-chip-ask { flex-wrap: wrap; align-items: center; }
.table-chip-ask .table-chip-copy { flex: 1 1 100%; }
.table-chip-ask .table-chip-copy strong { font-size: 15px; }
.table-chip-ask .table-chip-copy small { white-space: normal; font-weight: 500; margin-top: 2px; }
.table-chip-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1 1 100%; }
.table-chip-actions button {
  min-height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.table-chip-actions .table-chip-go { border-color: var(--orange); color: var(--orange); }

/* While the server is asked which table this is. */
.table-chip-wait .table-chip-copy strong { color: var(--muted); font-size: 15px; font-weight: 600; }
.table-chip-wait .table-chip-icon { animation: table-chip-wait 1.4s ease-in-out infinite; }
@keyframes table-chip-wait { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .table-chip-wait .table-chip-icon { animation: none; } }

body.light-theme .table-chip { border-color: #d8d3ca; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06); }
body.light-theme .table-chip-icon { background: #f4f2ee; border-color: #e3e0d8; }
body.light-theme .table-chip-actions button { border-color: #d8d3ca; }
body.light-theme .table-chip-actions .table-chip-go { border-color: var(--orange); }

/* Desktop website mode: the card sits where the order-type choice sits, beside the search box. */
@media (min-width: 1025px) {
  .home-screen .table-chip-home { width: 42%; margin-top: -78px; margin-inline-start: auto; margin-bottom: 16px; }
  .table-chip-checkout { max-width: 720px; }
}

/* ---- Batch B1g (376): the two ways to order at a table --------------------------------------------
   "Order as guest" (a name only) and "Sign in and earn points". Both are full cards with the same
   weight; the chosen one opens. Gold belongs to the rewards path only. */
.table-who { display: grid; gap: 10px; margin: 0 0 6px; }
.table-who-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--cx-radius-md, 14px);
  transition: border-color var(--cx-fast, 140ms) ease, box-shadow var(--cx-fast, 140ms) ease;
}
.table-who-card.on { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--cx-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.18)); }
.table-who-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  background: none;
  border: 0;
  border-radius: inherit;
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.table-who-radio {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  transition: border-color var(--cx-fast, 140ms) ease;
}
.table-who-card.on .table-who-radio { border-color: var(--orange); background: radial-gradient(circle, var(--orange) 0 5px, transparent 6px); }
.table-who-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.table-who-copy strong { color: var(--text); font-size: 16px; font-weight: 700; line-height: 1.3; }
.table-who-copy small { color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.table-who-mark { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); }
.table-who-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .table-who-mark svg { transform: scaleX(-1); }
.table-who-body { padding: 0 14px 14px; }
.table-who-body .field { width: 100%; margin: 0; }
.table-who-body .checkout-mobile-intro { margin-top: 0; }
#app .table-guest-name {
  min-height: 54px;
  padding: 13px 15px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-size: 16px;
  outline: none;
}
#app .table-guest-name:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 138, 26, 0.12); }
#app .table-guest-name.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(232, 93, 76, 0.12); }
.table-guest-hint { margin: 8px 2px 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; text-align: start; }
.table-guest-error { margin: 8px 2px 0; color: var(--danger); font-size: 13px; font-weight: 600; line-height: 1.4; text-align: start; }

/* The rewards path: gold, and it should attract. */
.table-who-gold {
  border-color: rgba(224, 177, 90, 0.5);
  background: linear-gradient(135deg, rgba(224, 177, 90, 0.16), rgba(224, 177, 90, 0.04) 60%), var(--card);
}
.table-who-gold .table-who-copy strong { color: var(--gold); }
.table-who-gold .table-who-mark { background: rgba(224, 177, 90, 0.16); color: var(--gold); }
.table-who-gold .table-who-mark svg { fill: currentColor; stroke: none; }
[dir="rtl"] .table-who-gold .table-who-mark svg { transform: none; }
.table-who-gold.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--cx-shadow-1, 0 4px 14px rgba(0, 0, 0, 0.18)); }
.table-who-gold.on .table-who-radio { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 0 5px, transparent 6px); }

body.light-theme .table-who-card { border-color: #d8d3ca; }
body.light-theme .table-who-card.on { border-color: var(--orange); }
body.light-theme .table-who-gold { border-color: #d9b66a; background: linear-gradient(135deg, #fbf1d9, #fffaf0 60%); }
body.light-theme .table-who-gold .table-who-copy strong { color: #7a5a12; }
body.light-theme .table-who-gold .table-who-mark { background: #f3e2b5; color: #8a6614; }
body.light-theme .table-who-gold.on { border-color: #b8891f; box-shadow: 0 0 0 1px #b8891f, 0 4px 14px rgba(0, 0, 0, 0.06); }
body.light-theme .table-who-gold.on .table-who-radio { border-color: #b8891f; background: radial-gradient(circle, #b8891f 0 5px, transparent 6px); }
body.light-theme #app .table-guest-name { background: #fff; border-color: #d8d3ca; }

/* The cart, in place of the coupon box, while ordering as a guest. */
.table-guest-coupon { margin: 12px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: start; }
.table-guest-coupon .link { padding: 0; min-height: 0; font-size: 13px; font-weight: 700; }
@media (min-width: 1025px) { .table-who { max-width: 720px; } }
.table-who-body .checkout-mobile-field { margin-bottom: 0; }

/* ---- Batch 1b (382): call a waiter / ask for the bill ---------------------------------------------
   The bell lives in the "Table N" card; the choices open in the app's bottom sheet (theme.css).
   Orange = the action (the bell, a call that is waiting); green = staff have seen it. */
.table-chip-calls { flex-wrap: wrap; }
.table-call-bell {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  background: rgba(240, 138, 26, 0.1);
  border: 1px solid var(--orange);
  border-radius: var(--cx-radius-pill, 999px);
  color: var(--orange);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--cx-fast, 140ms) var(--cx-ease, ease), background var(--cx-fast, 140ms) ease;
}
.table-call-bell:active { transform: scale(0.96); }
.table-call-bell svg, .table-call-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.table-call-bell.on { background: var(--orange); color: #111; }
.table-call-bell.on svg { transform-origin: 50% 10%; animation: table-call-ring 2.4s var(--cx-ease, ease) infinite; }
@keyframes table-call-ring { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-14deg); } 84% { transform: rotate(12deg); } 92% { transform: rotate(-6deg); } }
/* With the bell at the end of the row, "Not at this table?" moves under the table's name. */
.table-chip-calls .table-chip-copy .table-chip-leave { display: block; max-width: none; min-height: 34px; padding: 6px 0 0; text-align: start; }
.table-call-states { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.table-call-states:empty { display: none; }
.table-call-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(240, 138, 26, 0.35);
  border-radius: var(--cx-radius-pill, 999px);
  background: rgba(240, 138, 26, 0.1);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  animation: table-call-in var(--cx-base, 240ms) var(--cx-ease, ease) both;
}
.table-call-state i { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: table-call-pulse 1.6s ease-in-out infinite; }
.table-call-state.table-call-seen { border-color: rgba(61, 204, 122, 0.4); background: rgba(61, 204, 122, 0.1); }
.table-call-state.table-call-seen i { background: var(--green); animation: none; }
@keyframes table-call-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes table-call-pulse { 50% { opacity: 0.35; } }

/* the sheet */
.table-call-panel { gap: 14px; }
.table-call-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.table-call-head h3 { margin: 4px 0 0; }
.table-call-head span { flex: 0 0 auto; color: var(--muted); font-size: 13px; font-weight: 600; }
.table-call-list { display: grid; gap: 10px; overflow-y: auto; }
.table-call-row { border: 1px solid var(--line); border-radius: var(--cx-radius-md, 14px); background: var(--card); }
.table-call-row.running { border-color: rgba(240, 138, 26, 0.55); }
.table-call-row.running.table-call-seen { border-color: rgba(61, 204, 122, 0.55); }
.table-call-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  background: none;
  border: 0;
  border-radius: inherit;
  color: var(--text);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.table-call-choice:disabled { opacity: 0.55; cursor: default; }
.table-call-choice:active:not(:disabled) { background: rgba(255, 255, 255, 0.04); }
.table-call-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(240, 138, 26, 0.12);
  color: var(--orange);
}
.table-call-icon svg { width: 24px; height: 24px; }
.table-call-row.table-call-seen .table-call-icon { background: rgba(61, 204, 122, 0.14); color: var(--green); }
.table-call-copy { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.table-call-copy strong { font-size: 17px; font-weight: 700; line-height: 1.3; }
.table-call-copy small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.table-call-copy em { color: var(--muted); font-size: 13px; font-style: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.table-call-cancel {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.table-call-other { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
#tableCallSheet .table-call-note {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-size: 16px;
  outline: none;
}
#tableCallSheet .table-call-note:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 138, 26, 0.12); }
#tableCallSheet .table-call-note.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(232, 93, 76, 0.12); }
#tableCallSheet .table-call-send { width: auto; min-height: 52px; margin: 0; padding: 0 20px; }
.table-call-error { grid-column: 1 / -1; margin: 0 2px; color: var(--danger); font-size: 13px; font-weight: 600; text-align: start; }

body.light-theme .table-call-bell { background: #fff4e6; }
body.light-theme .table-call-bell.on { background: var(--orange); color: #111; }
body.light-theme .table-call-states { border-color: #e3e0d8; }
body.light-theme .table-call-row { border-color: #d8d3ca; }
body.light-theme .table-call-row.running { border-color: var(--orange); }
body.light-theme .table-call-choice:active:not(:disabled) { background: rgba(0, 0, 0, 0.03); }
body.light-theme .table-call-cancel { border-color: #e3e0d8; }
body.light-theme #tableCallSheet .table-call-note { background: #fff; border-color: #d8d3ca; }
@media (prefers-reduced-motion: reduce) {
  .table-call-bell, .table-call-bell.on svg, .table-call-state, .table-call-state i { animation: none; transition: none; }
}

/* Batch 388: the guest's mobile number, when the restaurant asks for it (under the name). */
#app .table-guest-phone { margin-top: 10px; text-align: start; }
[dir="rtl"] #app .table-guest-phone { text-align: end; }

/* Batch 391: the only field of the guest card (name not asked) needs no gap above it. */
#app .table-guest-only { margin-top: 0; }
/* Batch 391: "Your order is now at Table 7" (an order moved by staff). */
.table-move-note {
  margin: 10px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(240, 138, 26, 0.35);
  border-radius: 12px;
  background: rgba(240, 138, 26, 0.08);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  text-align: start;
}
.table-move-note strong { font-weight: 700; }
.table-chip-note.table-move-note { flex: 1 1 100%; padding: 9px 12px; }
.confirmation-screen .table-move-note { display: block; max-width: 100%; margin-top: 12px; }
body.light-theme .table-move-note { background: #fff4e6; border-color: #f0c48a; }
