/* AfriBilling – invoices, quotes, credit notes (builder C). The design stylesheet carries the layout; these are the
   small pieces the static design did not need (lists inside modals, payment rows, the document discount field). */

/* tax pill remove button (design: an x icon inside the tag) */
.tax-row .tag .tax-x { border: 0; background: none; padding: 0 0 0 2px; margin: 0; color: inherit; cursor: pointer; display: inline-grid; place-items: center; min-width: 18px; min-height: 18px; }
.tax-row .tag .tax-x i { font-size: 13px; opacity: .7; }
.tax-row .dd-menu { min-width: 230px; }

/* section heading rows and drag state */
.lines tr.sec-row .desc .input { font-weight: 700; }
.lines tr.dragging { opacity: .45; }

/* client picker */
.client-menu { max-height: 360px; overflow: auto; }
.client-list { max-height: 260px; overflow: auto; }
.client-list button[hidden] { display: none; }

/* summary: discount on the whole document */
.doc-disc { display: grid; gap: 6px; padding-top: 4px; }
.doc-disc .input-group { display: flex; }
.doc-disc .select { width: auto; flex: 0 0 auto; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.doc-disc .input { flex: 1; min-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.sw-row { cursor: pointer; gap: 12px; margin: 0; }
.sw-row > div { min-width: 0; }

/* native date inputs: the design shows only the calendar icon on the left */
.ed-top .input-icon { position: relative; }
.ed-top input[type=date] { position: relative; }
.ed-top input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }

/* pick lists (products, billable expenses) */
.pick-list { display: grid; gap: 6px; max-height: min(52vh, 420px); overflow: auto; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-height: 44px; }
.pick:hover { background: var(--surface-2); }
.pick input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--brand); }
.pick-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pick-main b { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-main small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pick-amt small { font-weight: 500; color: var(--muted); }

/* invoice view: payments + credit notes */
.pay-list { display: grid; gap: 14px; }
.pay-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pay-row .tr { text-align: right; flex: 0 0 auto; }
.pay-row .chip { vertical-align: middle; }
.apply-credit { align-items: flex-start; }
.apply-credit .input-group { display: flex; }
.sales-doc { min-width: 0; }
.sales-preview { max-width: 880px; margin: 0 auto; }

/* quotes: rows open the panel; requests list */
#q-table tr[data-href] { cursor: pointer; }
.req-msg { white-space: pre-line; font-size: 13px; color: var(--text-2); margin-top: 4px; max-width: 520px; }
.q-panel .sig-meta { font-size: 11.5px; }

@media (max-width: 720px) {
  .pay-row { align-items: flex-start; }
  .tax-row .tag .tax-x { min-width: 28px; min-height: 28px; }
}
@media print {
  body.a4 .pdf-grid, .pdf-grid { display: block; }
}
.totals-box > [hidden], .doc-disc [hidden] { display: none !important; }
