/* Animated Pie Chart Styles */

.pie-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin: 48px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.pie-chart-container.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.pie-chart-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
}

.pie-chart {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1 / 1;
}

.pie-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  max-width: 100%;
}

.pie-segment {
  transform-origin: center;
  transition: transform 0.2s ease;
}

.pie-segment:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

/* Label styles */
.pie-label {
  font-size: 24px;
  font-weight: 600;
  fill: white;
  pointer-events: none;
}

.pie-label-line {
  stroke: #999;
  stroke-width: 1.5;
  fill: none;
  opacity: 0.6;
}

/* Legend styles */
.pie-chart-legend {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 200px;
}

.pie-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  color: #333;
  font-weight: 500;
}

.pie-chart-legend-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pie-chart-legend-dot.red {
  background: #d84343;
}

.pie-chart-legend-dot.gray {
  background: #8b8b8b;
}

.pie-chart-legend-dot.light-gray {
  background: #c4c4c4;
}

/* Caption text */
.pie-chart-caption {
  text-align: center;
  color: #666;
  font-size: 16px;
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto;
}

/* Responsive design */
@media (max-width: 1024px) {
  .pie-chart-wrapper {
    gap: 60px;
  }

  .pie-chart {
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .pie-chart-wrapper {
    flex-direction: column;
    gap: 40px;
  }

  .pie-chart {
    max-width: 260px;
  }

  .pie-chart-legend {
    align-items: center;
  }

  .pie-chart-legend-item {
    font-size: 18px;
  }

  .pie-label {
    font-size: 20px;
  }
}
