/**
 * Decision Tree Styles
 */

.decision-tree-container {
  width: 100%;
  margin: 2rem 0;
  overflow-x: auto;
}

.decision-tree-svg {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
}

.decision-tree-svg .node {
  cursor: pointer;
}

.decision-tree-svg .node-circle {
  stroke: #fff;
  stroke-width: 2px;
  transition: all 0.2s ease;
}

.decision-tree-svg .node:hover .node-circle {
  stroke-width: 3px;
  filter: brightness(1.1);
}

.decision-tree-svg .node text {
  font-size: 12px;
  fill: #333;
}

.decision-tree-svg .node.answer text {
  font-weight: 600;
}

.decision-tree-svg .badge {
  font-size: 10px;
  fill: #28a745;
  font-weight: 600;
}

.decision-tree-svg .link {
  fill: none;
  stroke: #ccc;
  stroke-width: 1.5px;
}

/* Legend */
.decision-tree-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 12px;
  color: #666;
  margin-top: 1rem;
}

.decision-tree-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.decision-tree-legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.decision-tree-legend .dot.question {
  background: #007bff;
}

.decision-tree-legend .dot.answer {
  background: #17a2b8;
}

.decision-tree-legend .dot.recommended {
  background: #28a745;
}

/* Controls */
.decision-tree-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.decision-tree-controls button {
  padding: 0.4rem 0.8rem;
  font-size: 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.decision-tree-controls button:hover {
  background: #f0f0f0;
  border-color: #bbb;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .decision-tree-svg .node text {
    fill: #e0e0e0;
  }

  .decision-tree-svg .link {
    stroke: #555;
  }

  .decision-tree-legend {
    background: #2d2d2d;
    color: #aaa;
  }

  .decision-tree-controls button {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
  }

  .decision-tree-controls button:hover {
    background: #444;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .decision-tree-legend {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .decision-tree-svg {
    font-size: 11px;
  }
}
