/* Savings Chart */
.savings-chart {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 3rem;
    height: 200px;
    margin: 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100px;
    height: 100%;
}

.chart-bar {
    width: 70px;
    /* Slightly wider */
    /* Remove old background/border */
    background: transparent;
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: height 1s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Stack from bottom? No, we want top-down for Energy -> Dist */
    /* Actually structure is: Val, Energy, Dist. We want Energy on Top? Or Dist on Top?
       Usually Energy on Top.
       So flex-direction: column in HTML order: Val, Energy, Dist. */
    align-items: center;
    overflow: visible;
    /* Allow Value to stick out if needed */
}

.chart-val {
    position: absolute;
    top: -25px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    width: 100%;
    text-align: center;
}

.bar-segment {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}

.seg-label {
    pointer-events: none;
    z-index: 1;
}

/* Round top corners of the top segment (Energy) */
.bar-segment.energy {
    border-radius: 8px 8px 0 0;
}

/* Borders */
.g11 .chart-bar {
    box-shadow: 0 0 15px rgba(255, 59, 59, 0.1);
}

.g12 .chart-bar {
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

/* G11 Segments */
.g11 .bar-segment.energy {
    background: linear-gradient(to bottom, rgba(255, 59, 59, 0.9), rgba(255, 59, 59, 0.6));
    border: 1px solid rgba(255, 59, 59, 0.8);
    border-bottom: none;
}

.g11 .bar-segment.dist {
    background: rgba(180, 40, 40, 0.5);
    border: 1px solid rgba(255, 59, 59, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* G12 Segments */
.g12 .chart-val {
    color: #fff;
    /* Keep white for consistency? Or black if bar is light? Bar is green. */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.g12 .bar-segment.energy {
    background: linear-gradient(to bottom, var(--accent-color), rgba(0, 255, 136, 0.6));
    border: 1px solid var(--accent-color);
    border-bottom: none;
    color: #000;
    font-weight: 600;
}

.g12 .bar-segment.dist {
    background: rgba(0, 150, 80, 0.4);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}