/* ==========================================================
   pandabu V2.0.4 RC16.280c3
   Vorratsreiter parity + scharfe Notvorrat-Aktivicons +
   Statuslisten-Interaktion
   Additive UI correction on top of RC16.280c2.
   ========================================================== */

/* 1) Vorratsgruppen Mobil exakt kompakt wie Einkaufsreiter. */
@media(max-width:899px){
  .tab-raster-inventory .inventory-group-chips{
    gap:12px!important;
    padding:2px 0 10px!important;
  }
  .tab-raster-inventory .inventory-group-chips>.standard-tab-card{
    flex:0 0 96px!important;
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    min-height:104px!important;
    height:104px!important;
    padding:9px 6px!important;
    gap:6px!important;
    border-radius:18px!important;
  }
  .tab-raster-inventory .inventory-group-chips>.standard-tab-card .room-tab-icon{
    width:58px!important;
    height:58px!important;
    min-width:58px!important;
    min-height:58px!important;
    padding:3px!important;
    border-radius:15px!important;
    object-fit:contain!important;
  }
  .tab-raster-inventory .inventory-group-chips>.standard-tab-card>span{
    font-size:12px!important;
    line-height:1.08!important;
    max-width:86px!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
}

/* 2) Guided Notvorrat: aktives Bereichsicon ohne CSS-Upscale rendern.
      Die 25% groessere Darstellung bleibt erhalten, aber ueber echte
      Pixelmasse statt transform:scale(), damit WEBP auf iOS scharf bleibt. */
.rc251-form-shell .emergency-wizard-category-icon{
  will-change:auto!important;
  backface-visibility:visible!important;
}
.rc251-form-shell .emergency-wizard-category-icon img{
  transform:none!important;
  backface-visibility:hidden!important;
  image-rendering:auto!important;
}
.rc251-form-shell .emergency-wizard-category.active .emergency-wizard-category-icon{
  width:50px!important;
  height:50px!important;
  transform:none!important;
  border-width:3px!important;
}
.rc251-form-shell .emergency-wizard-category.active .emergency-wizard-category-icon img{
  width:35px!important;
  height:35px!important;
  transform:none!important;
  object-fit:contain!important;
}
@media(max-width:720px){
  .rc251-form-shell .emergency-wizard-categories{min-height:62px!important}
  .rc251-form-shell .emergency-wizard-category{min-height:56px!important}
}

/* 3) Kritisch und Werden knapp immer untereinander, wie Bald aufbrauchen. */
.inventory-collapsible-statuses{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:14px!important;
}

/* 4) Status-/Ablaufzeile: erster Klick klappt die echte Vorratsposition
      in Listenansicht auf. Einkaufswagen bleibt direkt erreichbar. */
.inventory-overview-expandable{
  min-width:0;
}
.inventory-overview-compact{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:stretch;
}
.inventory-overview-compact>.expiry-overview-card{
  width:100%;
  min-width:0;
}
.inventory-overview-cart{
  width:46px!important;
  min-width:46px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border-radius:13px!important;
  font-size:20px!important;
}
.inventory-overview-expanded[hidden]{display:none!important}
.inventory-overview-expanded{
  padding:8px 0 2px;
  animation:inventoryOverviewOpen .16s ease-out;
}
.inventory-overview-expanded>.inventory-card{
  margin:0!important;
  width:100%!important;
  max-width:none!important;
}
.inventory-overview-expandable.is-expanded>.inventory-overview-compact>.expiry-overview-card{
  background:var(--surface-2);
}
.inventory-overview-expandable.is-expanded>.inventory-overview-compact>.expiry-overview-card>b{
  transform:rotate(90deg);
}
@keyframes inventoryOverviewOpen{
  from{opacity:.2;transform:translateY(-4px)}
  to{opacity:1;transform:none}
}
@media(max-width:620px){
  .inventory-overview-compact{gap:6px}
  .inventory-overview-cart{width:42px!important;min-width:42px!important;font-size:18px!important}
}

html[data-theme="dark"] .inventory-overview-expandable.is-expanded>.inventory-overview-compact>.expiry-overview-card{
  background:var(--surface-2);
}
