/* CommonHand V90.14.1 — Admin Category Layout Hotfix
   Scope: Marketplace Setup > Category Rollout only.
   Keeps the category list and Customer Preview in separate layout space and
   prevents either side from overflowing into the other. */

/* The category manager needs the full admin content width. */
.v58-config-grid > .v58-card:has(#v58Categories){
  grid-column:1 / -1 !important;
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}

/* Make the category-manager host and everything inside it shrink correctly
   when a two-column preview layout is present. */
#v58Categories{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}
#v58Categories,
#v58Categories *{
  box-sizing:border-box;
}
#v58Categories > *,
#v58Categories [data-v907-category],
#v58Categories .v82-admin-category,
#v58Categories [class*="preview"]{
  min-width:0 !important;
  max-width:100% !important;
}

/* Current-core category rows: reserve real space for status controls instead
   of allowing them to spill toward the preview column. */
#v58Categories .v82-admin-category-head{
  grid-template-columns:minmax(0,1fr) minmax(130px,170px) 22px !important;
  column-gap:14px !important;
}
#v58Categories .v82-admin-category-head > *,
#v58Categories .v82-admin-sub-row > *{
  min-width:0 !important;
}
#v58Categories select,
#v58Categories input,
#v58Categories button{
  max-width:100%;
}

/* If the legacy customer-preview surface is present, constrain it to its
   assigned column instead of allowing a fixed/min-content width to intrude
   over the category list. */
#v58Categories [class*="preview"]{
  width:100% !important;
  overflow-wrap:anywhere;
}

/* Once the admin content gets narrower, give up the side-by-side squeeze.
   The full-width category card remains readable and current-core rows stack. */
@media(max-width:1100px){
  #v58Categories .v82-admin-category-head,
  #v58Categories .v82-admin-sub-row{
    grid-template-columns:1fr !important;
  }
}
