﻿figure.graph-wrapper > figcaption {
    text-align: center;
    font-size: 1.4em;
    margin-bottom: 40px;
}


.graph.wide-graph {
    position: relative;
}

.histogram-canvas-wrapper.dragscroll {
    width: 100%;
    overflow: hidden;
    cursor: grab;
}

.graph-legend-inner {
    position: absolute;
    top: 0;
    right: 0;
}

.graph-legend {
    flex-direction: column;
    padding: 15px;
    background: rgba(245, 245, 245, 0.5);
    border-radius: 3px;      
}

.legend-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

span.legend-colour {
    width: 1em;
    height: 1em;
    display: inline-block;
    margin-right: 0.5em;
    border-radius: 3px;
    border: solid 2px transparent;
}

.legend-item.no-display > .legend-colour {
    background-color: #eee !important;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.graph-legend-wrapper {
    position: sticky;
    top: 165px;
}

.legend-item > * {
    pointer-events: none;
    user-select: none;
}


body.graph-printing > .mobile-header,
body.graph-printing > .header,
body.graph-printing > footer,
body.graph-printing .welcome-user,
body.graph-printing .subnavigation {
    display: none !important;
}


body.graph-printing .body-content {
    margin-top: 0;
}

body.graph-printing .graph-legend-wrapper {
    top: 0;
    position: relative;
}

.graph-legend-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

a.legend-btn {
    padding: 10px;
    background: #f5f5f5;
    border-radius: 3px;
    color: #212121;
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
    transition: all 0.15s;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}
    a.legend-btn:hover {
        background: #fafafa;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    }


@media print {
    .graph-legend-buttons {
        display: none;
    }
}