/* Its own fixed overlay, independent of .modal (modal.css) — see
   components/shared/productPicker.js for why it can't just be pushed onto
   the app's modal stack. Sits above .modal's z-index so it reads as a
   dialog floating on top of whichever order/purchase/sale/transfer modal
   opened it. */
.product-picker-overlay{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.4);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:1100;

}

.product-picker-dialog{

    background:white;

    width:min(480px, 92vw);
    max-height:85vh;

    border-radius:12px;

    overflow:hidden;

    display:flex;
    flex-direction:column;

}

.product-picker-header{

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:16px 20px;

    border-bottom:1px solid #eee;

}

.product-picker-header h3{

    margin:0;
    font-size:16px;

}

.product-picker-close{

    background:none;
    border:none;

    font-size:16px;
    color:#6b7280;
    cursor:pointer;

    padding:2px 6px;

}

.product-picker-filter{

    margin:12px 20px;

    padding:10px 12px;

    border:1px solid #ddd;
    border-radius:8px;

    font-size:14px;

    box-sizing:border-box;

}

.product-picker-list{

    flex:1;
    min-height:0;

    overflow-y:auto;

    padding:0 20px 12px;

    display:flex;
    flex-direction:column;
    gap:6px;

}

.product-picker-row{

    display:flex;
    align-items:center;
    gap:12px;

    padding:8px;

    border-radius:8px;
    cursor:pointer;

}

.product-picker-row:hover{

    background:#f5f7fb;

}

.product-picker-photo{

    width:40px;
    height:40px;

    border-radius:8px;

    object-fit:cover;

    flex-shrink:0;

}

.product-picker-photo-empty{

    display:flex;
    align-items:center;
    justify-content:center;

    background:#f3f4f6;

    font-size:18px;

}

.product-picker-info{

    flex:1;
    min-width:0;

}

.product-picker-name{

    font-size:14px;
    font-weight:600;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;

}

.product-picker-sub{

    font-size:12px;
    color:#9ca3af;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;

}

.product-picker-stepper{

    display:flex;
    align-items:center;
    gap:8px;

    flex-shrink:0;

}

.product-picker-step-btn{

    width:26px;
    height:26px;

    border-radius:50%;
    border:1px solid #ddd;

    background:white;
    color:var(--primary-color);

    font-size:14px;
    line-height:1;

    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;

}

.product-picker-step-btn:hover{

    background:#f5f7fb;

}

.product-picker-qty{

    min-width:18px;

    text-align:center;

    font-size:14px;
    font-weight:600;

}

.product-picker-footer{

    display:flex;
    justify-content:flex-end;
    gap:10px;

    padding:14px 20px;

    border-top:1px solid #eee;

}

.product-picker-footer .product-picker-confirm{

    background:var(--primary-color);
    color:white;

}

/* Detail view swaps in for the filter+list+row markup above, inside the
   exact same dialog shell — same header/footer structure either way, only
   the middle section changes, so there's nowhere for either view to lose
   its place. */
.product-picker-detail-header{

    padding:12px 20px 0;

}

.product-picker-back{

    background:none;
    border:none;

    color:var(--primary-color);
    font-size:13px;
    cursor:pointer;

    padding:0;

}

.product-picker-detail-body{

    flex:1;
    min-height:0;

    overflow-y:auto;

    padding:12px 20px 20px;

    display:flex;
    flex-direction:column;
    align-items:center;

    text-align:center;

    gap:8px;

}

.product-picker-detail-body .product-picker-photo{

    width:96px;
    height:96px;

    font-size:32px;

}

.product-picker-detail-name{

    font-size:16px;
    font-weight:600;

}

.product-picker-detail-line{

    font-size:13px;
    color:#374151;

}

.product-picker-detail-desc{

    font-size:13px;
    color:#6b7280;

    margin-top:4px;

}

.product-picker-detail-body .product-picker-stepper{

    margin-top:8px;

}
