/* SW Snacks 0.5.8 RC3 — responsive stocktake counting, no changes to stocktake logic. */
.sw-stocktake-table{width:100%;table-layout:fixed}
.sw-stocktake-table th,.sw-stocktake-table td{padding:10px 9px}
.sw-stocktake-table th:nth-child(1){width:72px}
.sw-stocktake-table th:nth-child(3){width:112px}
.sw-stocktake-table th:nth-child(4){width:126px}
.sw-stocktake-table th:nth-child(5){width:90px}
.sw-stocktake-table td.sw-take-name{overflow-wrap:anywhere}
.sw-stocktake-table input[type=number]{width:100%;min-width:0;max-width:90px;padding:9px 8px;box-sizing:border-box;font-variant-numeric:tabular-nums}
.sw-stocktake-table .sw-take-mobile-label{display:none}
.sw-stocktake-history{width:100%}
@media(max-width:690px){
 .sw-stocktake-count-wrap,.sw-stocktake-history-wrap{overflow:visible;background:transparent;border:0;border-radius:0}
 .sw-stocktake-table,.sw-stocktake-table tbody,.sw-stocktake-history,.sw-stocktake-history tbody{display:block;width:100%;min-width:0!important}
 .sw-stocktake-table thead,.sw-stocktake-history thead{display:none}
 .sw-stocktake-table tbody{display:grid;gap:10px}
 .sw-stocktake-table tr.take-item{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 10px;align-items:start;min-width:0;padding:12px;background:#fff;border:1px solid #d7e5e0;border-radius:13px;opacity:1}
 .sw-stocktake-table tr.take-item:not(.take-selected){background:#fbfcfb;border-color:#dfe6e3}
 .sw-stocktake-table tr.take-item.take-selected{background:#eefaf5;border-color:#83cabb}
 .sw-stocktake-table td{display:block;padding:0!important;min-width:0;border:0!important}
 .sw-stocktake-table td:first-child{grid-column:1;grid-row:1;align-self:start;padding-top:3px!important}
 .sw-stocktake-table td:first-child input[type=checkbox]{width:24px;height:24px;min-height:24px;margin:0;cursor:pointer}
 .sw-stocktake-table td.sw-take-name{grid-column:1/-1;grid-row:1;padding-left:36px!important;min-height:29px;font-size:.93rem}
 .sw-stocktake-table td.sw-take-name strong{line-height:1.35}
 .sw-stocktake-table td.sw-take-name small{display:block;line-height:1.3;margin-top:2px}
 .sw-stocktake-table td.sw-take-name .sw-take-verified{display:none}
 .sw-stocktake-table td.sw-take-expected{grid-column:1;grid-row:2}
 .sw-stocktake-table td.sw-take-counted{grid-column:2;grid-row:2}
 .sw-stocktake-table .sw-take-mobile-label{display:block;font-size:.75rem;color:#526c6e;font-weight:750;margin-bottom:5px}
 .sw-stocktake-table input[type=number]{width:100%;max-width:none;min-width:0;height:44px;padding:9px 10px;font-size:1rem}
 .sw-stocktake-table td.sw-take-cost{grid-column:1/-1;grid-row:3;font-size:.77rem;color:#4b696c;padding-top:2px!important}
 .sw-stocktake-table td.sw-take-cost .sw-take-mobile-label{display:inline;margin:0 4px 0 0;font-size:inherit}
 .sw-stocktake-history tbody{display:grid;gap:10px}
 .sw-stocktake-history tr{display:block;background:#fff;border:1px solid #d9e5e1;border-radius:12px;padding:9px 12px}
 .sw-stocktake-history td{display:grid;grid-template-columns:minmax(82px,110px) minmax(0,1fr);gap:10px;padding:7px 0;border-bottom:1px solid #eff2f1;overflow-wrap:anywhere;font-size:.8rem}
 .sw-stocktake-history td:last-child{border:0}
 .sw-stocktake-history td::before{content:attr(data-label);color:#526c6e;font-weight:750}
 .sw-stocktake-history td[data-label=Actions] details{min-width:0}
 .sw-stocktake-history td[data-label=Actions] form{min-width:0}
 .stocktake-tools{gap:8px}
 .stocktake-tools .secondary{min-height:42px}
}
@media(max-width:345px){
 .sw-stocktake-table tr.take-item{padding:10px;gap:7px}
 .sw-stocktake-table td.sw-take-name{font-size:.88rem}
 .sw-stocktake-history td{grid-template-columns:84px minmax(0,1fr)}
}

/* RC3.1: The mobile product-name cell spans the selection cell in the CSS grid.
   Lift the checkbox above it to restore pointer/touch input. */
@media(max-width:690px){
 .sw-stocktake-table td:first-child{position:relative;z-index:2}
}
