/* MatrixGraphicRenderer Styles - Minimalist Approach */

.matrix-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 32px auto;
  max-width: 100%;
  width: 400px; /* Base size */
}

.matrix-svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Lines */
.matrix-line {
  stroke: var(--border-color, #e5e7eb);
  stroke-width: 2px;
}

.matrix-line.cross {
  stroke: var(--text-secondary, #9ca3af);
  stroke-dasharray: 4 4; /* Dashed lines for internal cross to keep it minimal */
  stroke-width: 1.5px;
}

.matrix-line.direct-box {
  stroke: var(--text-secondary, #6b7280);
}

.matrix-line.diagonal-box {
  stroke: var(--text-secondary, #6b7280);
}

/* Nodes (Circles) */
.matrix-node {
  fill: var(--bg-surface, #ffffff);
  stroke: var(--border-color, #e5e7eb);
  stroke-width: 2px;
  transition: all 0.3s ease;
}

/* Specific Node Colors for distinction but keeping it minimal */
.matrix-node.core {
  stroke: var(--primary, #8b5cf6);
  fill: var(--bg-surface, #ffffff);
}

.matrix-node.center {
  stroke: var(--primary, #8b5cf6);
  stroke-width: 3px;
}

.matrix-node.tail {
  stroke: #f43f5e; /* Red-ish for karmic tail */
}

.matrix-node.money, .matrix-node.finance {
  stroke: #10b981; /* Green-ish for money */
}

.matrix-node.relationship, .matrix-node.relationship-corner {
  stroke: #ec4899; /* Pink-ish for relationship */
}

/* Text */
.matrix-text {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  fill: #111827; /* Always dark because circles are always white */
  user-select: none;
}

.matrix-error {
  text-align: center;
  padding: 24px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 12px;
  margin: 16px 0;
}

/* Matrix Tooltip */
.matrix-interactive-node { cursor: pointer; }
.matrix-interactive-node:hover circle { stroke-width: 3px; filter: brightness(0.9); }
.matrix-tooltip {
  position: absolute;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(10px);
  min-width: 150px;
  text-align: center;
}
.matrix-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.matrix-tooltip-title {
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 4px;
  font-weight: 500;
}
.matrix-tooltip-value {
  font-size: 1rem;
  color: var(--text-primary, #111827);
  font-weight: 600;
}
body.dark-theme .matrix-tooltip {
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
body.dark-theme .matrix-tooltip-value {
  color: #fff;
}
body.dark-theme .matrix-tooltip-title {
  color: #94a3b8;
}

