/* ==========================================================
   pandabu V2.0.4 RC16.280c5
   Nachkaufen-Aktionen + Vorratsreiter + Notvorrat-Navigation
   Additiver UI-/Interaktions-Patch auf RC16.280c4.
   ========================================================== */

/* 1) Nachkaufen empfohlen: kompakte Mengensteuerung + klare Aktionen. */
.restock-order{
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;
}
.restock-stepper{
  grid-template-columns:38px 54px minmax(34px,auto) 38px!important;
  gap:6px!important;
  justify-content:end!important;
}
.restock-stepper button{
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0!important;
  border-radius:12px!important;
  font-size:22px!important;
  line-height:1!important;
}
.restock-stepper input{
  width:54px!important;
  min-width:54px!important;
  max-width:54px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 5px!important;
  border-radius:12px!important;
  text-align:center!important;
  font-weight:850!important;
}
.restock-unit{
  min-width:34px!important;
  max-width:54px!important;
  font-size:12px!important;
  line-height:1.1!important;
  text-align:center!important;
}
.restock-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  flex:0 0 auto!important;
}
.restock-actions.only-remove{margin-left:auto!important}
.restock-add,
.restock-remove{
  width:40px!important;
  min-width:40px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0!important;
  border-radius:12px!important;
  display:inline-grid!important;
  place-items:center!important;
  line-height:1!important;
  box-shadow:none!important;
}
.restock-add{
  background:var(--accent)!important;
  border:1px solid var(--accent)!important;
  color:#fff!important;
  font-size:19px!important;
}
.restock-add [aria-hidden="true"]{font-size:19px!important;line-height:1!important}
.restock-remove{
  background:var(--surface)!important;
  border:1px solid rgba(220,75,75,.28)!important;
  color:#cf4f4f!important;
  font-size:17px!important;
}
.restock-remove:hover,
.restock-remove:focus-visible{
  border-color:#cf4f4f!important;
  background:rgba(220,75,75,.07)!important;
}
html[data-theme="dark"] .restock-remove{
  background:var(--surface)!important;
  border-color:rgba(255,120,120,.34)!important;
  color:#ff8c8c!important;
}

@media(max-width:899px){
  .restock-card{padding:13px!important}
  .restock-card>.restock-order{grid-column:1/-1!important;width:100%!important}
  .restock-order{grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important}
  .restock-stepper{grid-template-columns:36px 50px minmax(30px,auto) 36px!important;gap:5px!important}
  .restock-stepper button{width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;font-size:21px!important}
  .restock-stepper input{width:50px!important;min-width:50px!important;max-width:50px!important;height:36px!important;min-height:36px!important}
  .restock-unit{font-size:11px!important;max-width:48px!important}
  .restock-add,.restock-remove{width:38px!important;min-width:38px!important;height:36px!important;min-height:36px!important}
}

/* 2) Kritisch / Werden knapp / Bald aufbrauchen: identischer, enger Abstand. */
.inventory-collapsible-statuses{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  margin:8px 0 0!important;
}
.inventory-collapsible-statuses>.inventory-status-panel{
  margin:0!important;
}
.inventory-collapsible-statuses + .expiry-overview.collapsible-summary-panel,
.expiry-overview.collapsible-summary-panel{
  margin-top:8px!important;
}
.inventory-page>.inventory-collapsible-statuses + .expiry-overview{
  margin-bottom:0!important;
}
@media(max-width:899px){
  .inventory-collapsible-statuses{gap:8px!important;margin-top:8px!important}
  .inventory-collapsible-statuses + .expiry-overview.collapsible-summary-panel{margin-top:8px!important}
}

/* 3) Vorratsgruppen exakt auf das Raster der Einkaufsreiter zurückführen. */
.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:auto!important;
  padding:9px 6px!important;
  gap:6px!important;
  border-radius:18px!important;
  font-size:11px!important;
  line-height:1.08!important;
  box-shadow:none!important;
}
.tab-raster-inventory .inventory-group-chips>.standard-tab-card .room-tab-icon,
.tab-raster-inventory .inventory-group-chips>.standard-tab-card .inventory-group-icon{
  width:58px!important;
  height:58px!important;
  min-width:58px!important;
  min-height:58px!important;
  padding:3px!important;
  object-fit:contain!important;
}
.tab-raster-inventory .inventory-group-chips>.standard-tab-card>span:last-child{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
  max-height:2.2em!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
}
@media(max-width:899px){
  .tab-raster-inventory .inventory-group-chips>.standard-tab-card{
    flex-basis:96px!important;
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    min-height:104px!important;
    font-size:10px!important;
    line-height:1.05!important;
  }
}

/* 4) Geführter Notvorrat: Desktop-Pfeile wie Mobil + grössere, breit verteilte Bereichsicons. */
.rc254-step-nav,
.rc257-step-nav{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.rc254-step-nav button,
.rc257-step-nav button{
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  border-radius:12px!important;
  font-size:26px!important;
  line-height:1!important;
  color:var(--accent)!important;
  background:var(--surface-2)!important;
  border:1px solid var(--line)!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
}

.emergency-wizard-categories{
  position:relative!important;
  width:min(100%,980px)!important;
  margin:10px auto 0!important;
  padding:0 22px!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:0!important;
  align-items:start!important;
  isolation:isolate!important;
  box-sizing:border-box!important;
}
/* Durchgehende Verbindungslinie – auch zwischen inaktiven Icons. */
.emergency-wizard-categories::before{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  left:calc(22px + (100% - 44px)/12)!important;
  right:calc(22px + (100% - 44px)/12)!important;
  top:29px!important;
  height:3px!important;
  border-radius:999px!important;
  background:var(--line)!important;
  pointer-events:none!important;
}
.emergency-wizard-category{
  position:relative!important;
  z-index:1!important;
  min-width:0!important;
  width:100%!important;
  padding:0 3px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:5px!important;
  background:transparent!important;
}
.emergency-wizard-category-icon{
  width:58px!important;
  height:58px!important;
  min-width:58px!important;
  min-height:58px!important;
  border-radius:50%!important;
  display:grid!important;
  place-items:center!important;
  box-sizing:border-box!important;
  background:var(--bg)!important;
  position:relative!important;
  z-index:2!important;
}
.emergency-wizard-category-icon img,
.emergency-wizard-category-icon>img{
  width:48px!important;
  height:48px!important;
  object-fit:contain!important;
}
.emergency-wizard-category.active .emergency-wizard-category-icon{
  width:68px!important;
  height:68px!important;
  min-width:68px!important;
  min-height:68px!important;
  margin-top:-5px!important;
}
.emergency-wizard-category.active .emergency-wizard-category-icon img,
.emergency-wizard-category.active .emergency-wizard-category-icon>img{
  width:56px!important;
  height:56px!important;
}
.emergency-wizard-category small{
  max-width:118px!important;
  text-align:center!important;
  line-height:1.05!important;
}

/* 5) Übersicht: Bereichsicons zentriert und etwas grösser auf Desktop + Mobil. */
.rc262-overview-categories{
  width:min(100%,1040px)!important;
  margin:10px auto 0!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:10px!important;
  justify-content:center!important;
  align-items:stretch!important;
}
.rc262-overview-category{
  min-width:0!important;
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
.rc262-overview-category>span{
  width:62px!important;
  height:62px!important;
  min-width:62px!important;
  min-height:62px!important;
  display:grid!important;
  place-items:center!important;
  margin-inline:auto!important;
}
.rc262-overview-category>span img,
.rc262-overview-category>span>img{
  width:54px!important;
  height:54px!important;
  object-fit:contain!important;
}

@media(max-width:899px){
  .emergency-wizard-categories{
    width:100%!important;
    margin-top:10px!important;
    padding:0 8px!important;
  }
  .emergency-wizard-categories::before{
    left:calc(8px + (100% - 16px)/12)!important;
    right:calc(8px + (100% - 16px)/12)!important;
    top:26px!important;
    height:3px!important;
  }
  .emergency-wizard-category-icon{
    width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;
  }
  .emergency-wizard-category-icon img,
  .emergency-wizard-category-icon>img{width:43px!important;height:43px!important}
  .emergency-wizard-category.active .emergency-wizard-category-icon{
    width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;margin-top:-5px!important;
  }
  .emergency-wizard-category.active .emergency-wizard-category-icon img,
  .emergency-wizard-category.active .emergency-wizard-category-icon>img{width:51px!important;height:51px!important}
  .emergency-wizard-category small{font-size:9px!important;max-width:62px!important}

  .rc262-overview-categories{
    width:100%!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:4px!important;
    padding:0 6px!important;
    box-sizing:border-box!important;
  }
  .rc262-overview-category{padding-inline:2px!important}
  .rc262-overview-category>span{
    width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;
  }
  .rc262-overview-category>span img,
  .rc262-overview-category>span>img{width:47px!important;height:47px!important}
}
