/* pandabu RC16.186 – compact saved shopping lists + editable template items */
.shopping-templates-shell{display:grid;gap:12px}
.shopping-templates-top{margin-bottom:0!important;align-items:flex-start}
.shopping-templates-top p{margin:3px 0 0}
.shopping-template-list-compact{display:grid;gap:8px}
.shopping-template-list-compact .shopping-template-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px!important;margin:0!important;min-height:0!important}
.shopping-template-card-meta{min-width:0;gap:10px!important}
.shopping-template-card-meta .context-tab-icon{width:38px!important;height:38px!important;min-width:38px!important}
.shopping-template-card-meta strong{display:block;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shopping-template-card-meta small{display:block;margin-top:2px;line-height:1.1}
.shopping-template-card-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.shopping-template-card-actions>button{width:auto!important;min-width:0!important;min-height:36px!important;height:36px!important;padding:0 11px!important;margin:0!important;line-height:1!important;border-radius:11px!important;font-size:.9rem!important}
.shopping-template-save-current{min-height:46px!important;margin-top:0!important}

.shopping-template-editor-shell{display:grid;gap:10px}
.shopping-template-editor-basics{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.shopping-template-items-section{display:grid;gap:9px;margin-top:4px}
.shopping-template-items-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.shopping-template-items-heading>div{display:grid;gap:1px}
.shopping-template-items-heading small{font-size:.78rem}
.shopping-template-add-item{width:auto!important;min-height:36px!important;padding:0 11px!important;white-space:nowrap}
.shopping-template-items-list{display:grid;gap:6px}
.shopping-template-item-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 10px;border:1px solid rgba(127,127,127,.2);border-radius:12px}
.shopping-template-item-copy{min-width:0;display:grid;gap:2px}
.shopping-template-item-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
.shopping-template-item-copy small,.shopping-template-item-copy span{font-size:.78rem;line-height:1.2;opacity:.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shopping-template-item-actions{display:flex;gap:5px;align-items:center}
.shopping-template-item-actions>button{width:auto!important;min-width:0!important;min-height:34px!important;height:34px!important;padding:0 9px!important;margin:0!important;border-radius:10px!important;font-size:.82rem!important}
.shopping-template-items-empty{padding:14px;text-align:center;border:1px dashed rgba(127,127,127,.28);border-radius:12px;opacity:.72}
.shopping-template-item-editor{display:grid;gap:8px;padding:11px;border:1px solid rgba(127,127,127,.24);border-radius:14px;background:rgba(127,127,127,.06)}
.shopping-template-item-editor[hidden]{display:none!important}
.shopping-template-item-editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.shopping-template-item-editor-head .mini-action{width:34px!important;height:34px!important;min-height:34px!important;padding:0!important}
.shopping-template-item-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.shopping-template-item-editor .field{margin:0!important}
.shopping-template-item-editor-actions{display:flex;justify-content:flex-end;gap:7px}
.shopping-template-item-editor-actions>button{width:auto!important;min-height:38px!important;padding:0 12px!important}
.shopping-template-form-actions{margin-top:4px!important}

@media (max-width:600px){
  .shopping-template-list-compact .shopping-template-card{grid-template-columns:1fr;gap:7px;padding:9px 10px!important}
  .shopping-template-card-actions{justify-content:flex-end}
  .shopping-template-card-actions>button{height:34px!important;min-height:34px!important;padding:0 9px!important;font-size:.84rem!important}
  .shopping-template-card-actions .shopping-template-delete{width:36px!important;padding:0!important;font-size:0!important}
  .shopping-template-card-actions .shopping-template-delete::before{content:'×';font-size:22px;line-height:1}
  .shopping-template-save-current{min-height:44px!important;font-size:.95rem!important}
  .shopping-template-item-row{grid-template-columns:1fr;gap:7px}
  .shopping-template-item-actions{justify-content:flex-end}
  .shopping-template-item-grid{grid-template-columns:1fr 1fr}
}
