.collection-charts {
    display: block;

    @media screen and (min-width: $screen-sm-min) {
        display: flex;
    }

    // Each chart section within the panel
    @at-root #{&}__chart {
        @media screen and (min-width: $screen-sm-min) {
            flex: 0 0 33.33%;
            width: 33.33%;
        }
    }

    // The title above each chart
    @at-root #{&}__title {
        text-align: center;
        color: gray;
        font-size: 1.2rem;
        font-weight: 400;
    }

    // The chart canvas for chart.js to draw into.
    @at-root #{&}__canvas {
        height: 180px;
    }

    // Styles for the custom legend.
    @at-root #{&}__legend {
        margin: 20px auto;
        width: 80%;

        ul {
            padding: 0;
            list-style: none;
        }

        li {
            margin-left: 0;
            padding-left: 18px;
            text-indent: -18px;
        }

        .chart-legend-chip {
            display: inline;
            line-height: 18px;
            margin-right: 5px;
        }

        .chart-legend-label {
            display: inline;
            top: 0;
            line-height: 18px;
        }

        a {
            display: block;
            margin: 3px 0;
            padding: 0 3px;
            color: black;
            text-decoration: none;

            &:hover {
                background-color: #e0e0e0;
            }
        }
    }
}

.collection-sub-header {
    margin: -5px 0 15px;
    font-size: 1rem;
    font-weight: normal;
    color: #808080;
}

// For messages when no chart can be drawn.
.collection-no-chart {
    width: 100%;
    margin: 10px 0;
    text-align: center;
    color: gray;
    font-size: 1.1rem;
    font-style: italic;
}

// Heading for the collection panel
.collection-heading {
    display: flex;
    justify-content: space-between;

    h4 {
        flex: 0 1 auto;
    }

    @at-root #{&}__controls {
        margin: -5px;
        flex: 0 1 auto;
    }
}
