/**
 * Alves Finança Familiar — Gráfico Donut em SVG (PRD §26-A Item 2)
 * Desenvolvido por Juliano Alves
 */

.donut-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-md) auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.donut-segment {
  fill: transparent;
  stroke-width: 24;
  transition: stroke-dasharray 600ms ease, stroke-dashoffset 600ms ease, stroke 300ms ease;
  cursor: pointer;
}

.donut-segment:hover {
  stroke-width: 28;
  opacity: 0.9;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-center-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.donut-center-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.donut-legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px var(--space-sm);
  border-radius: var(--radius-sm);
  background-color: var(--surface-sunken);
  transition: background-color 150ms ease;
}

.donut-legend-item:hover {
  background-color: var(--surface);
}

.donut-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
