/* --- Voice-card editor: add / remove / reorder lists ---------------------
   New rules only. The base .voice-card-editor / .voice-card-advanced /
   .voice-card-status shell still lives in css/views.css; everything the
   editable lists need is here so the two don't have to be edited together.
   Radii stay on the 6/10/12 tokens and the unsaved state borrows the
   primary accent glow rather than inventing a colour. */

.vc-list {
  margin-top: var(--space-4);
}

.vc-hint {
  margin: 2px 0 var(--space-2);
  font-size: 0.78rem;
}

.vc-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.vc-items-stacked {
  flex-direction: column;
  flex-wrap: nowrap;
}

.vc-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Short rules read as chips: pill-ish, sized to their text. */
.vc-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  padding: 2px 2px 2px var(--space-2);
  max-width: 100%;
}

.vc-chip .vc-item-input {
  border: none;
  background: transparent;
  margin: 0;
  padding: 2px 0;
  min-width: 8ch;
  width: 22ch;
  max-width: 100%;
  font-size: 0.85rem;
  box-shadow: none;
}

.vc-chip .vc-item-input:focus {
  outline: none;
}

.vc-chip:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

/* Example posts are whole sentences, so they get a full-width text box with
   the same controls sitting alongside. */
.vc-item-block {
  align-items: flex-start;
  gap: var(--space-2);
}

.vc-item-block .vc-item-input {
  flex: 1 1 auto;
  margin: 0;
  border-radius: var(--radius-sm);
}

.vc-item-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.btn-xs {
  font-size: 0.72rem;
  line-height: 1;
  padding: 0.35em 0.5em;
  border-radius: var(--radius-sm);
}

.vc-item-tools .btn-xs {
  border-color: transparent;
  color: var(--text-muted);
}

.vc-item-tools .btn-xs:hover:not(:disabled) {
  border-color: var(--border);
  color: var(--text);
}

.vc-item-tools .vc-remove:hover:not(:disabled) {
  color: var(--danger-ink);
  border-color: var(--danger);
}

.vc-item-tools .btn-xs:disabled {
  opacity: 0.3;
}

.vc-empty {
  margin: var(--space-1) 0 0;
  font-size: 0.78rem;
}

.vc-empty[hidden] {
  display: none;
}

.vc-add {
  margin-top: var(--space-2);
}

/* Unsaved state: a quiet accent edge, not an alarm. */
.voice-card-editor.vc-unsaved {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.voice-card-status.vc-dirty {
  color: var(--primary-ink);
  font-weight: 600;
}
