/* ═══════════════════════════════════════════════════════════════════
   04 ITEMS
   Item lists, tag pills, asset preview
   Sourced from monolithic main.css lines 467-657.
   ═══════════════════════════════════════════════════════════════════ */


/* ── Item list (shared) ─────────────────────────────────────────── */
.item-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  min-height: 36px;
}
.item-row:hover   { background: var(--bg3); }
.item-row.active  { background: var(--accent-d); }
.item-row .thumb  {
  width: 28px; height: 28px;
  border-radius: 3px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  background: var(--bg4);
}
.item-row .item-info { flex: 1; overflow: hidden; }
.item-row .item-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.item-row .item-sub {
  font-size: 11px;
  color: var(--text-dim);
}
.item-row .item-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}
.item-row:hover .item-actions { opacity: 1; }
.item-row .btn-tiny {
  width: 20px; height: 20px;
  border-radius: 3px;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.item-row .btn-tiny:hover { background: var(--bg4); }
.asset-category-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.asset-category-header {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
}
.asset-category-header:hover { background: var(--bg3); }
.asset-category-caret {
  width: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
  text-align: center;
}
.asset-category-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-category-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-d);
  color: var(--cyan);
  text-align: center;
  font-size: 10px;
}
.asset-category-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 8px;
}
.asset-category-body .item-row {
  border-left: 2px solid var(--border);
  border-radius: 3px;
}

/* ── Tag badge ──────────────────────────────────────────────────── */
.tag-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--text-hint);
}
.tag-badge[data-tag="main_character"] { background: var(--tag-main_character); }
.tag-badge[data-tag="enemy"]          { background: var(--tag-enemy); }
.tag-badge[data-tag="npc"]            { background: var(--tag-npc); color: #000; }
.tag-badge[data-tag="boss"]           { background: var(--tag-boss); color: #000; }
.tag-badge[data-tag="prop"]           { background: var(--tag-prop); }
.tag-badge[data-tag="collectible"]    { background: var(--tag-collectible); color: #000; }
.tag-badge[data-tag="terrain"]        { background: var(--tag-terrain); color: #000; }
.tag-badge[data-tag="decoration"]     { background: var(--tag-decoration); }
.tag-badge[data-tag="hazard"]         { background: var(--tag-hazard); }
.tag-badge[data-tag="trigger_zone"]   { background: var(--tag-trigger_zone); color: #000; }

/* ── Asset preview ──────────────────────────────────────────────── */
.asset-preview-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  height: 100%;
}
.asset-canvas {
  image-rendering: pixelated;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: repeating-conic-gradient(var(--bg3) 0% 25%, var(--bg4) 0% 50%) 0 0 / 16px 16px;
  max-width: 100%;
  max-height: 300px;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.preview-toolbar button {
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.preview-toolbar button:hover { background: var(--bg4); }

/* Frame strip */
.frame-strip {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  padding: 4px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.frame-thumb {
  width: 36px; height: 36px;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  image-rendering: pixelated;
  background: var(--bg4);
  object-fit: contain;
}
.frame-thumb.active { border-color: var(--accent); }
.frame-thumb:hover  { border-color: var(--border2); }
