/* =============================================================================
   JES CRM · pages/invoices.css — the look that only these pages have: invoices, invoice_payments.
   Owner: the page builder "invoices" of the vtiger-look wave (docs/vtiger-look/02-ui-contract.md §a.5, §j.2).
   Every class starts with pg-invoices- ; every value comes from tokens.css (var(--…)).
   Created empty in step 0 by the shell builder.
   ============================================================================= */

/* The Item Details block of the invoice form (static/js/pages/invoices.js, key item_details): vtiger draws the
   "Add …" buttons right under the lines and the totals table below them. The kit puts a block's render box
   (the totals, .section__custom) before its footer (the buttons): the order is turned round here. */
.block--edit[data-block="item_details"] > .block__body { display: flex; flex-direction: column; }
.block--edit[data-block="item_details"] > .block__body > .section__footer { order: 1; }
.block--edit[data-block="item_details"] > .block__body > .section__custom { order: 2; }

/* the GST Rate% cell of a line in the form holds the GST category list ("Standard-rated" … "No GST charged (before
   GST start)"): the list is as wide as its longest value (width: auto), so that every category can be read whatever
   Settings names it (invoices/lines.js FORM_ITEM_COLUMNS declares the column 15 %). The plain inputs of the line
   may shrink to 4rem (the kit's 5rem) so that the line still fits a 1440 px screen without scrolling sideways. */
.block--edit[data-block="item_details"] .items__table .field[data-col="gst_category"] select { width: auto; min-width: 100%; }
.block--edit[data-block="item_details"] .items__table td .field__control > input:not([type="checkbox"]) { min-width: 4rem; }

/* the Bills column of the record page's Item Details (invoices/lines.js BILLS): a chip never wraps inside, so a
   line stays one line high as in vtiger; two chips of one line still stand one under the other */
.pg-invoices-bills .chip { white-space: nowrap; }

/* the totals the server worked out for a Draft, under the lines (totals.js) */
.pg-invoices-totals { margin-top: var(--space-2); }
