/* ============ Inventory ============ */
.inv-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.inv-toolbar-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
}

.inv-contents {
  flex: 1;
  overflow-y: auto;
  padding: 0 4px 0 0;
}

.inv-empty {
  padding: 20px;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.inv-drop-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.inv-drop-zone.inv-drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  background: rgba(74, 144, 217, 0.06);
}

.inv-drop-hint {
  padding: 30px 20px;
  color: var(--text-muted);
  text-align: center;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.inv-drop-hint-icon {
  font-size: 36px;
  opacity: 0.3;
}

.inv-list {
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---- Card base ---- */
.inv-card {
  background: var(--bg-light);
  border: 1px solid var(--cardBorders);
  border-radius: 5px;
  display: flex;
  overflow: hidden;
  transition: border-color 0.1s;
}

.inv-card:hover {
  border-color: var(--accent);
}

/* ---- Sample card ---- */
.inv-card[data-type="sample"] {
  border-left: 3px solid transparent;
  flex-direction: column;
}

.inv-card-body {
  flex: 1;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.inv-card-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-card-type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.inv-card-type-dot.smp-type-loop { background: var(--accent); }
.inv-card-type-dot.smp-type-oneshot { background: var(--success); }
.inv-card-type-dot.smp-type-fx { background: var(--warning); }
.inv-card-type-dot.smp-type-ir { background: #b080d0; }
.inv-card-type-dot.smp-type-preset { background: #70b0d0; }

.inv-card-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-card-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-mid);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.inv-card-badge-preset {
  background: rgba(176, 128, 208, 0.12);
  color: #b080d0;
  border-color: rgba(176, 128, 208, 0.2);
}

.inv-card-type {
  font-size: 10px;
  font-weight: 500;
}

.inv-card-type.smp-type-loop { color: var(--accent); }
.inv-card-type.smp-type-oneshot { color: var(--success); }
.inv-card-type.smp-type-fx { color: var(--warning); }
.inv-card-type.smp-type-ir { color: #b080d0; }
.inv-card-type.smp-type-preset { color: #70b0d0; }

.inv-card-detail {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.inv-card-meta {
  font-size: 10px;
  color: var(--text-muted);
  gap: 8px;
}

/* ---- Preset card ---- */
.inv-card-tags-row {
  flex-wrap: wrap;
  gap: 2px;
}

.inv-card-tag {
  font-size: 9px;
  background: var(--bg-mid);
  color: var(--text-muted);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* ---- Project card ---- */
.inv-card[data-type="project"] {
  flex-direction: row;
  align-items: stretch;
}

.inv-card-thumb {
  width: 64px;
  min-height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-mid);
  border-right: 1px solid var(--border);
}

.inv-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inv-card-bpm {
  color: var(--accent);
}

.inv-card-rating {
  color: var(--warning);
  font-size: 11px;
  letter-spacing: 1px;
}

.inv-card-downloads {
  color: var(--text-muted);
}

/* ---- Waveform for sample cards ---- */
.inv-card-waveform {
  position: relative;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
  height: 40px;
}

.inv-waveform-canvas {
  width: 100%;
  height: 40px;
  display: block;
}

.smp-waveform-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0 2px;
  line-height: 1;
  transition: background 0.1s;
  opacity: 0;
}

.inv-card-waveform:hover .smp-waveform-play {
  opacity: 1;
}

.smp-waveform-play:hover {
  background: rgba(74, 144, 217, 0.8);
}

.smp-waveform-play.playing {
  background: rgba(74, 144, 217, 0.9);
  opacity: 1;
}

/* ---- Remove button (shared) ---- */
.inv-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.1s;
}

.inv-card:hover .inv-item-remove {
  opacity: 1;
}

.inv-item-remove:hover {
  color: var(--danger);
}

.inv-empty-list {
  padding: 20px;
  color: var(--text-muted);
  text-align: center;
  font-size: 11px;
}
