/* pandabu RC16.188 – compact core controls + template order */

/* Reiterkopf: Bearbeiten sitzt als ✏️ direkt neben dem Titel. */
.standard-tab-heading{min-width:0;display:grid!important;gap:1px!important}
.standard-tab-heading-line{display:flex;align-items:center;gap:8px;min-width:0}
.standard-tab-edit-icon{
  width:31px!important;min-width:31px!important;height:31px!important;min-height:31px!important;
  padding:0!important;border:0!important;border-radius:9px!important;background:var(--surface-2)!important;
  color:var(--text)!important;display:grid!important;place-items:center!important;font-size:16px!important;line-height:1!important;
}
.standard-tab-edit-icon:active{transform:scale(.97)}

/* Der frühere separate Bearbeiten-Slot entfällt vollständig. */
.tab-raster-view{grid-template-rows:68px 178px auto!important}
.tab-raster-view>.standard-tab-nav{
  padding-top:18px!important;
  grid-template-rows:38px 116px!important;
}
.tab-raster-view>.standard-tab-nav .cleaning-room-admin{display:none!important}

/* Kern-Steuerungen sitzen kompakt direkt unter den Reitern. */
.shopping-toolbar-row,.core-toolbar-row,.task-owner-toolbar{
  min-height:38px;display:flex;align-items:center;gap:10px;margin:2px 0 12px;min-width:0;
}
.shopping-toolbar-row{justify-content:space-between}
.core-toolbar-row{justify-content:flex-end}
.section-view-actions,.task-view-actions{display:flex;align-items:center;gap:8px;margin:0!important;min-width:0}
.section-view-actions-only{margin-left:auto!important}
.shopping-template-bar{min-width:0;flex:1 1 auto}
.shopping-template-bar button{min-height:34px!important;height:34px!important}

/* Aufgaben: Alle + Bewohner-Dropdown links, Auswahl/Liste/Kachel rechts. */
.task-owner-toolbar{justify-content:space-between}
.task-owner-filter{display:flex;align-items:center;gap:8px;min-width:0}
.task-owner-filter .chip{height:34px!important;min-height:34px!important;padding:0 13px!important;margin:0!important;display:grid;place-items:center}
.task-person-select-wrap{display:block;min-width:0}
.task-person-select{
  height:34px!important;min-height:34px!important;max-width:170px;min-width:132px;
  margin:0!important;padding:0 32px 0 11px!important;border-radius:11px!important;
  background:var(--surface-2);color:var(--text);border:1px solid var(--line);font-weight:750;
}
.cleaning-controls{margin:6px 0 8px!important}
.cleaning-subtools{margin:0 0 10px!important}
.cleaning-subtools .today-jump{margin:0!important}

/* Auswahlmodus: klein halten, Löschen nur noch als rotes X. */
.bulk-delete-icon{
  width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;
  padding:0!important;display:grid!important;place-items:center!important;font-size:19px!important;font-weight:900!important;
}
.bulk-toolbar-active-compact{max-width:100%!important;min-width:0!important}
.bulk-toolbar-active-compact .bulk-toolbar-actions{min-width:0}
.section-view-actions:has(.bulk-toolbar-active) .display-toggle-compact,
.task-view-actions:has(.bulk-toolbar-active) .display-toggle-compact{display:none!important}

/* Gespeicherte Einkaufslisten: eine flache Zeile mit Anwenden + ✏️ + X. */
.shopping-template-list-compact .shopping-template-card{
  grid-template-columns:minmax(0,1fr) auto!important;
  min-height:58px!important;padding:8px 10px!important;gap:8px!important;
}
.shopping-template-card-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;flex-wrap:nowrap!important}
.shopping-template-card-actions>button{height:34px!important;min-height:34px!important;margin:0!important}
.shopping-template-card-actions .shopping-template-apply{padding:0 10px!important;font-size:.82rem!important}
.shopping-template-icon-action{
  width:34px!important;min-width:34px!important;padding:0!important;font-size:17px!important;display:grid!important;place-items:center!important;
}
.shopping-template-delete.shopping-template-icon-action{font-size:20px!important;font-weight:900!important}

/* Artikel einer gespeicherten Einkaufsliste: Reihenfolge links, Bearbeiten/Löschen rechts. */
.shopping-template-item-row{
  grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;gap:8px!important;padding:8px!important;min-height:54px!important;
}
.shopping-template-item-order,.shopping-template-item-actions{display:flex;align-items:center;gap:4px}
.template-order-btn,.template-icon-action{
  width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;
  margin:0!important;border-radius:9px!important;display:grid!important;place-items:center!important;line-height:1!important;
}
.template-order-btn{font-size:18px!important}
.template-icon-action{font-size:16px!important}
.template-icon-action.danger{font-size:18px!important;font-weight:900!important}
.template-order-btn:disabled{opacity:.32!important}

/* Kachelansicht: lange Bezeichnungen dürfen das Raster nie verbreitern. */
.tile-grid{min-width:0!important}
.tile-grid .content-tile{min-width:0!important;overflow:hidden}
.tile-grid .content-tile .card-main{min-width:0!important;max-width:100%!important}
.tile-grid .content-tile .card-title{
  display:block!important;max-width:100%!important;min-width:0!important;min-height:1.2em!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  -webkit-line-clamp:unset!important;-webkit-box-orient:initial!important;
}
.tile-grid .inventory-card .card-title{min-height:1.2em!important}

@media(max-width:700px){
  .tab-raster-view{grid-template-rows:62px 170px auto!important}
  .tab-raster-view>.standard-tab-nav{padding-top:14px!important;grid-template-rows:36px 116px!important}
  .standard-tab-heading small{display:none!important}
  .standard-tab-edit-icon{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important}

  .shopping-toolbar-row,.core-toolbar-row,.task-owner-toolbar{margin-top:0;margin-bottom:10px;gap:7px}
  .shopping-template-bar button{height:32px!important;min-height:32px!important}
  .task-owner-filter{gap:6px;flex:1 1 auto}
  .task-owner-filter .chip{height:32px!important;min-height:32px!important;padding:0 11px!important}
  .task-person-select{height:32px!important;min-height:32px!important;min-width:116px;max-width:145px;padding-left:9px!important;font-size:.82rem!important}
  .task-view-actions{flex:0 0 auto}

  .shopping-template-list-compact .shopping-template-card{
    grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;padding:7px 8px!important;min-height:54px!important;
  }
  .shopping-template-card-meta{gap:8px!important}
  .shopping-template-card-meta .context-tab-icon{width:34px!important;height:34px!important;min-width:34px!important}
  .shopping-template-card-actions{justify-content:flex-end!important}
  .shopping-template-card-actions>button{height:32px!important;min-height:32px!important}
  .shopping-template-card-actions .shopping-template-apply{font-size:.76rem!important;padding:0 8px!important}
  .shopping-template-icon-action{width:32px!important;min-width:32px!important;padding:0!important}

  .shopping-template-item-row{grid-template-columns:auto minmax(0,1fr) auto!important;gap:6px!important;padding:7px!important}
  .template-order-btn,.template-icon-action{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important}

  .bulk-toolbar-active-compact{
    position:sticky!important;bottom:72px!important;top:auto!important;width:100%!important;
    display:flex!important;align-items:center!important;gap:5px!important;padding:6px!important;overflow-x:auto!important;
    scrollbar-width:none;
  }
  .bulk-toolbar-active-compact::-webkit-scrollbar{display:none}
  .bulk-toolbar-active-compact .bulk-toolbar-status{flex:0 0 auto!important;padding:0 5px!important}
  .bulk-toolbar-active-compact .bulk-toolbar-actions{display:flex!important;flex:0 0 auto!important;overflow:visible!important;gap:4px!important}
  .bulk-toolbar-active-compact .bulk-toolbar-actions button{min-height:32px!important;height:32px!important;padding:0 8px!important;font-size:11px!important}
  .bulk-toolbar-active-compact .bulk-delete-icon{width:32px!important;min-width:32px!important;padding:0!important;font-size:18px!important}
}

@media(max-width:420px){
  .shopping-template-bar button{font-size:11px!important;padding:0 8px!important}
  .task-person-select{min-width:108px;max-width:126px}
  .display-toggle-compact .display-btn,.icon-only-action{width:31px!important;min-width:31px!important}
  .shopping-template-card-actions .shopping-template-apply{padding:0 7px!important}
}
