/* ── LLM-KB plugin styles ─────────────────────────────── */

/* Status bar */
.llm-kb-status {
  font-size: var(--font-smallest);
}

/* Input modal */
.llm-kb-modal__input {
  width: 100%;
  height: 80px;
  margin-bottom: 8px;
  resize: vertical;
}

/* View container */
.llm-kb-view {
  padding: 8px 12px;
}

.llm-kb-view__title {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: var(--font-ui-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.llm-kb-view__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Log mode (pre-formatted CLI output) ─────────────── */

.llm-kb-log {
  white-space: pre-wrap;
  font-size: var(--font-smallest);
  font-family: var(--font-monospace);
  padding: 8px;
  background: var(--background-secondary);
  border-radius: var(--radius-s);
  max-height: 600px;
  overflow-y: auto;
  margin: 0;
}

/* ── Search mode ─────────────────────────────────────── */

.llm-kb-search-heading {
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--background-modifier-border);
  margin-bottom: 4px;
}

.llm-kb-result {
  padding: 8px;
  border-radius: var(--radius-s);
  background: var(--background-secondary);
}

.llm-kb-result:hover {
  background: var(--background-modifier-hover);
}

.llm-kb-result__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.llm-kb-result__rank {
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  min-width: 1.5em;
}

.llm-kb-result__score {
  font-size: var(--font-smallest);
  font-family: var(--font-monospace);
  color: var(--text-faint);
  background: var(--background-primary);
  padding: 1px 5px;
  border-radius: var(--radius-s);
}

.llm-kb-result__link {
  display: block;
  font-size: var(--font-ui-small);
  margin-bottom: 2px;
  cursor: pointer;
}

.llm-kb-result__title {
  font-size: var(--font-ui-small);
  font-weight: var(--font-semibold);
  color: var(--text-normal);
}

.llm-kb-result__context {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--font-smallest);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
