/* The item fly sheet (shared/item-sheet.js): the customer menu and the staff Take screen. The box, edge, handle row and close are shared/dialog.css. */
/* ---- Item sheet ---- */
.product-sheet { --page-max: 560px; }   /* one width on every page: the customer page's column (style.css); a staff page's --page-max is wider */
.product-sheet .sheet-body { padding: 0 var(--space-3) var(--space-3); }
.product-summary { align-items: flex-start; gap: var(--space-2); margin-block-end: var(--space-2); }
.product-summary .sheet-top { flex: 0 0 40%; position: relative; block-size: auto; overflow: visible; background: none; }
.product-sheet .product-summary .sheet-top img { position: static; inline-size: 100%; block-size: auto; max-block-size: none; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.product-sheet .photo-credit { padding: var(--space-half) 0; background: none; font-size: var(--text-min); color: var(--ink-muted); }
.product-details { display: flex; flex-direction: column; gap: var(--space-half); }
.product-sheet h2 { margin: 0; font: var(--weight-strong) var(--text-h4)/var(--lh-h4) var(--font-sans); letter-spacing: var(--track-body); }   /* the dish name: the face and weight of the name on its card and row */
.product-sheet .name-th { font: var(--weight-body) var(--text-min)/var(--lh-small) var(--font-sans); color: var(--ink-muted); }
.product-sheet .price, .product-details .price { margin: var(--space-1) 0 0; font: var(--weight-loud) var(--text-body)/var(--lh-small) var(--font-sans); }
.product-sheet .desc { margin: 0 0 var(--space-3); font-size: var(--text-min); line-height: var(--lh-small); color: var(--ink-muted); }
.product-sheet .allergen-lines { margin: 0 0 var(--space-3); border-block-color: var(--rule); }
.product-sheet .allergen-lines p { font-size: var(--text-min); }

/* Options: one divided stack. A group is a heading and its rows; an answered single-choice group folds to one row. */
#sheet-options { --row-pad-x: var(--space-1); }
#sheet-options .ck-row { margin-inline: calc(var(--space-1) * -1); font-weight: var(--weight-strong); }   /* the row is one gap wider than its text each side, so the focus ring inside it never touches a word or a box */
#sheet-options .ck-row--action { inline-size: calc(100% + 2 * var(--space-1)); }
.option-group { margin: 0; padding: var(--space-2) 0; border: 0; background: none; min-inline-size: 0; }
.option-group.is-folded { padding: 0; }
#sheet-options > .option-group ~ .option-group { border-block-start: var(--table-line-w) solid var(--table-line); }   /* the system's rule between rows; the unlayered border: 0 above would otherwise win */
.option-group legend { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); float: left; inline-size: 100%; margin: 0 0 var(--space-1); padding: 0; font: var(--weight-loud) var(--text-body)/var(--lh-small) var(--font-sans); }
.option-group legend .req { font-size: var(--text-min); font-weight: var(--weight-body); color: var(--ink-muted); }
.option-group legend + * { clear: both; }
.option-label { display: block; font-size: var(--text-min); font-weight: var(--weight-body); color: var(--ink-muted); }
.option-value { display: block; }
#sheet-options .ck-row .opt-price { flex: none; font-size: var(--text-body); color: var(--ink); }
#sheet-options input.ck-radio { border-radius: 0; }   /* style.css rounds every radio */

/* Add note: the cart's row that opens a field, under the options, with the options' rule above it and their row inset. The field is the cart's note field
   (cart/index.html): one line high, grows with its text to four lines. */
.sheet-note { --row-pad-x: var(--space-1); border-block-start: var(--table-line-w) solid var(--table-line); }
.sheet-note .ck-row { margin-inline: calc(var(--space-1) * -1); inline-size: calc(100% + 2 * var(--space-1)); border-bottom: 0; font-weight: var(--weight-strong); }
.sheet-note .ck-row[aria-expanded="true"] > .ck-row-icon { visibility: hidden; }   /* an open row shows no sign: the row is the toggle */
.sheet-note-field { padding-block-end: var(--space-2); }
.sheet-note textarea.ck-input { --note-edge: calc(2 * var(--field-pad-y) + 2 * var(--field-line-w)); display: block; inline-size: 100%; min-height: var(--control-h-m); max-block-size: calc(4lh + var(--note-edge)); overflow-y: auto; field-sizing: content;
  padding: var(--field-pad-y) var(--field-pad-x); line-height: calc(var(--control-h-m) - var(--note-edge)); }

/* The foot never scrolls: the same stepper as the cart, and Add to order. */
.product-sheet .sheet-foot {
  gap: var(--space-2); margin: var(--space-3) calc(-1 * var(--space-3)) calc(-1 * var(--space-3));
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom)); background: var(--bg); border-top: var(--line-1) solid var(--rule);
}
.sheet-foot .ck-stepper { flex: none; border-color: var(--primary-ink); }
.sheet-foot .ck-btn:not(.ck-btn--icon) { flex: 1 1 0; min-inline-size: 0; }
@media (max-width: 480px) { .sheet-foot .ck-btn:not(.ck-btn--icon) { --b-text: var(--btn-text-s); } }   /* Add to order: the size of View cart and Pay on a phone */
