@layer sections {
/* ── Tag manage list ────────────────────────────────── */
.tag-manage-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.tag-manage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}
.tag-manage-row:last-child { border-bottom: none; }

/* Inline forms (rename, delete) sit transparently in the row's flex layout so
   their controls behave as direct flex items. */
.tag-manage-rename-form,
.tag-manage-delete-form { display: contents; }
.tag-color-swatches { margin: 0; }

.tag-manage-pill {
  flex-shrink: 0;
  min-width: 72px;
  text-align: center;
}

/* Color swatches */
.tag-color-swatches {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1;
}
.tag-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--t-fast);
  outline: none;
  position: relative;
  background: var(--swatch-dot);
}
.tag-swatch:hover { transform: scale(1.15); }
.tag-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 1.5px var(--surface) inset;
}

.tag-manage-input {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  color: var(--text);
  background: var(--bg);
}
.tag-manage-input:focus { border-color: oklch(60% 0.08 65); }

.btn-outline--small {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--r-sm);
}

.tag-manage-delete {
  width: 24px; height: 24px;
  color: oklch(55% 0.12 8);
  font-size: 15px;
  cursor: pointer;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tag-manage-delete:hover { background: oklch(95% 0.02 8); }
}
