.sidebar {
  width: 280px;
  background: #181818;
  border-right: 1px solid #3f3f3f;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-section {
  padding: 20px;
  border-bottom: 1px solid #3f3f3f;
  flex-shrink: 0;
}

.sidebar-section:last-child {
  border-bottom: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sidebar-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  flex-shrink: 0;
}

#tagFilterInput {
  margin-bottom: 12px;
  flex-shrink: 0;
}

#deleteTagBtn {
  flex-shrink: 0;
}

.tag-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  padding-right: 4px;
}

.tag-list::-webkit-scrollbar {
  width: 6px;
}

.tag-list::-webkit-scrollbar-thumb {
  background: #3f3f3f;
  border-radius: 3px;
}

.tag-list::-webkit-scrollbar-track {
  background: transparent;
}

.tag-item {
  background: #ff0000;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  height: fit-content;
}

.tag-item:hover {
  background: #cc0000;
}

.tag-item.active {
  background: #fff;
  color: #ff0000;
  box-shadow: 0 0 0 2px #ff0000;
}

.tag-item.empty {
  color: #666;
  font-style: italic;
  padding: 6px 10px;
  font-size: 12px;
  width: 100%;
  background: transparent;
  cursor: default;
}

.tag-item.empty:hover {
  background: transparent;
}
