//
// chartist.scss
//

.ct-golden-section:before {
    float: none;
}

.ct-chart {
    max-height: 300px;
    .ct-label {
        fill: #{map-get($grays, "500")};
        color: #{map-get($grays, "500")};
        font-size: 12px;
        line-height: 1;
    }
}

.ct-chart.simple-pie-chart-chartist {
    .ct-label {
        color: $white;
        fill: $white;
        font-size: 16px;
    }
}

.ct-grid {
    stroke: #{rgba(map-get($grays, "900"),0.15)};
}

.ct-chart {
    .ct-series {
        &.ct-series-a {
            .ct-bar,
            .ct-line,
            .ct-point,
            .ct-slice-donut {
                stroke: $purple;
            }
        }
        &.ct-series-b {
            .ct-bar,
            .ct-line,
            .ct-point,
            .ct-slice-donut {
                stroke: $pink;
            }
        }
        &.ct-series-c {
            .ct-bar,
            .ct-line,
            .ct-point,
            .ct-slice-donut {
                stroke: $warning;
            }
        }
        &.ct-series-d {
            .ct-bar,
            .ct-line,
            .ct-point,
            .ct-slice-donut {
                stroke: $info;
            }
        }
        &.ct-series-e {
            .ct-bar,
            .ct-line,
            .ct-point,
            .ct-slice-donut {
                stroke: #{map-get($grays, "900")};
            }
        }
        &.ct-series-f {
            .ct-bar,
            .ct-line,
            .ct-point,
            .ct-slice-donut {
                stroke: $primary;
            }
        }
        &.ct-series-g {
            .ct-bar,
            .ct-line,
            .ct-point,
            .ct-slice-donut {
                stroke: $success;
            }
        }
    }
}


.ct-series-a {
    .ct-area,
    .ct-slice-pie {
        fill: $primary;
    }
}

.ct-series-b {
    .ct-area,
    .ct-slice-pie {
        fill: $pink;
    }
}

.ct-series-c {
    .ct-area,
    .ct-slice-pie {
        fill: $info;
    }
}

.ct-series-d {
    .ct-area,
    .ct-slice-pie {
        fill: $purple;
    }
}

.ct-area {
    fill-opacity: .33;
}

.chartist-tooltip {
    position: absolute;
    display: inline-block;
    opacity: 0;
    min-width: 10px;
    padding: 2px 10px;
    border-radius: 3px;
    background: #{map-get($grays, "900")};
    color: #{map-get($grays, "100")};
    text-align: center;
    pointer-events: none;
    z-index: 1;
    transition: opacity .2s linear;
    &.tooltip-show {
        opacity: 1;
    }
}


// dark mode
body[data-layout-color="dark"] {
    .ct-chart {
        .ct-label {
            fill: #{map-get($dark-grays, "500")};
            color: #{map-get($dark-grays, "500")};
        }
    }
    .ct-grid {
        stroke: #{rgba(map-get($dark-grays, "800"),0.15)};
    }
    .ct-chart {
        .ct-series {
            &.ct-series-e {
                .ct-bar,
                .ct-line,
                .ct-point,
                .ct-slice-donut {
                    stroke: #{map-get($dark-grays, "800")};
                }
            }
        }
    }
    .chartist-tooltip {
        background: #{map-get($dark-grays, "800")};
        color: #{map-get($dark-grays, "300")};
    }
}