/* v0.10.291: Zone master fits the fixed-height FCMS workspace. Keep the
   independent product scrollbar reachable at all viewport heights. */
@media (min-width:901px) {
  #page-locations.active {
    /* Fallback scrolling when the workspace is unusually short or zoomed. */
    overflow-y:auto;
    overflow-x:hidden;
  }
  #page-locations.active #zone-picking-panel {
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    min-height:380px;
    min-width:0;
  }
  #page-locations.active .zone-master-shell {
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    min-height:365px;
    min-width:0;
    overflow:hidden;
  }
  #page-locations.active .zone-master-shell .zone-master-columns {
    flex:1 1 auto;
    min-height:0;
    grid-template-rows:auto minmax(0,1fr);
  }
  #page-locations.active .zone-master-shell .zone-list-pane,
  #page-locations.active .zone-master-shell .zone-product-section {
    min-height:0;
    min-width:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  #page-locations.active .zone-master-shell .zone-list-scroll {
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    overflow:auto;
  }
  #page-locations.active .zone-master-shell .zone-product-list {
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
    min-height:0;
    max-height:none;
    overflow:hidden;
  }
  #page-locations.active .zone-master-shell .zone-products-table-wrap {
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    overflow:auto;
    scrollbar-gutter:stable;
  }
  #page-locations.active .zone-master-shell .zone-product-head,
  #page-locations.active .zone-master-shell .zone-master-help {
    flex:0 0 auto;
  }
}
/* Shrink only the product ranking grid, not master tables or product picker. */
.zone-master-shell .zone-products-table {font-size:10.5px;line-height:1.05}
.zone-master-shell .zone-products-table thead th {height:26px;padding:2px 4px;line-height:1.1}
.zone-master-shell .zone-products-table tbody tr {height:27px}
.zone-master-shell .zone-products-table tbody td {
  height:27px;
  padding:1px 3px;
  line-height:1.05;
  white-space:nowrap;
}
.zone-master-shell .zone-products-table tbody button {
  height:20px;
  min-height:20px;
  padding:0 5px;
  margin:0 1px;
  font-size:10px;
  line-height:18px;
}
.zone-master-shell .zone-products-table .zone-rank-input {
  width:48px;
  height:20px;
  min-height:20px;
  padding:0 2px;
  line-height:18px;
  font-size:10.5px;
}
.zone-master-shell .zone-products-table .zone-drag-handle {
  height:20px;
  width:20px;
  font-size:15px;
  line-height:1;
}
/* ui-lock.css uses !important controls; explicitly override the common 30px
   geometry ONLY for the ranking table, not CRUD actions or picker controls. */
#app-view#app-view#app-view#app-view #zone-product-list .zone-products-table tbody button {
  box-sizing:border-box!important;
  height:20px!important;
  min-height:20px!important;
  max-height:20px!important;
  padding:0 5px!important;
  margin:0 1px!important;
  font-size:10px!important;
  line-height:18px!important;
}
#app-view#app-view#app-view#app-view #zone-product-list .zone-products-table .zone-rank-input {
  box-sizing:border-box!important;
  width:48px!important;
  height:20px!important;
  min-height:20px!important;
  max-height:20px!important;
  padding:0 2px!important;
  margin:0!important;
  font-size:10.5px!important;
  line-height:18px!important;
}
/* Short laptop windows and browser zoom: reserve a usable table height and
   let the location page scroll to the panel rather than collapse it to 0px. */
@media (min-width:901px) and (max-height:690px) {
  #page-locations.active #zone-picking-panel{flex:0 0 auto;min-height:610px}
  #page-locations.active .zone-master-shell{flex:1 0 auto;min-height:605px}
  #page-locations.active .zone-master-shell .zone-master-columns{min-height:230px}
  #page-locations.active .zone-master-shell .zone-products-table-wrap{min-height:125px}
}
@media (min-width:901px) and (max-height:690px) {
  #page-locations.active .zone-master-shell .zone-master-columns{
    flex:0 0 360px;
    height:360px;
    min-height:0;
    grid-template-rows:auto minmax(0,1fr);
  }
}
