body {
  margin: 0;
  padding: 0;

}

html,
body {
  height: 100%;
  background-color: white
}

#map {
  position: relative;
  bottom: 0;
  width: 100%;
  flex-grow: 1;
  height: 100%;
}

#container-menu-buttons {
  display: flex;
  flex-direction: column;
  height: calc(100%)
}


#container-legend-buttons {
  position: absolute;
  bottom: 140px;
  z-index: 1;
  width: 100%;
  pointer-events: none;
}


#map:focus {
  outline: none;
}

button:focus {
  outline: none;
}

button,
a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.mapboxgl-canvas:focus {
  outline: none;
}

#menubotones {
  padding: 0px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 3px 3px 3px #d0cccc;
}

.botonmapa {

  box-sizing: border-box;
  -moz-box-sizing: border-box;
  /* Firefox */
  width: 25%;
  float: left;
  font-family: 'Encode Sans', sans-serif;
  vertical-align: top;
  cursor: pointer;
  border: solid #d0cccc;
  border-width: 0px 1px 0px 1px;
  padding: 15px 15px;
  height: 100px;
  font-size: 13px;
}

section {
  width: 22%;
  margin: 0 auto;
  padding: 10px 10px;
  line-height: 18px;
  border-bottom: 1px solid #ddd;
  opacity: 1;
  font-size: 13px;
  background-color: rgba(255, 255, 255, 0.95);
  margin-bottom: 5px;
  margin-top: 5px;
  border: 1px solid #d0cccc;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Encode Sans', sans-serif;
  display: inline-block;
  height: 80px;
  vertical-align: top
}



p {
  font-size: 14px;
  margin-top: 5px;
  margin-bottom: 5px
}

h3 {
  font-size: 16px;
  margin-top: 5px;
  margin-bottom: 5px
}

#mapbox-tooltip-contenedor h3 {
  margin-bottom: 5px;
  margin-top: 5px;
  font-size: 14px
}

#mapbox-tooltip-contenedor .columna-datos {
  text-align: right;
  padding-bottom: 0px;
  padding-top: 0px;
  border-bottom: 1px solid #ddd;

}

#mapbox-tooltip-contenedor .primeracolumna {
  border-bottom: 1px solid #ddd;
  padding-bottom: 0px;
  padding-top: 0px;

}

#mapbox-tooltip-contenedor p {
  font-size: 12px
}

.mapbox-popup-contenedor {
  opacity: 1;
  font-family: 'Encode Sans', sans-serif;
  width: 280px;
  max-width: 300px !important;

}


.mapboxgl-popup-anchor-right {
  left: -15px
}

.mapboxgl-popup-anchor-bottom-right {
  left: -15px
}

.mapboxgl-popup-anchor-top-right {
  left: -15px
}

.mapboxgl-popup-anchor-bottom {
  top: -15px
}

.mapboxgl-popup-anchor-top {
  top: 20px;
}

.mapboxgl-popup-anchor-left {
  left: 15px
}

.mapboxgl-popup-anchor-bottom-left {
  left: 15px
}

.mapboxgl-popup-anchor-top-left {
  left: 15px
}

.mapboxgl-popup-close-button {
  font-size: 35px;
  background-color: #fff;
  border-radius: 35px;
  width: 35px !important;
  height: 35px !important;
  margin: 4px;
  line-height: 1;
  color: #000000 !important;
  border: 1px solid black;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px;
}


.mapboxgl-popup-content {
  box-shadow: 0 2px 2px 0 #ccc;
  border-radius: 0px;
  border: 1px solid #ccc
}

.mapboxgl-popup-tip {
  display: none
}

.geocoder {
  display: flex;
  z-index: 1;
  width: 100%;
  margin-top: 5px;
  margin-bottom: 5px;
  top: 20px;
  vertical-align: top;
  justify-content: center;


}




.mapboxgl-ctrl-geocoder {
  margin: 0 auto;
  font-family: 'Encode Sans', sans-serif;
}

.mapboxgl-ctrl-geocoder--input {
  font-size: 14px;
  font-family: 'Encode Sans', sans-serif;
  margin: 0 auto;
}

/* MENU */

*,
*:before,
*:after {
  box-sizing: border-box;
}

.buttons__item--active {
  background-color: #eeeaea;
  border-bottom: 2px solid #8e8e93;
  transition: background linear .5s;
}

.item__left {
  flex: 1;
  text-align: right;
}

.item__right {
  flex: 4;
  padding-left: 10px;
}

.item__left img {
  margin-top: 4px;
}

.item__title {
  font-family: 'Encode Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  margin-bottom: 6px;
  max-width: 172px;
}

.item__text {
  font-family: 'Encode Sans', sans-serif;
  font-size: 12px;
  margin: 0;
  max-width: 172px;
}

.btn-left,
.btn-right {
  display: flex;
  position: absolute;
  width: 30px;
  height: 100px;
  background-color: #ffffff;
  top: 0;
  border: none;
  justify-content: center;
  align-items: center;
}

.glide__slides {
  margin: 0;
  padding: 0 30px !important;
}

.glide__slide {
  display: flex;
  padding: 7px 7px;
  border-right: 1px solid #dedede;
  height: 100px !important;
  cursor: pointer;
}

.glide__arrows {
  z-index: 99;
  position: absolute;
  width: 30px;
  height: 100px;
  top: 0;
  box-shadow: 0px -1px 3px 0px #aaaaaa;
}

.glide__arrows:last-child {
  right: 0;
  box-shadow: -1px 0px 3px 0px #aaaaaa;
}

.glide__arrow {
  cursor: pointer;
}

.glide__arrow:hover {
  background-color: #c5c5c5
}

.glide__arrow:focus {
  outline: none;
}

.glide__arrow--left {
  position: absolute;
  left: 0;
}

.glide__arrow--right {
  position: absolute;
  right: 0;
}

.glide__arrow img {
  width:100%;
}

.glide {
  box-shadow: 0 0 15px 2px #ffffff;
}

.legend-menu {
  margin: 9px 13px 6px 0;
}

.legend-menu span {
  font-family: 'Encode Sans';
  font-size: 13px;
  font-weight: bold;
  margin-left: 10px;
  margin-right: 4px;
}



.legend-wrapper {
  position: relative;
  text-align: center;
}

.legend {
  display: flex;
  position: relative;
  justify-content: center;
  width: 100%;
  padding: 5px;
  border-radius: 5px;

}

.legend > div {
    width: fit-content;
    max-width: 300px;
}



.return-peninsula-button {
  z-index: 1;
  position: absolute;
  display: block;
  width: 50px;
  font-family: 'Encode Sans', sans-serif;
  border-radius: 10px;
  margin-left: 10px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .2);
  padding: 6px;
  outline: none;
  border: 0;
  box-sizing: border-box;
  background-color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  right: 10px;
  top: 80px
}


@media (min-width: 900px) {
  .glide__slide {
    margin: 0 !important;
    padding: 12px 10px;
  }

  .wrapper {
    position: relative;
  }

  .buttons {
    height: 100px;
    width: 100%;
    display: flex;
    flex-direction: row;
  }

  .buttons__item {
    display: flex;
    width: 300px;
    min-width: 300px;
    flex: unset;
  }

  #map {
    top: 0px;
  }




  #container-legend-buttons {
    flex-direction: row;
  }

  .legend-img {
    top: 0px;
    position: relative;
  }

  .legend {
    display: flex;
    position: relative;
    justify-content: right;
    right: 5px
  }

  .mapboxgl-ctrl-geocoder {
    margin: 0;
  }


}

@media (max-width: 900px) {

  .mapboxgl-ctrl-geocoder--input {
    font-size: 16px
  }

  .mapboxgl-popup {
    width: calc(100% - 30px);
    position: fixed;
    max-width: 975px !important;
    transform: none !important;
    top: auto;
    bottom: 10px;
    left: 15px;
    top: auto;
    z-index: 999;
  }

  #mapbox-tooltip-contenedor h3 {
    margin-bottom: 5px;
    margin-top: 5px;
    font-size: 15px
  }


  #mapbox-tooltip-contenedor p {
    font-size: 13px
  }

  .mapboxgl-popup-content {
    width: 100%
  }



  .return-peninsula-button {
    top: 80px;
    right: 10px;
    margin-left: 0px
  }



}

.tooltip-table {
  display: none
}


.tooltip-table--active {
  display: block
}



.flechaazul {
    background-image: url(https://lab.eldiario.es/elections-maps/mapas-catalunya-14f/leyendas/arrowgreen.svg);
    width: 10px;
    height: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
    display: inline-block;
}

.flecharoja {
    background-image: url(https://lab.eldiario.es/elections-maps/mapas-catalunya-14f/leyendas/arrowred.svg);
    width: 10px;
    height: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
    display: inline-block;
}

.flechaigual {
    background-image: url(https://www.eldiario.es/documentos/Cfakepathigualsvg_EDIFIL20191025_0005.svg);
    width: 10px;
    height: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
    display: inline-block;
}
