/* pandabu RC16.273 – Auswahlposition, Suchtreffer-Aktionen, Vorratsmodal & Kachel-Polish */

/* Einkaufen: Auswahl-Popover reserviert wie im Vorrat eigenen Platz und liegt nie über der Suche. */
.tab-raster-shopping .shopping-toolbar-row:has(.bulk-toolbar-selection-host){
  margin-bottom:52px!important;
}

/* Ersteller-/Creator-Avatar: Name nach Tap für 5 Sekunden als ruhiges Label. */
.inventory-owner-avatar{
  position:relative;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  margin:0 2px 0 auto;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  overflow:visible;
  cursor:pointer;
  z-index:5;
}
.inventory-owner-avatar .user-avatar{margin:0!important}
.inventory-owner-name{
  position:absolute;
  top:calc(100% + 5px);
  right:0;
  z-index:20;
  max-width:150px;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:9px;
  background:color-mix(in srgb,var(--surface) 94%,transparent);
  color:var(--text);
  box-shadow:0 8px 22px rgba(0,0,0,.18);
  font-size:10px;
  font-weight:800;
  line-height:1.15;
  white-space:nowrap;
  opacity:0;
  visibility:hidden;
  transform:translateY(-3px);
  transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
  pointer-events:none;
}
.inventory-owner-avatar.show-name .inventory-owner-name{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}

/* Ablaufdatum-Zeile: Menge und Datum exakt gleiche Höhe, X klar in eigener Spalte. */
.expiry-batch-row{
  grid-template-columns:minmax(82px,.72fr) minmax(0,1.45fr) 38px!important;
  gap:8px!important;
  align-items:end!important;
}
.expiry-batch-row .field{min-width:0!important}
.expiry-batch-row .field input,
.expiry-batch-row input[data-expiry-quantity],
.expiry-batch-row input[data-expiry-date]{
  width:100%!important;
  min-width:0!important;
  height:46px!important;
  min-height:46px!important;
  box-sizing:border-box!important;
}
.expiry-batch-row .expiry-remove{
  position:static!important;
  align-self:end!important;
  justify-self:center!important;
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  margin:0 0 5px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  line-height:1!important;
  border-radius:10px!important;
}

@media (max-width:699px){
  .tab-raster-shopping .shopping-toolbar-row:has(.bulk-toolbar-selection-host){
    margin-bottom:48px!important;
  }

  /* Vorratskacheln: Inhalt enger staffeln, Warenkorb oben rechts, Ersteller direkt darunter. */
  .inventory-page .tile-grid .inventory-card,
  .core-search-result-section .tile-grid .inventory-card{
    position:relative!important;
  }
  .inventory-page .tile-grid .inventory-card .card-row,
  .core-search-result-section .tile-grid .inventory-card .card-row{
    gap:3px!important;
  }
  .inventory-page .tile-grid .inventory-card .content-icon,
  .core-search-result-section .tile-grid .inventory-card .content-icon{
    margin-top:2px!important;
    margin-bottom:0!important;
  }
  .inventory-page .tile-grid .inventory-card .card-main,
  .core-search-result-section .tile-grid .inventory-card .card-main{
    margin-top:0!important;
    padding-right:34px!important;
  }
  .inventory-page .tile-grid .inventory-card .meta,
  .core-search-result-section .tile-grid .inventory-card .meta{
    margin-top:3px!important;
    min-height:30px!important;
  }
  .inventory-page .tile-grid .inventory-card .mini-action,
  .core-search-result-section .tile-grid .inventory-card .mini-action{
    position:absolute!important;
    top:8px!important;
    right:8px!important;
    width:31px!important;
    min-width:31px!important;
    height:31px!important;
    min-height:31px!important;
    margin:0!important;
    z-index:7!important;
  }
  .inventory-page .tile-grid .inventory-card .inventory-owner-avatar,
  .core-search-result-section .tile-grid .inventory-card .inventory-owner-avatar{
    position:absolute!important;
    top:45px!important;
    right:10px!important;
    margin:0!important;
    z-index:8!important;
  }
  .inventory-page .tile-grid .inventory-card .inventory-owner-avatar .user-avatar,
  .core-search-result-section .tile-grid .inventory-card .inventory-owner-avatar .user-avatar{
    width:27px!important;
    height:27px!important;
    min-width:27px!important;
  }
  .inventory-page .tile-grid .inventory-card .inventory-owner-name,
  .core-search-result-section .tile-grid .inventory-card .inventory-owner-name{
    top:calc(100% + 4px)!important;
    right:-2px!important;
    max-width:122px!important;
  }

  /* Mobile Ablaufdatum: unterschiedliche Breite, gleiche Höhe, X ohne Überlagerung. */
  .expiry-batch-row{
    grid-template-columns:minmax(74px,.72fr) minmax(0,1.42fr) 36px!important;
    gap:6px!important;
    padding:8px!important;
  }
  .expiry-batch-row label{font-size:10px!important}
  .expiry-batch-row .field input,
  .expiry-batch-row input[data-expiry-quantity],
  .expiry-batch-row input[data-expiry-date]{
    height:44px!important;
    min-height:44px!important;
    padding:8px!important;
    font-size:13px!important;
  }
  .expiry-batch-row .expiry-remove{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    margin-bottom:5px!important;
  }
}

@media (max-width:380px){
  .expiry-batch-row{
    grid-template-columns:minmax(68px,.68fr) minmax(0,1.32fr) 32px!important;
    gap:5px!important;
    padding:7px!important;
  }
  .expiry-batch-row .expiry-remove{
    width:32px!important;
    min-width:32px!important;
    height:32px!important;
    min-height:32px!important;
  }
}
