@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

a, a:active, a:hover, a:link, a:visited {
  text-decoration: none
}

html, body {
  height: 100%;
}

html {
  font-size: 100%;
  line-height: 1.5em;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%
}

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 16px;
}

#load {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 999;
  background-color: rgba(9, 9, 24, 1);
  background-image: url(../imgs/load.gif);
  background-repeat: no-repeat;
  background-position: center;
}

#error {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  color: #7d8db9;
  background-color: rgba(9, 9, 24, 1);
}

#error h1 {
  font-weight: 400;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.mapboxgl-popup-content {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  color: #fff;
  background-color: rgba(9, 9, 24, 0.95);
}

.mapboxgl-popup-tip {
  border-top-color: rgba(9, 9, 24, 0.95) !important;
}

.mapboxgl-popup-close-button {
  display: none;
}

#wrap {
  /*opacity: 0;*/
  text-align: center;
  z-index: 998;
  transition: opacity 0.3s;
}

#top {
  position: relative;
  display: inline-flex;
  top: 40px;
}

#top .name-cont {
  display: inline-flex;
  flex-direction: column;
  padding: 4px 16px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.85);
}

#top .name {
  font-size: 22px;
  color: #3b3b3b;
}

#top .tot {
  display: none;
  color: #696969;
  font-size: 22px;
  font-weight: 400;
}

#top .clrbar {
  position: relative;
  display: inline-flex;
  padding: 4px;
}

#top .clrbar .txt-cont {
  font-size: 12px;
  font-weight: 500;
  color: #5c5c5c;
  margin:0 2px;
}
#top .clrbar .txt-cont > div {
  display: inline-flex;
}
#top .clrbar .box {
  width: 10px;
  height: 10px;
  margin: 0 4px;
  background-color: blue;
}

#top .clrbar>div:nth-child(n+4) .box{
  background-color: red;
}

#initial, #bottom {
  position: absolute;
  display: inline-flex;
  left: 50%;
  bottom: 40px;
  z-index: 999;
  transform: translateX(-50%);
}

.box-cont {
  position: relative;
  flex-direction: row;
  display: flex;
  justify-content: space-evenly;
}

.box-cont .box {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 4px;
  margin: 0 24px;
  background-color: rgba(255, 255, 255, 0.85);
}

.box-cont .box .name {
  font-size: 20px;
  margin-bottom: 16px;
  color: #3b3b3b;
}

.box-cont .box.active {

}

#initial .box-cont .box .name {
  margin-bottom: 0;
}

#bottom .box-cont .box .vote-cont {
  position: relative;
  display: flex;
  justify-content: space-between;
}

#bottom .box-cont .box .vote-cont>div {
  font-size: 22px;
}

#bottom .box-cont .box .vote-cont .vote {
  color: #696969;
}

#bottom .box-cont .box .perc-g {
  color: #00b300;
}

#bottom .box-cont .box .perc-r {
  color: #f54242;
}

#bottom .box-cont .box .bar-cont {
  position: relative;
  padding: 16px 0;
  min-width: 240px;
}

#bottom .box-cont .box .bar-cont>div {
  position: absolute;
  height: 4px;
}

#bottom .box-cont .box .bar-cont .fill {
  z-index: 2;
  background-color: #4466f4;
  /*background-image: linear-gradient(to right, rgba(255,0,0,0), rgba(255,0,0,1));*/
}

#bottom .box-cont .box .bar-cont .bar {
  width: 100%;
  background-color: #d6d6d6;
}

#bottom .box-cont .box .btm-txt {
  font-weight: 400;
  color: #6d6e70;
}

/* Tablet */
@media (max-width: 992px) {
  #top {
    top: 20px;
  }
  #bottom {
    bottom: 20px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  #top {
    top: 10px;
  }

  #top .name, #top .tot {
    font-size: 20px;
  }

  #top .name-cont {
    padding: 8px;
    margin-right: 40px;
  }

  #initial .box-cont .box {
    margin: 0 8px;
    flex-grow: 1;
  }

  #bottom {
    bottom: 16px;
    width: 100%;
  }

  #bottom .box-cont {
    width: 100%;
  }

  #bottom .box-cont .box {
    margin: 0 4px;
    flex-grow: 1;
    flex-basis: 0;
  }
  #bottom .box-cont .box:first-child{
    margin-left: 8px;
  }
  #bottom .box-cont .box:last-child{
    margin-right: 8px;
  }

  #bottom .box-cont .box .name {
    font-size: 20px;
  }

  #bottom .box-cont .box .vote-cont>div {
    font-size: 18px;
  }

  #bottom .box-cont .box .bar-cont {
    min-width: 140px;
    padding: 8px 0;
  }

  #bottom .box-cont .box .btm-txt {
    font-size: 14px;
  }
}
