/* ==========================================================================
   v1.2.0-fix326
   Headquarters Store Management - scalable source-rendered list.
   ========================================================================== */

/* Keep the page focused. The global header already has the add-store action. */
.hq-store-management-page>.headquarters-page-toolbar,
.hq-store-management-page>.hq-store-hero,
.hq-store-management-page>.hq-store-summary{
  display:none!important;
}

.hq-store-management-page{
  padding-top:14px;
}

.hq-store-management-page .hq-store-filter{
  margin:0 0 10px;
}

.hq-store-management-page .hq-store-status-filters{
  margin:0 0 8px;
}

.hq-store-management-page .hq-store-result-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin:4px 0 8px;
}

.hq-store-management-page .hq-store-result-head>b{
  color:#6f6962;
  font-size:12px;
  font-weight:800;
}

.hq-store-management-page .hq-store-result-head>span{
  display:none!important;
}

#hqStoreList.hq-store-table-list{
  display:block!important;
  width:100%;
  margin:0!important;
  padding:0!important;
}

.hq-store-table-head,
.hq-store-table-row{
  display:grid;
  grid-template-columns:
    minmax(180px,1.55fr)
    minmax(86px,.72fr)
    minmax(82px,.70fr)
    minmax(124px,1fr)
    minmax(104px,.84fr)
    minmax(104px,.88fr)
    minmax(124px,1fr)
    minmax(144px,1.05fr);
  align-items:stretch;
  gap:0;
}

.hq-store-table-head{
  overflow:hidden;
  border:1px solid #dcd7d0;
  border-bottom:0;
  border-radius:12px 12px 0 0;
  background:#f3f1ed;
}

.hq-store-table-head>span{
  min-width:0;
  padding:9px 10px;
  border-right:1px solid #dfdbd5;
  color:#6f6962;
  font-size:11px;
  font-weight:900;
  line-height:1.25;
}

.hq-store-table-head>span:last-child{
  border-right:0;
}

.hq-store-table-body{
  overflow:hidden;
  border:1px solid #dcd7d0;
  border-radius:0 0 12px 12px;
  background:#fff;
}

.hq-store-table-row{
  min-height:62px;
  border-bottom:1px solid #e9e5df;
  background:#fff;
}

.hq-store-table-row:last-child{
  border-bottom:0;
}

.hq-store-table-row:hover{
  background:#fffdf9;
}

.hq-store-table-row.is-deleted{
  background:#faf9f7;
}

.hq-store-table-cell{
  min-width:0;
  display:flex;
  align-items:center;
  padding:8px 10px;
  border-right:1px solid #eeeae5;
  color:#191919;
  font-size:12px;
  line-height:1.35;
}

.hq-store-table-cell:last-child{
  border-right:0;
}

.hq-store-table-cell>span:not(.hq-store-table-state){
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

.hq-store-table-identity{
  display:grid;
  align-content:center;
  gap:3px;
}

.hq-store-table-identity>div{
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
}

.hq-store-table-identity b{
  min-width:0;
  overflow:hidden;
  color:#171717;
  font-size:13px;
  font-weight:900;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hq-store-table-identity small{
  overflow:hidden;
  color:#817b74;
  font-size:10px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hq-store-table-current{
  flex:0 0 auto;
  padding:2px 6px;
  border-radius:999px;
  background:#e8f1ff;
  color:#1260c9;
  font-size:9px;
  font-weight:900;
}

.hq-store-table-state{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  min-height:24px;
  padding:4px 8px;
  border-radius:999px;
  background:#efefed;
  color:#625d57;
  font-size:10px;
  font-weight:900;
  line-height:1.1;
  white-space:nowrap;
}

.hq-store-table-state.is-positive{
  background:#eaf7ef;
  color:#178347;
}

.hq-store-table-state.is-warning{
  background:#fff3e4;
  color:#a95200;
}

.hq-store-table-state.is-muted{
  background:#efefed;
  color:#69645e;
}

.hq-store-table-state.is-neutral{
  background:#f1f0ee;
  color:#69645e;
}

.hq-store-table-action-cell{
  padding:7px!important;
}

.hq-store-table-action{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border:1px solid #ff7a00;
  border-radius:9px;
  background:#fffaf5;
  color:#171717;
  font:inherit;
  font-size:11px;
  font-weight:900;
  line-height:1.2;
  cursor:pointer;
}

.hq-store-table-action:hover{
  background:#fff2e4;
  box-shadow:0 3px 10px rgba(255,122,0,.12);
}

.hq-store-table-action:focus-visible{
  outline:3px solid rgba(255,122,0,.25);
  outline-offset:2px;
}

.hq-store-table-action span:last-child{
  color:#d96300;
  font-size:20px;
  font-weight:500;
  line-height:1;
}

.hq-store-table-action-disabled{
  display:block;
  width:100%;
  padding:8px 6px;
  color:#8a847e;
  font-size:11px;
  font-weight:800;
  text-align:center;
}

.hq-store-management-page .hq-store-pager{
  margin-top:10px;
}

/* Tablet keeps the dense table and permits controlled horizontal scrolling. */
@media (max-width:1100px) and (min-width:761px){
  #hqStoreList.hq-store-table-list{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
  }

  .hq-store-table-head,
  .hq-store-table-body{
    min-width:980px;
  }
}

/* Smartphone: same information model, compact 2-column reflow. */
@media (max-width:760px){
  .hq-store-management-page{
    padding-top:10px;
  }

  .hq-store-management-page .hq-store-filter{
    margin-bottom:8px;
  }

  .hq-store-management-page .hq-store-status-filters{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:3px;
    scrollbar-width:thin;
  }

  .hq-store-table-head{
    display:none!important;
  }

  .hq-store-table-body{
    display:grid;
    gap:8px;
    overflow:visible;
    border:0;
    border-radius:0;
    background:transparent;
  }

  .hq-store-table-row{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    min-height:0;
    overflow:hidden;
    border:1px solid #ded9d2;
    border-radius:13px;
    background:#fff;
  }

  .hq-store-table-row:hover{
    background:#fff;
  }

  .hq-store-table-cell{
    min-height:50px;
    display:grid;
    align-content:center;
    gap:3px;
    padding:8px 10px;
    border-right:0;
    border-bottom:1px solid #eeeae5;
  }

  .hq-store-table-cell::before{
    content:attr(data-label);
    display:block;
    color:#817b74;
    font-size:9px;
    font-weight:800;
    line-height:1.2;
  }

  .hq-store-table-identity,
  .hq-store-table-action-cell{
    grid-column:1 / -1;
  }

  .hq-store-table-identity{
    min-height:58px;
    padding:10px 11px;
  }

  .hq-store-table-identity::before,
  .hq-store-table-action-cell::before{
    display:none;
  }

  .hq-store-table-identity b{
    font-size:14px;
  }

  .hq-store-table-cell:nth-child(2n):not(.hq-store-table-action-cell){
    border-left:1px solid #eeeae5;
  }

  .hq-store-table-cell>span:not(.hq-store-table-state){
    overflow:visible;
    font-size:11px;
    font-weight:800;
    text-overflow:clip;
    white-space:normal;
  }

  .hq-store-table-state{
    min-height:23px;
    padding:4px 7px;
    font-size:10px;
  }

  .hq-store-table-action-cell{
    min-height:0;
    padding:8px!important;
    border-bottom:0;
  }

  .hq-store-table-action{
    min-height:45px;
    padding:10px 12px;
    font-size:13px;
  }
}
