/* The raid editor's Consumables tab (app/editor/consumables-field.js): each
   section's chosen items as rows with an item tooltip button (icon and
   quality-coloured name, styled by loot.css's .loot-label) and a remove
   button, above its Add button, which opens the item picker. */

.consumable-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

/* Nothing chosen yet: the select sits right under the legend. */
.consumable-list:not(:has(li)) {
  display: none;
}

.consumable-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  padding: 2px 6px 2px 4px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-secondary);
}

.consumable-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid rgb(0 0 0 / 0.6);
  border-radius: 5px;
  background: var(--bg-inset);
}

.consumable-label {
  flex: 1;
}

.consumable-remove {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.consumable-remove:hover,
.consumable-remove:focus-visible {
  border-color: var(--border-hover);
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* An empty section's Add button follows the floated legend directly, so its
   row clears the float itself. */
.consumable-add {
  display: flex;
  clear: both;
  margin-top: 12px;
}
