/**
 * Version: 0.2
 * Author: Otto Salminen - 2020
 * Github: https://github.com/rotvalli/css-gauge
 * License: MIT
 */


 #title {

    margin: auto;
    width: 59%;
    min-width: 350px;
    border: 1px solid #1003;
    padding: 10px;
    box-shadow: 2px 3px 5px #fff;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    font-family: "Avenir";
    color: #170f0a;
    line-height: 2.2em;
}

#gaugeValue-demoGauge{

    cursor: pointer;
    left: 0;
    margin: auto;
    width: 50%

}

.gauge {
    position: relative;
    background: var(--gauge-bg);
    border: 10px solid #1003;
    border-radius: 50%;
    min-width: 200px;
    min-height: 200px;
    font-weight: 500;
    font-size: 30px
}

.gauge .ticks {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0
}

.gauge .ticks .min {
    
    background: rgb(16, 231, 9);
    position: relative;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1%;
    margin-bottom: -1%;
    background: linear-gradient(90deg, rgba(2, 0, 36, 0) 0, rgba(0, 0, 0, 0) 4%, #000 4%, #000 15%, rgba(0, 0, 0, 0) 15%);
    transform: rotate(-45deg)
}

.gauge .ticks .mid {
    background: rgb(230, 152, 6);
    position: relative;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1%;
    margin-bottom: -1%;
    background: linear-gradient(90deg, rgba(2, 0, 36, 0) 0, rgba(0, 0, 0, 0) 4%, #000 4%, #000 15%, rgba(0, 0, 0, 0) 15%);
    transform: rotate(90deg)
}

.gauge .ticks .max {
    background: rgb(245, 0, 0);
    position: relative;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1%;
    margin-bottom: -1%;
    background: linear-gradient(90deg, rgba(2, 0, 36, 0) 0, rgba(0, 0, 0, 0) 4%, #000 4%, #000 15%, rgba(0, 0, 0, 0) 15%);
    transform: rotate(225deg)
}

.gauge .ticks .tithe {
    transform: rotate(calc(27deg * var(--gauge-tithe-tick) - 45deg));
    position: relative;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1%;
    margin-bottom: -1%;
    background: linear-gradient(90deg, rgba(2, 0, 36, 0) 0, rgba(0, 0, 0, 0) 10%, #000 10%, #000 15%, rgba(0, 0, 0, 0) 15%)
}

.gauge .tick-circle {
    position: absolute;
    top: 15%;
    left: 15%;
    width: calc(70% - .1em);
    height: calc(70% - .1em);
    border-left: .1em solid green;
    border-top: .1em solid orange;
    border-right: .1em  solid red;
    border-bottom: .1em solid transparent;
    border-radius: 50%
}

.gauge .needle {
    transform: rotate(calc(270deg * calc(var(--gauge-value, 0deg)/ 100) - 45deg));
    background: #170f0a;
    position: relative;
    left: 0;
    top: 49%;
    width: 100%;
    height: 4%;
    margin-bottom: -4%;
    background: linear-gradient(90deg, rgba(2, 0, 36, 0) 0, rgba(0, 0, 0, 0) 24%, #170f0a 24%, #170f0a 30%, rgba(0, 0, 0, 0) 50%)
}

.gauge .needle .needle-head {
    position: relative;
    top: 15%;
    left: 22.5%;
    width: 2.7%;
    height: 70%;
    background-color: #170f0a;
    transform: rotate(-45deg)
}

.gauge .labels {
    position: absolute;
    width: 100%;
    height: 100%
}

.gauge .labels .value-label {
    position: relative;
    top: 75%;
    left: 50%;
    width: 10%;
    height: 0;
    border-radius: 3px;
    color: white
}

.gauge .labels .value-label::after {
    counter-reset: gauge-value var(--gauge-display-value);
    content: counter(gauge-value);
    text-align: right;
    float: right;
    width: 3em
}

.guide-x, .guide-y {
    background-color: orange;
    visibility: visible;
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%
}

.guide-y {
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px
}