.barchart-container {
    position: relative;
}

.barchart-container-fixed-height {
    height: 500px;
}

@media all and (max-width: 480px) {
    .barchart-container-fixed-height {
        height: 320px;
    }
}

.barchart, .barchart * {
    box-sizing: border-box;
}

.barchart {
    width: 100%;
    height: 480px;
    height: 100vh;
    font-family: 'Courier New', Courier, monospace;
}

.barchart-fixed-height {
    height: 100%;
}

.barchart .bar-wrapper {
    fill: #aaa;
    opacity: 0.8;
    height: 21px;
    transition: fill .3s ease;
    cursor: pointer;
    font-family: Helvetica, sans-serif;
}

.barchart .bar-wrapper.bar-wrapper-faded {
    opacity: 1;
}

.barchart .bar-wrapper text {
    fill: #666;
    font-size: 0.8em;
    /*visibility: hidden;*/
}

.barchart .bar-wrapper text.bar-value-faded {
    fill: lightgray;
}

.barchart .bar-wrapper:hover,
.barchart .bar-wrapper:focus {
    opacity: 1;
}

.barchart .bar-wrapper:hover text,
.barchart .bar-wrapper:focus text {
    fill: black;
}

.barchart .bar-wrapper:hover text.bar-value-faded,
.barchart .bar-wrapper:focus text.bar-value-faded {
    stroke: lightgray;
}

.barchart .bar-wrapper.bar-wrapper-faded .bar {
    fill: #eee !important;
    opacity: 1;
    transition: all 2s;
}

.barchart .bar-wrapper.bar-wrapper-faded:hover,
.barchart .bar-wrapper.bar-wrapper-faded:focus {
    opacity: 1;
}

.barchart .bar-wrapper.bar-wrapper-faded:hover text,
.barchart .bar-wrapper.bar-wrapper-faded:focus text {
    fill: #666;
}
 
.barchart .grid-container {
    margin-left: 50px;
}

.barchart .grid {
    stroke: #888;
    stroke-dasharray: 1 2;
    stroke-width: 1;
}

.barchart .axis {
    stroke: #444;
    stroke-width: 2;
}

.barchart .label-y {
    transform: rotate(-90deg);
}

.barchart .label {
    font-weight: bold;
}

.barchart-container .categories, .barchart-container .values {

}

.barchart-container .categories .category, .barchart-container .values .value {
    position: absolute;
    display: inline-block;
    text-align: right;
}

.barchart-container .categories .category {
    border-radius: 0.5em;
    height: 40px;
    line-height: 40px;
    background-color: rgb( 192, 192, 192, 0.5 );
    transition: transform 0.3s;
}

.barchart-container-horizontal .categories .category {
    height: 30px;
    line-height: 30px;
    margin: 4px 0;
}

.barchart-container .categories .category.category-faded {
    color: lightgray;
}

.barchart-container .categories .category.category-dragover {
    border: 1px dotted black;
    background-color: rgb( 128, 128, 128, 0.5 );
}

.barchart-container .categories .category.category-filled {
    background-color: transparent;
    line-height: 15px;
    text-align: center;
}
.barchart-container-horizontal .categories .category.category-filled {
    text-align: right;
}

.barchart .reference-line {
    stroke-width: 2;
    stroke-dasharray: 4 2;
}

.barchart-container .legend-container {
    position: absolute;
    padding: 10px;
}

.barchart-container .legend-container-right {
    top: 0px;
    right: 0px;
    border-left:1px solid;
    border-bottom:1px solid;
}

.barchart-container .legend-container-bottom {

}

.barchart-container .legend-title {
    text-align: center;
}

.barchart-container .legend-category {
    overflow: auto;
    margin: 8px 0;
}

.barchart-container .legend-category[draggable="true"] {
    font-weight: bold;
}

.barchart-container .legend-color-box, .barchart-container .legend-category-text {
    display: inline-block;
    vertical-align: middle;
}

.barchart-container .legend-color-box {
    height: 10px;
    width: 10px;
    margin-right: 0px;
}

.barchart-container .legend-category-text {

}

/*
.draggable-container {
    position: absolute;
    padding: 10px;
}

.draggable-container-right {
    top: 240px;
    right: 20px;
}

.draggable-container-bottom {

}
*/

.draggable-container {
    margin: 12px 0;
}

.draggable-title {
    display: none;
    text-align: center;
}

.draggable-category {
    overflow: auto;
    display: inline-block;
    padding: 0 10px;
    margin: 6px 0;
    border-radius: 0.5em;
    background-color: #ccc;
    color: #777;
    z-index: 100000;
}

.draggable-category[draggable="true"] {
    font-weight: bold;
    background-color: #eee;
    color: black;
}

.draggable-category-text {
    display: inline-block;
    vertical-align: middle;
    padding: 5px 0;
    text-align: center;
    font-size: 0.8em;
}

.bar-selection {
    fill: lightgray;
    opacity: 0;
    cursor: pointer;
}

.bar-selection-hover:hover {
    opacity: 0.3;
}

.bar-selection.bar-selection-selected {
    opacity: 1;
}

.bar-actions {
    position: absolute;
}

.bar-actions-primary {
    top: 130px;
    right: 5px;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba( 128, 128, 128, 0.3 );
}

.bar-action {
    display: block;
    padding: 0.25em 0.4em;
    border: 1px solid transparent;
    border-radius: 0.25em;
    margin: 0.5em 0;
    font-size: 1.5em;
    line-height: 1;
    text-align: center;
    background-color: black;
    color: white;
    cursor: pointer;
    opacity: 0.75;
}

.bar-action-secondary {
    font-size: 0.8em;
}

.barchart-container-horizontal .bar-action-secondary {
    display: inline-block;
}

.bar-action:active {
    background-color: black;
    opacity: 1;
}

@media all and (max-width: 480px) {
    .barchart .axis {
        stroke-width: 1;
    }

    .barchart .label {
        font-size: 0.8em;
        font-weight: bold;
    }

    .barchart-container .categories, .barchart-container .values {
        font-size: 0.7em;
    }

    .barchart-container-vertical .categories .category.category-filled {
        transform: rotate( -45deg );
        text-align: right;
    }

    .barchart-container-vertical .values .value {
        margin-top: 4px;
        margin-left: 20px;
    }
    

    .barchart-container .legend-container-right {
        top: 0px;
        right: 0px;
        font-size: 0.8em;
    }

    .barchart-container .legend-category {
        margin: 2px 0;
    }    

    .bar-actions-primary {
        top: 0px;
        padding: 5px;
        right: 38%;

    }
    
    .bar-action {
        font-size: 1em;
        padding: 0.25em 0.4em;
        margin: 0.0em 0;
        font-size: 1.5em;
        display: inline-block;
    }   
}