/* Anonymize for AI: "Add a name or detail" on the pasted-text review screen.
   Tokens only, so dark mode flips for free. */
.anon-addterm {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.anon-addterm-lbl {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.anon-addterm-row { display: flex; gap: 8px; align-items: center; }
.anon-addterm-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.anon-addterm-input:hover { border-color: var(--border-strong); }
.anon-addterm-input:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.anon-addterm-msg { min-height: 1.3em; margin: 8px 0 0; }
.anon-addterm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.anon-addterm-chips:empty { display: none; }
.anon-term-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 6px 4px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  transition: border-color .15s;
}
.anon-term-chip:hover { border-color: var(--border-strong); }
.anon-term-chip-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}
.anon-term-chip-meta { color: var(--text-mute); font-size: 12px; white-space: nowrap; }
.anon-term-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .15s, color .15s, transform .1s;
}
.anon-term-chip-x:hover { background: var(--bg-soft); color: var(--text); }
.anon-term-chip-x:active { transform: scale(0.95); }
.anon-term-chip-x:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* A firm-policy term: a lock where the remove button would be, same footprint so the row never shifts. */
.anon-term-chip-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--text-mute);
}
@media (max-width: 480px) {
  .anon-term-chip { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; width: 100%; border-radius: var(--radius); }
  .anon-term-chip-meta { grid-column: 1; white-space: normal; }
  .anon-term-chip-x, .anon-term-chip-lock { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .anon-term-chip.kp-enter { animation: none; }
}
