/* CPQ's own layout rules. The UI kit is the only look: no colors, fonts or icons are defined here. */

/* Quote line editor: a spreadsheet-like table whose inputs fill their cells. */
.lines-grid td { vertical-align: top; }
.lines-grid .cell-name { min-width: 240px; }
.lines-grid .cell-name input, .lines-grid .cell-name textarea { width: 100%; }
.lines-grid tr.line-child .cell-name { padding-left: var(--s4); }
.lines-grid .line-meta { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s1); }
.lines-grid select.select-sm { width: auto; min-width: 7.5em; }

/* Two columns that become one on narrow screens (quote workspace: editor beside totals). */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s3); align-items: start; }
.split > aside { position: sticky; top: calc(var(--pagehead-offset, 72px) + var(--s2)); display: grid; gap: var(--s3); }
/* The line editor needs its width: totals sit beside it only on very wide screens, otherwise under it in two columns. */
@media (max-width: 1700px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > aside { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}

.totals-list { display: grid; gap: var(--s1); margin: 0; }
.totals-list > div { display: flex; justify-content: space-between; gap: var(--s2); }
.totals-list dt { margin: 0; }
.totals-list dd { margin: 0; text-align: right; }
.totals-list .total-row { border-top: 1px solid var(--border); padding-top: var(--s1); font-weight: 600; }

/* Proposal option cards a customer picks from. */
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s2); }

/* Offer comparison: keep the supplier column readable when the table scrolls sideways. */
.offers td.wrap { min-width: 220px; }

.stack-sm { display: grid; gap: var(--s1); }
.inline-form { display: inline; }
.preview-frame-box { width: 100%; height: 100vh; height: 100dvh; max-height: 900px; border: 1px solid var(--border); border-radius: var(--r-card); }
.code-input { letter-spacing: 0.3em; max-width: 12em; }
