/* Ordering in rounds (xq-rnd-): what a venue of small plates adds to the table-ordering pages.
   One idea, drawn the same way on every screen: the round being put together has a broken edge and
   says "Not sent"; a round that has gone to the kitchen has a solid edge and says its status.
   The edge is never the only sign: the words are always there. Colours come from the venue's tokens. */

/* ---- the ledger: this round, and the rounds already sent --------------------------- */
.xq-rnd-ledger { display: grid; gap: 6px; max-width: 52rem; }
.xq-rnd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; min-height: 52px; padding: 3px 14px; border-radius: var(--x-radius, 8px); background: var(--x-surface); }
.xq-rnd-row--now { border: 2px dashed var(--x-accent); }
.xq-rnd-row--sent { border: 1px solid var(--x-line); padding: 4px 15px; }
.xq-rnd-k { flex: none; min-width: 5.5rem; color: var(--x-muted); font-size: .8125rem; font-weight: 700; line-height: var(--x-lh-label); letter-spacing: var(--x-caps-track); text-transform: var(--x-caps); }
.xq-rnd-v { flex: 1 1 11rem; min-width: 0; padding-block: 6px; }
.xq-rnd-go { flex: none; font-size: .9375rem; font-weight: 600; }
.xq-rnd-chips { display: flex; flex: 1 1 11rem; flex-wrap: wrap; gap: 0 16px; min-width: 0; }
.xq-rnd-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0; color: var(--x-ink); font-weight: 600; text-decoration: none; }
.xq-rnd-chip-n { text-decoration: underline; text-underline-offset: 3px; }
/* The round a screen is about: heavier words and a mark before them, never a colour alone. */
.xq-rnd-chip[aria-current] .xq-rnd-chip-n { font-weight: 700; text-decoration-thickness: 2px; }
.xq-rnd-chip[aria-current]::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* A round waiting at another table: said under this table's rows, and never drawn as one of them. */
.xq-rnd-else { display: flex; align-items: baseline; gap: 8px; padding: 2px 14px; font-size: .9375rem; }
.xq-rnd-else > .x-i { flex: none; align-self: center; color: var(--x-muted); }
.xq-rnd-cart > .xq-rnd-else { padding-inline: 0; }

/* ---- the menu and an item: what the table has sent, and which round is being added to -- */
/* On a card it is a fact to read, so it is quiet text with a tick and has none of the outline a control has. */
.xq-card .xq-card-f { padding: 0; border: 0; color: var(--x-muted); font-weight: 400; }
.xq-card .xq-rnd-had { display: inline-flex; font-weight: 400; }
/* Under an item's name: this round, with the same broken edge as on the menu. */
.xq-item .xq-card-f { justify-self: stretch; padding: 6px 14px; border: 2px dashed var(--x-accent); background: var(--x-surface); font-size: 1rem; font-weight: 400; }
.xq-rnd-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
.xq-rnd-item .xq-rnd-k { min-width: 0; }

/* After Reset demo: what ended, as wide as the ledger under it; its one control lines up with its words. */
.xq-rnd-ended { max-width: 52rem; }
.xq-rnd-hide { margin-inline-start: -12px; }

/* ---- a heading with its tag: "Round 3 · Not sent", "Sent rounds · Sent" ------------ */
.xq-rnd-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
:where(#main) .xq-rnd-h { font-size: 1.375rem; }
.xq-rnd-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border: 1px solid var(--x-line); border-radius: 999px; background: none; color: var(--x-ink); font-size: .8125rem; font-weight: 700; line-height: var(--x-lh-label); white-space: nowrap; }
.xq-rnd-tag--draft { border: 2px dashed var(--x-accent); }

/* ---- this round, above the sent rounds --------------------------------------------- */
.xq-rnd-now { --x-gap: 12px; padding: 16px; border: 2px dashed var(--x-accent); border-radius: calc(var(--x-radius, 8px) + 2px); background: var(--x-surface); }
/* The kit's empty state has a broken edge of its own; inside this panel one is enough. */
.xq-rnd-now .x-state { padding-block: 20px; border: 0; }
.xq-rnd-now .xq-lines { border-bottom: 0; }
.xq-rnd-sent { --x-gap: 12px; margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--x-line); }
.xq-rnd-after { padding-bottom: clamp(24px, 5vw, 56px); }
.xq-rnd-after > * { max-width: 52rem; }
.xq-rnd-after .xq-rnd-sent { margin-top: 0; }

/* ---- a sent round as a card: a solid edge that carries its status, with the status in words beside it */
.xq-rnd-card { border-color: var(--x-line); border-inline-start-width: 4px; }
.xq-rnd-card--sent, .xq-rnd-card--preparing { border-inline-start-color: var(--x-info); }
.xq-rnd-card--ready { border-inline-start-color: var(--x-ok); }
.xq-rnd-card .x-card-title { font-size: 1.125rem; }
.xq-rnd-sum { color: var(--x-muted); font-size: .9375rem; }
.xq-rnd-card .xq-lines { border-bottom: 0; }
.xq-rnd-card .xq-line { padding: 8px 0; }
.xq-rnd-card .x-card-actions { margin-top: 2px; margin-inline-start: -12px; }

/* ---- one sent round: its page ------------------------------------------------------ */
.xq-rnd-page .xq-rnd-head { margin-top: 10px; }
.xq-rnd-ways { --x-gap: 4px 24px; }
.xq-rnd-before { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
#xq-rnd-boundary:focus { outline: none; }
#xq-rnd-boundary:focus-visible { outline: 2px solid var(--x-focus); outline-offset: 2px; }
.xq-rnd-had { display: flex; align-items: baseline; gap: 8px; font-weight: 600; }
.xq-rnd-had > .x-i { flex: none; align-self: center; color: var(--x-muted); }
.xq-rnd-visit { margin-top: 10px; }

/* ---- the staff's ticket: the table asked about this round --------------------------- */
.xq-rnd-asked { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border: 1px dashed var(--x-line); border-radius: var(--x-radius, 8px); background: var(--x-surface-2); font-size: .9375rem; }
.xq-rnd-asked > .x-i { flex: none; align-self: center; color: var(--x-muted); }

/* A table here may be "Counter 1", and a status "Acknowledged": with large text the two take a line each. */
.xq-ticket-head { flex-wrap: wrap; }

@media (max-width: 29.9375em) {
  .xq-rnd-now { padding: 12px; }
  .xq-rnd-row { padding-inline: 12px; }
  .xq-rnd-k { min-width: 100%; padding-top: 8px; }
  .xq-rnd-row--sent .xq-rnd-go { flex-basis: 100%; }
  .xq-rnd-else { padding-inline: 12px; }
  /* A round that cannot be sent as it stands: on a phone the table keeps a line and what to do takes the bar's whole width under it. */
  .xq-bar:has(#xq-fix) .x-actionbar-in { flex-wrap: wrap; gap: 0 12px; }
  .xq-bar:has(#xq-fix) .xq-bar-t { min-height: 0; padding-top: 2px; }
  .xq-bar #xq-fix { flex: 1 1 100%; padding-bottom: 2px; }
}
@media (forced-colors: active) {
  .xq-rnd-row--now, .xq-rnd-now, .xq-rnd-tag--draft { border-color: Highlight; }
}
