.pie-chart-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.pie-container {
    width: 250px;
    height: 250px;
    position: relative;
}

.pie-chart {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: conic-gradient(var(--pie-colors));
}

.pie-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    color: currentColor;
}

.pie-segment svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pie-segment.active {
    opacity: 0.7;
}

.pie-legend {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
    background: rgba(255,255,255,0.9);
    border: 1px solid #eee;
}

.pie-legend-item.active {
    background: #f5f5f5;
    transform: translateX(5px);
}

.pie-legend-color {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 4px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pie-legend-label {
    font-size: 14px;
    font-weight: 500;
}

/* Colori per i segmenti */
.color-1 { color: #5a7247; }
.color-2 { color: #8fb3aa; }
.color-3 { color: #d4b483; }
.color-4 { color: #e8d5b5; }
.color-5 { color: #a37c5d; }
.color-6 { color: #7a9cc6; }

.pie-legend-color.color-1 { background-color: #5a7247; }
.pie-legend-color.color-2 { background-color: #8fb3aa; }
.pie-legend-color.color-3 { background-color: #d4b483; }
.pie-legend-color.color-4 { background-color: #e8d5b5; }
.pie-legend-color.color-5 { background-color: #a37c5d; }
.pie-legend-color.color-6 { background-color: #7a9cc6; }
