/* Inventários (Blazor only, wms-inventory "Blazor: Inventários"); layout only, sizes in forms.css. Measured with dense data in headless Chrome at
   1440 px (right panel ~690 px, grids ~630 px): the React grids are nowrap inside a scroll box, and the review grid (10 to 12 columns) hid "Final" and
   "Decisão" behind a horizontal scroll. Here the grids have a fixed layout with widths per column and the cells wrap (two lines rather than a squeeze
   or a scroll). The list rows use the shared two-line row (.compact-row.is-two-line, compact-list.css; wms-ui "Linha de lista em duas linhas"). */

/* Grids of the detail and of the review: fixed layout, every cell wraps (long addresses break anywhere). */
.stock-grid.inventory-address-grid,
.stock-grid.inventory-review-grid {
    table-layout: fixed;
    white-space: normal
}

.stock-grid.inventory-address-grid th,
.stock-grid.inventory-address-grid td,
.stock-grid.inventory-review-grid th,
.stock-grid.inventory-review-grid td {
    overflow-wrap: break-word;
    vertical-align: top
}

/* Addresses have no spaces: they break anywhere (the words of the other cells only break at spaces). */
.inventory-address-grid .inventory-address,
.inventory-review-grid .inventory-address {
    overflow-wrap: anywhere
}

.stock-grid.inventory-review-grid th,
.stock-grid.inventory-review-grid td {
    padding: 6px 5px;
    font-size: 10px
}

/* stock.css keeps the last cell (the actions of the stock grid) on one line: here it is a count with a counter name. */
.stock-grid.inventory-address-grid td:last-child,
.stock-grid.inventory-review-grid td:last-child {
    white-space: normal
}

.inventory-address-grid th:first-child {
    width: 34%
}

.inventory-review-grid .inventory-product-cell strong {
    max-width: none;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical
}

.inventory-review-grid small,
.inventory-address-grid small {
    display: block
}

.inventory-review-grid .inventory-decision {
    max-width: 100%;
    padding: 2px 4px
}

/* Counts, final and stock: numbers never break inside (up to 6 digits fit their columns at 1440 px). */
.stock-grid.inventory-review-grid:not(.is-closed) td:nth-last-child(n+2):nth-last-child(-n+6),
.stock-grid.inventory-review-grid.is-closed td:nth-last-child(n+4):nth-last-child(-n+8),
.stock-grid.inventory-review-grid.is-closed td:nth-last-child(-n+2) {
    white-space: nowrap;
    padding-left: 3px;
    padding-right: 3px
}

/* Review without the selection column (no DECIDE, abandoned): apartment, product, batch, counts 1-4, final, decision. The 4th count is wider
   ("Aguardando"); a word never breaks in the middle. */
.inventory-review-grid th:nth-child(1) { width: 16% }
.inventory-review-grid th:nth-child(2) { width: 22% }
.inventory-review-grid th:nth-child(3) { width: 13% }
.inventory-review-grid th:nth-child(n+4):nth-child(-n+6) { width: 6.5% }
.inventory-review-grid th:nth-child(7) { width: 9.5% }
.inventory-review-grid th:nth-child(8) { width: 6.5% }
.inventory-review-grid th:nth-child(9) { width: 13.5% }

/* With the selection column (REVIEW/COUNT4 with DECIDE). */
.inventory-review-grid.is-deciding th:nth-child(1) { width: 4% }
.inventory-review-grid.is-deciding th:nth-child(2) { width: 15% }
.inventory-review-grid.is-deciding th:nth-child(3) { width: 19% }
.inventory-review-grid.is-deciding th:nth-child(4) { width: 12% }
.inventory-review-grid.is-deciding th:nth-child(n+5):nth-child(-n+7) { width: 6.5% }
.inventory-review-grid.is-deciding th:nth-child(8) { width: 9.5% }
.inventory-review-grid.is-deciding th:nth-child(9) { width: 6.5% }
.inventory-review-grid.is-deciding th:nth-child(10) { width: 14.5% }

/* Closed: stock before and after at the end. */
.inventory-review-grid.is-closed th:nth-child(1) { width: 12% }
.inventory-review-grid.is-closed th:nth-child(2) { width: 15% }
.inventory-review-grid.is-closed th:nth-child(3) { width: 11% }
.inventory-review-grid.is-closed th:nth-child(n+4):nth-child(-n+6) { width: 6.5% }
.inventory-review-grid.is-closed th:nth-child(7) { width: 9.5% }
.inventory-review-grid.is-closed th:nth-child(8) { width: 6.5% }
.inventory-review-grid.is-closed th:nth-child(9) { width: 11.5% }
.inventory-review-grid.is-closed th:nth-child(n+10) { width: 7.5% }

/* Reason of "Cancelar inventário" and "Abandonar inventário" inside the red confirmation: the generic ".address-confirm div" (components.css: flex,
   right-aligned, for the buttons) put the label at the right and the input below it with the gap of the buttons; the field stacks as in a form. */
.address-confirm .user-field.inventory-reason {
    display: block
}

.address-confirm .user-field.inventory-reason label {
    display: block;
    white-space: nowrap
}

/* Captions of the review grid: the narrow headers ("Estoque antes", "Cont. 2") wrap at the space, never inside a word. */
.stock-grid.inventory-review-grid th {
    padding-left: 3px;
    padding-right: 3px
}
