/** Gauge styles 2021-05-14 **/
/* TODO: mabye add css variables for backgrounds? */
.gauge-wrapper {
  margin: 0.75rem 0;
  width: 4rem;
  position: relative;
}

.gauge {
  width: 100%;
  max-width: 250px;
  display: flex;
  margin: auto;
  justify-content: center;
  align-items: center;
  border: 2px solid #dadada;
  background: #dadada;
  border-top-left-radius: 100% 200%;
  border-top-right-radius: 100% 200%;
}
  
.gauge-body {
  width: 100%;
  height: 0;
  padding-bottom: 50%;
  background: royalblue;
  background: #dadada;
  position: relative;
  border-top-left-radius: 100% 200%;
  border-top-right-radius: 100% 200%;
  overflow: hidden;
  /* Fix for iOS bug not obeying rule overflow: hidden. */
  -webkit-mask: -webkit-radial-gradient(circle, #fff, #000);
}
  
.gauge-fill {
  position: absolute;  
  top: 100%;
  left: 0;
  width: inherit;
  width: 110%;
  height: 110%;
  background: #d9863a;
  transform-origin: center top;
  transform: rotate(90deg);
  transition: transform 0.2s ease-out;
}

.gauge-fill.minimal {
  background: #b22222;
}
  
.gauge-fill.optimal {
  background: #32cd32;
}

.gauge-fill.above-average {
  background: gold;
}

.gauge-wrapper.zero-value::before {
  content: "/";
  position: absolute;
  width: 2rem;
  display: flex;
  justify-content: center;
  font-weight: bold;
  color: #b22222;
  font-size: 2.75rem;
  padding: 0;
  top: -1.5rem;
  left: 1rem;
  z-index: 2;
}

.gauge-fill.zero-value {
  background: grey;
}
  
.gauge-cover {
  width: 75%;
  height: 150%;
  position: absolute;
  border-radius: 50%;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  background: azure;
  background: #303030;
  
  /* Text */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box; 
  padding-bottom: 25%;
}

.gauge-label {
  text-align: center;
  white-space: nowrap;
}

/* THICK */ 

.thick .gauge-cover {
  width: 35%;
  height: 70%;
  top: 70%;
}

/* NEEDLE */
.needle .gauge-body {
  background: #303030;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.needle .gauge-fill {
  border-top: 3px solid forestgreen;
  background: #303030;
}

.needle .gauge-cover {
  background: #303030;
  /*
  width: 49%;
  */
  height: 78%;
  top: 89%;
}

/* FULL */
/*
.full .gauge-cover {
  display: none;
}

.full .gauge-body {
  border: 2px solid #dadada;
  background-color: #202020;
}

.full .gauge-fill {
  background: #202020;
  border: 4px solid forestgreen;
}
*/

/* SMALL */
.gauge-wrapper {
  flex-flow: column;
  font-size: 0.754rem;
}

.gauge.small {
  width: 2.5rem;
}

.small .gauge-cover {
  font-size: 0.75rem;
}

/* ARCH */
.gauge.arch .gauge-body {
  background: #cacaca;
  border-color: #aaa;
}