/* knowledge-explorer.css — Knowledge Graph explorer view */

/* ===== Panel Layout ===== */
.knowledge-explorer {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  gap: var(--space-md);
  overflow-y: auto;
  height: 100%;
}

.knowledge-explorer::-webkit-scrollbar { width: 4px; }
.knowledge-explorer::-webkit-scrollbar-track { background: transparent; }
.knowledge-explorer::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: var(--radius-full);
}
.knowledge-explorer::-webkit-scrollbar-thumb:hover { background: var(--glass-border-light); }

/* ===== Entity Cards ===== */
/* Override glass-card's vertical lift with horizontal slide for list feel */
.knowledge-explorer .glass-card {
  border-left: 3px solid var(--glass-border);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  cursor: pointer;
}

.knowledge-explorer .glass-card:hover {
  transform: translateX(2px) translateY(0);
}

/* Type-colored left borders */
.knowledge-explorer .glass-card[data-entity-type="person"]     { border-left-color: #3b82f6; }
.knowledge-explorer .glass-card[data-entity-type="concept"]    { border-left-color: #a855f7; }
.knowledge-explorer .glass-card[data-entity-type="technology"] { border-left-color: #22c55e; }
.knowledge-explorer .glass-card[data-entity-type="location"]   { border-left-color: #f97316; }
.knowledge-explorer .glass-card[data-entity-type="other"]      { border-left-color: #6b7280; }

/* ===== Relations List ===== */
.knowledge-explorer .glass-subtle {
  transition: background var(--transition-fast);
}

/* ===== Stats Breakdown ===== */
.knowledge-explorer .divider {
  height: 1px;
  background: var(--glass-border);
  margin: var(--space-xs) 0;
  border: none;
}

/* ===== Graph View ===== */
.kg-graph-container {
  flex: 1;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: none;
}

.kg-graph-container svg {
  display: block;
  width: 100%;
  height: 100%;
}

.kg-graph-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--space-md);
  color: var(--text-secondary);
  text-align: center;
  padding: var(--space-xl);
}

.kg-graph-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
}

/* View toggle button */
.kg-view-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: var(--font-size-sm);
  cursor: pointer;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.kg-view-toggle:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .knowledge-explorer {
    padding: var(--space-md);
    gap: var(--space-sm);
  }

  .knowledge-explorer .glass-card {
    padding: var(--space-sm) var(--space-md);
  }
}
