
/* ==========================================================
   MOB365 V18.2 — REAL CUSTOMER SEARCH OVERLAY FIX
   Root cause: backdrop-filter on .pos-cart creates a containing
   block for position:fixed descendants in Chromium.
   ========================================================== */

/* CRITICAL: do not let the cart become the containing block
   of the full-screen customer finder. */
.pos-app-shell .pos-layout-premium > .pos-cart{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  filter:none!important;
  transform:none!important;
  perspective:none!important;
  contain:none!important;
}

/* Full customer table belongs visually to the PRODUCT workspace. */
.pos-app-shell .customer-results.customer-results-table{
  position:fixed!important;
  z-index:2147483000!important;

  /* expanded Retail sidebar */
  top:96px!important;
  left:162px!important;
  right:568px!important;
  bottom:52px!important;

  width:auto!important;
  height:auto!important;
  min-width:620px!important;
  max-width:none!important;
  min-height:300px!important;
  max-height:none!important;

  display:grid!important;
  grid-template-rows:58px 36px minmax(0,1fr) 34px!important;

  margin:0!important;
  padding:0!important;
  overflow:hidden!important;

  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;

  background:#fff!important;
  border:1px solid #9fb2c2!important;
  border-radius:14px!important;
  box-shadow:0 22px 60px rgba(15,36,55,.30)!important;
}

/* collapsed Retail sidebar */
.pos-app-shell.sidebar-collapsed .customer-results.customer-results-table{
  left:54px!important;
}

/* Ensure no legacy customer-result rule can collapse the table. */
.pos-app-shell .customer-results.customer-results-table.customer-results{
  gap:0!important;
  padding-right:0!important;
  overflow:hidden!important;
}

.pos-app-shell .customer-results-table .customer-results-body{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

.pos-app-shell .customer-results-table .customer-table-row{
  display:grid!important;
  grid-template-columns:120px minmax(260px,2fr) minmax(130px,1fr) minmax(140px,1fr) 100px!important;
  width:100%!important;
  max-width:none!important;
  min-height:50px!important;
  margin:0!important;
  padding:7px 14px!important;
  box-sizing:border-box!important;
}

.pos-app-shell .customer-results-table .customer-results-columns{
  display:grid!important;
  grid-template-columns:120px minmax(260px,2fr) minmax(130px,1fr) minmax(140px,1fr) 100px!important;
  width:100%!important;
  padding:0 14px!important;
  box-sizing:border-box!important;
}

/* Common 1366–1500 laptop */
@media (min-width:1100px) and (max-width:1500px){
  .pos-app-shell .customer-results.customer-results-table{
    top:92px!important;
    left:156px!important;
    right:566px!important;
    bottom:48px!important;
    min-width:520px!important;
  }

  .pos-app-shell.sidebar-collapsed .customer-results.customer-results-table{
    left:52px!important;
  }

  .pos-app-shell .customer-results-table .customer-table-row,
  .pos-app-shell .customer-results-table .customer-results-columns{
    grid-template-columns:102px minmax(210px,2fr) minmax(105px,1fr) minmax(115px,1fr) 82px!important;
  }
}

/* Mobile/tablet safe modal */
@media (max-width:1099px){
  .pos-app-shell .customer-results.customer-results-table,
  .pos-app-shell.sidebar-collapsed .customer-results.customer-results-table{
    top:72px!important;
    left:10px!important;
    right:10px!important;
    bottom:10px!important;
    min-width:0!important;
  }

  .pos-app-shell .customer-results-table .customer-table-row,
  .pos-app-shell .customer-results-table .customer-results-columns{
    grid-template-columns:92px minmax(150px,1fr) 100px!important;
  }

  .pos-app-shell .customer-results-table .customer-results-columns span:nth-child(4),
  .pos-app-shell .customer-results-table .customer-results-columns span:nth-child(5),
  .pos-app-shell .customer-results-table .customer-table-row span:nth-child(4),
  .pos-app-shell .customer-results-table .customer-table-row span:nth-child(5){
    display:none!important;
  }
}

/* V18.3 — compact professional customer picker */
@media (min-width:1100px){
  .pos-app-shell .customer-results.customer-results-table,
  .pos-app-shell.sidebar-collapsed .customer-results.customer-results-table{
    top:126px!important;
    left:50%!important;
    right:auto!important;
    bottom:auto!important;
    width:min(920px,64vw)!important;
    height:min(590px,68vh)!important;
    min-width:680px!important;
    min-height:420px!important;
    max-width:920px!important;
    max-height:590px!important;
    transform:translateX(-50%)!important;
    grid-template-rows:56px 34px minmax(0,1fr) 32px!important;
    border-radius:12px!important;
    box-shadow:0 18px 48px rgba(15,36,55,.24)!important;
  }

  .pos-app-shell .customer-results-table .customer-table-row{
    min-height:46px!important;
    padding:6px 12px!important;
    grid-template-columns:100px minmax(230px,2fr) minmax(110px,1fr) minmax(125px,1fr) 90px!important;
  }

  .pos-app-shell .customer-results-table .customer-results-columns{
    padding:0 12px!important;
    grid-template-columns:100px minmax(230px,2fr) minmax(110px,1fr) minmax(125px,1fr) 90px!important;
  }
}

@media (min-width:1100px) and (max-width:1400px){
  .pos-app-shell .customer-results.customer-results-table,
  .pos-app-shell.sidebar-collapsed .customer-results.customer-results-table{
    top:112px!important;
    width:min(820px,66vw)!important;
    height:min(520px,66vh)!important;
    min-width:620px!important;
    min-height:390px!important;
  }
}
