@layer base {
/* Comment side panel */
.comment-panel {
  width: 0;
  overflow: hidden;
  transition: width var(--dur-base) var(--ease-out);
  border-left: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.comment-panel:not(:empty) {
  width: 360px;
  padding: var(--space-md);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}
.panel-header h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}
.panel-close {
  background: none;
  border: none;
  font-size: var(--text-xl);
  cursor: pointer;
  color: var(--text-muted);
  padding: var(--space-xs);
}
.panel-close:hover { color: var(--text); }

.comments-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
}

.comment {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}
.comment:last-child { border-bottom: none; }
.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xs);
  font-size: 0.65em;
  color: var(--text-muted);
}
.comment-author { font-weight: 500; }
.comment-body { font-size: 1 em; line-height: 1.5; white-space: pre-wrap; }

.comment-actions {
  display: inline-flex;
  gap: var(--space-xs);
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.comment:hover .comment-actions,
.flow-card:hover .comment-actions { opacity: 1; }
.comment-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  line-height: 0;
}
.comment-action-icon {
  width: 14px;
  height: 14px;
}
.comment-action-btn:hover { color: var(--text); }
.comment-action-delete:hover { color: var(--danger); }

.comment-edit-textarea {
  width: 100%;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: var(--text-base);
  resize: vertical;
  outline: none;
  margin-bottom: var(--space-xs);
}
.comment-edit-actions {
  display: flex;
  gap: var(--space-xs);
}

.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: var(--text-base);
  resize: vertical;
  outline: none;
  margin-bottom: var(--space-sm);
}
.comment-form textarea:focus { border-color: var(--accent); }

.comment-form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: var(--text-base);
  resize: vertical;
  outline: none;
}
.comment-form-textarea:focus { border-color: var(--accent); }
}
