/* Scoped post-receive screen, using the receiving shell and system theme. */
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post{--tr-bg:var(--bg,#0b1422);--tr-panel:var(--bg-card,#152033);--tr-text:var(--text,#edf3fb);--tr-muted:var(--muted,#aebdce);--tr-border:var(--line-strong,#354257);min-height:calc(100dvh - 110px)}
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-intro{color:var(--tr-muted);margin:-8px 0 18px}
:where(.tr-post) :is(.pr-tabs,.pr-toolbar,.pr-filterbar,.pr-bulk,.pr-filters,.pr-row-actions,.pr-footer,.pr-search-entry){display:flex;gap:10px;align-items:center;flex-wrap:wrap}
:where(.tr-post) .pr-tabs{margin:0 0 16px}:where(.tr-post) .pr-tabs b{margin-left:6px}
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post button[aria-pressed="true"]{background:var(--tr-blue-bg);color:var(--tr-blue);border-color:var(--tr-blue)}
:where(.tr-post) .pr-toolbar{padding:16px;border-bottom:1px solid var(--tr-border)}
:where(.tr-post) .pr-bulk{margin-left:auto}:where(.tr-post) .pr-selection{font-size:13px;color:var(--tr-muted)}
:where(.tr-post) .pr-select-all{display:flex;gap:10px;align-items:center;white-space:nowrap}
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post input[type="checkbox"]{appearance:auto!important;width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0;accent-color:#0875bd;flex:none}
:where(.tr-post) .pr-filterbar{justify-content:space-between;padding:12px 16px 0}
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-filters button{font-size:13px;min-height:36px;padding:6px 10px}
:where(.tr-post) .pr-feedback{padding:8px 16px;min-height:32px;font-size:13px;color:var(--tr-blue)}
:where(.tr-post) .pr-feedback.is-error{color:var(--tr-text);background:var(--tr-soft);border-left:3px solid #df9b2c}
:where(.tr-post) .pr-columns,:where(.tr-post) .pr-row{display:grid;grid-template-columns:24px minmax(190px,2fr) minmax(95px,.8fr) 74px minmax(80px,.65fr) minmax(200px,1.5fr);gap:16px;align-items:center;padding:16px}
:where(.tr-post) .pr-columns{background:var(--tr-soft);color:var(--tr-muted);font-size:12px;font-weight:600;padding-top:10px;padding-bottom:10px}
:where(.tr-post) .pr-row{border-top:1px solid var(--tr-border);background:var(--tr-panel);font-size:13px}
:where(.tr-post) .pr-row.pr-latest{box-shadow:inset 3px 0 var(--tr-blue);background:var(--tr-soft)}
:where(.tr-post) .pr-product{display:flex;align-items:center;gap:12px;min-width:0}:where(.tr-post) .pr-product strong{display:block;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
:where(.tr-post) .pr-product img,:where(.tr-post) .pr-no-photo{width:52px;height:64px;flex:0 0 52px;object-fit:contain;background:var(--tr-panel);border:1px solid var(--tr-border);border-radius:8px}
:where(.tr-post) .pr-no-photo{display:grid;place-items:center;font-size:10px;color:var(--tr-muted)}
:where(.tr-post) .pr-size{overflow-wrap:anywhere;text-align:left}:where(.tr-post) .pr-quantity{text-align:center}
:where(.tr-post) .pr-actions{display:grid;gap:8px}:where(.tr-post) .pr-status{font-size:12px;justify-self:start;border-radius:6px;padding:3px 7px;background:var(--tr-blue-bg);color:var(--tr-blue)}
:where(.tr-post) .pr-status.done{background:var(--tr-soft);color:var(--tr-text)}
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-row-actions button{font-size:12px;min-height:28px;padding:7px 0;white-space:normal;width:auto;flex:none;text-align:left}
:where(.tr-post) .pr-row-actions{gap:6px}:where(.tr-post) .pr-check{padding:12px 0;display:flex}
:where(.tr-post) .pr-footer{justify-content:space-between;margin-top:16px;color:var(--tr-muted);font-size:12px}
:where(.tr-post) .pr-search-entry{flex:1;justify-content:flex-end;min-width:0}:where(.tr-post) .pr-search-entry input{flex:1;min-width:0;max-width:480px}
:where(.tr-post) .pr-scan-hint{margin:10px 16px;color:var(--tr-muted);font-size:12px;line-height:1.5}
:where(.tr-post) .pr-edit{grid-column:2/-1;display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding:12px;background:var(--tr-soft);border-radius:8px}:where(.tr-post) .pr-edit label{display:grid;gap:6px}
:where(.tr-post) .pr-empty{padding:32px;text-align:center;color:var(--tr-muted)}
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-mobile-label{display:none}
:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-last-label{color:var(--tr-blue)}
@media(max-width:1199px){
 :where(.tr-post) .pr-columns{display:none}:where(.tr-post) .pr-row{grid-template-columns:24px minmax(0,1fr) minmax(90px,.45fr);gap:10px 14px}
 :where(.tr-post) .pr-product{grid-column:2;grid-row:1/3}:where(.tr-post) .pr-size{grid-column:3;grid-row:1}:where(.tr-post) .pr-quantity{grid-column:3;grid-row:2;text-align:left}
 :where(.tr-post) .pr-location{grid-column:2;grid-row:3}:where(.tr-post) .pr-actions{grid-column:2/-1}
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-mobile-label{display:block}
 :where(.tr-post) .pr-bulk{margin-left:0}:where(.tr-post) .pr-toolbar{gap:12px}
}
@media(max-width:767px){
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post{padding:calc(14px + env(safe-area-inset-top,0px)) 12px calc(24px + env(safe-area-inset-bottom,0px))}
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post h2{font-size:21px}
 :where(.tr-post) .pr-bulk{width:100%;display:grid;grid-template-columns:1fr 1fr}
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-bulk button{white-space:normal;font-size:12px;min-height:44px}
 :where(.tr-post) .pr-toolbar,:where(.tr-post) .pr-filterbar{padding:12px}
 :where(.tr-post) .pr-search-entry{flex-basis:100%;flex-wrap:nowrap}
 :where(.tr-post) .pr-filterbar input{width:100%!important}
 :where(.tr-post) .pr-row{padding:14px 12px;grid-template-columns:18px minmax(0,1fr) 80px;gap:10px}
 :where(.tr-post) .pr-product{grid-column:2/-1;grid-row:1}:where(.tr-post) .pr-size{grid-column:2;grid-row:2}:where(.tr-post) .pr-quantity{grid-column:3;grid-row:2}
 :where(.tr-post) .pr-row-actions{display:none}:where(.tr-post) .pr-location{grid-column:2/-1}:where(.tr-post) .pr-actions{grid-column:2/-1}
 :where(.tr-post) .pr-product img{width:44px;height:54px;flex-basis:44px}
 :where(.tr-post) .pr-edit{grid-column:1/-1}
 :where(.tr-post) .pr-actions:has([data-post-location]) .pr-row-actions{display:flex}
}
/* Post-receive inherits the same full-page host as receiving, never a modal. */
html[data-transfer-post-receive="true"] #contentSection{transform:none!important;left:0!important;right:0!important}

:where(.tr-post) .pr-feedback:empty{display:none}

#storeTransfersCompletedList .tr-location-pending{display:inline-block;padding:3px 8px;border:1px solid currentColor;border-radius:6px;font-weight:600}

#storeTransfersIncomingList .tr-receipt-list-status{display:inline-block;padding:3px 8px;border:1px solid currentColor;border-radius:6px;font-weight:600}

:where(.tr-post) .pr-location-status{display:inline-block;margin-top:8px}
:where(.tr-post) .pr-row-actions{flex-direction:column;align-items:flex-start;gap:0}
@media(max-width:1199px){:is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-row-actions button{min-height:44px}}

/* Completed transfer stockroom: touch layout only; desktop keeps its table. */
@media(max-width:1199px){
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post:has([data-post-phase="stockroom_location"][aria-pressed="true"]) .pr-filterbar{padding:14px 16px;gap:12px}
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-row:has([data-post-location]){grid-template-columns:minmax(0,1fr) 100px 180px;grid-template-areas:"product product actions" "size quantity actions" "location location actions";gap:12px 24px;align-items:start;padding:20px}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-check{display:none}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-product{grid-area:product;align-items:center}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-size{grid-area:size;padding-left:64px}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-quantity{grid-area:quantity;text-align:left}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-location{grid-area:location;display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding-left:64px;min-width:0;overflow-wrap:anywhere}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-actions{grid-area:actions;align-self:stretch;border-left:1px solid var(--tr-border);padding-left:20px;align-content:start}
 :where(.tr-post) .pr-row:has([data-post-location]) .pr-row-actions{display:flex;width:100%;gap:2px}
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-row:has([data-post-location]) .pr-row-actions button{min-height:44px;font-size:14px;line-height:1.35;padding:10px 0;max-width:100%;text-align:left}
 :where(.tr-post) .pr-row:has([data-post-location]) .pr-location-status{margin-top:4px;max-width:100%}
 :where(.tr-post) .pr-row:has([data-post-location]) .pr-edit{grid-area:auto;grid-column:1/-1;margin:0}
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-edit input{min-height:44px;width:100%;min-width:0}
}
@media(max-width:767px){
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-row:has([data-post-location]){grid-template-columns:minmax(0,1fr) minmax(136px,.85fr);grid-template-areas:"product product" "size quantity" "location actions";gap:14px 18px;padding:18px 14px}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-product{gap:12px}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-product img{width:52px;height:64px;flex-basis:52px}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-size,:where(.tr-post) .pr-row:has([data-post-location])>.pr-location{padding-left:0}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-actions{padding-left:16px}
 :where(.tr-post) .pr-row:has([data-post-location])>.pr-quantity{padding-left:17px}
 :where(.tr-post) .pr-row:has([data-post-location]) .pr-edit{display:grid;grid-template-columns:1fr 1fr;gap:10px}
 :where(.tr-post) .pr-row:has([data-post-location]) .pr-edit label,:where(.tr-post) .pr-row:has([data-post-location]) .pr-edit>small{grid-column:1/-1}
 :is(#contentSection,#transferReceivingStory) #storeTransfersPhone .tr-post .pr-row:has([data-post-location]) .pr-edit button{min-height:44px}
}

/* Apply the same corner placement to workflow tags in the transfer lists. */
@media(max-width:1199px){
 #moduleStoreTransfers :is(#storeTransfersIncomingList,#storeTransfersCompletedList) .transfer-request-card:has(.tr-receipt-list-status,.tr-location-pending){position:relative}
 #moduleStoreTransfers #storeTransfersIncomingList .transfer-request-main-button:has(.tr-receipt-list-status),
 #moduleStoreTransfers #storeTransfersCompletedList .transfer-request-card:has(.tr-location-pending){padding-top:48px}
 #moduleStoreTransfers :is(#storeTransfersIncomingList,#storeTransfersCompletedList) .small-note:has(>.tr-receipt-list-status,>.tr-location-pending){position:absolute;top:12px;right:16px;max-width:calc(100% - 32px);margin:0!important;text-align:right}
}
