body {
  margin: 0;
  padding: 0;
}

a {
  cursor: pointer;
}

#globalcontent {
  margin: auto;
  max-width: 1200px;
  position: relative;
}

header {
  display: flex;
  height: 150px;
}

#mainset {
  width: 100%;
  position: relative;
  background-color: #f5f5f5;
  border-radius: 0 30px 0 30px;
}

nav {
  animation: intronav 0.5s ease-out;
  min-width: 180px;
  padding: 15px 0 0 15px;
}

.navandcontent {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

aside {
  animation: intromap 0.5s ease-out;
  height: auto;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

article {
  padding: 12px;
  color: black;
  font: 300 1em "Fira Sans Condensed", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

@keyframes intromap {
  0% {
    transform: rotateX(40deg) rotateZ(0) rotateY(-40deg) skew(10deg);
  }
  100% {
    transform: rotateX(0) rotateZ(0) rotateY(0) skew(0);
  }
}

@keyframes intronav {
  0% {
    transform: translateX(-500px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes introtitle {
  0% {
    color: white;
  }
  50% {
    color: white;
  }
  100% {
    color: #606060;
  }
}

@keyframes magnifierborder {
  0% {
    border: 1px solid white;
    width: 30px;
    color: rgba(0, 0, 0, 0);
  }
  40% {
    border: 1px solid white;
    width: 30px;
    color: rgba(0, 0, 0, 0);
  }
  70% {
    border: 1px solid grey;
    width: 100%;
    color: black;
  }
  90% {
    border: 1px solid grey;
    color: rgba(0, 0, 0, 0);
  }
  100% {
    border: 1px solid #dadada;
    width: 30px;
  }
}

header h1 {
  font: 200 1.8em "Fira Sans Condensed", Verdana, Sans-serif;
  padding: 0.5em 0 0 1.4em;
  margin: 0;
  color: #606060;
  animation: introtitle 1s ease-out;
  background: url("images/de.png") top 22px left no-repeat;
}

nav h2 {
  font: 600 1.2em "Fira Sans Condensed", Verdana, Sans-serif;
  padding-top: 1em;
  margin: 0;
  color: #606060;
}

nav h2:nth-of-type(1) {
  padding-top: 0;
}

nav h2:nth-of-type(3) {
  display: none;
}

nav input,
article input {
  display: none;
}

nav input:checked + label {
  font: 400 1em "Fira Sans Condensed", Verdana, Sans-serif;
  padding-left: 0;
}

nav input:checked + label:before {
  content: "✔";
  margin-right: 4px;
}

nav label {
  display: block;
  font: 300 1em "Fira Sans Condensed", Verdana, Sans-serif;
  padding: 1em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

nav label:hover {
  font: 600 1em "Fira Sans Condensed", Verdana, Sans-serif;
}

nav img {
  display: none;
}

article label {
  display: inline-block;
  border: 0 solid grey;
  border-left-width: 5px;
  cursor: pointer;
  color: #484848;
  width: 105px;
  padding: 5px;
  margin: 0 10px 10px 0;
  font: 300 1em "Fira Sans Condensed", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

article input:checked + label {
  background: white;
}

article label:hover {
  color: black;
  font: 400 1em "Fira Sans Condensed", sans-serif;
}

article #elec_details_title {
  font: 200 1.3em "Fira Sans Condensed", sans-serif;
  margin: 0 0 0.5em 0;
  padding: 0;
}

article #elec_details_mainChart {
  width: 200px;
  margin: auto;
  -webkit-tap-highlight-color: transparent;
}

article #elec_details_mainChart canvas {
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.donut_inner {
  margin: auto;
  text-align: center;
  width: 30%;
}

.donut_inner h4 {
  margin-bottom: 5px;
  margin-top: 0;
  font: 400 1.1em "Fira Sans Condensed", sans-serif;
}

.donut_inner h5 {
  font: 300 1em "Fira Sans Condensed", sans-serif;
  margin: 0;
  padding: 0;
}

.donut_inner h6 {
  font: 300 0.8em "Fira Sans Condensed", sans-serif;
  margin: 0;
  padding: 0;
}

article h5 {
  font: 600 1em "Fira Sans Condensed", sans-serif;
  margin: 0 0 0.5em 0;
  padding: 0;
  text-align: center;
}

article table {
  margin: auto;
  border-collapse: collapse;
  border: 1px solid white;
}

article table th {
  font: 400 1em "Fira Sans Condensed";
  text-align: right;
  color: #606060;
}

article table tr:nth-child(odd) {
  background: white;
}

article table tr td {
  padding: 0.3em;
}

article table.semicircle {
  min-width: 200px;
}

article table.results2018 {
  min-width: 100%;
}

article table.results2018 td:not(:first-child) {
  text-align: right;
}

article #elec_details h3 {
  color: #606060;
}

article #elec_details span {
  display: inline-block;
  margin: 5px 0;
}

article #elec_details span:nth-child(odd) {
  width: 80%;
}

article #elec_details span:nth-child(even) {
  width: 20%;
  text-align: right;
}

article #elec_details span.candidatelu,
article #elec_details td.candidatelu {
  font-weight: 400;
}

article #elec_details span.candidat_result_2013 {
  font: 200 0.8em "Fira Sans Condensed";
}

article #elec_details img {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 15px auto 0 auto;
  border-radius: 6px;
}

article #elec_details div.card {
  border-radius: 5px;
  width: 120px;
  height: 200px;
  display: inline-block;
  margin: 8px 8px 0 0;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-perspective: 600px;
  -moz-perspective: 600px;
  perspective: 600px;
  overflow: hidden;
}

article #elec_details div.card.flip {
  width: 248px;
}

article #elec_details div.card .front {
  float: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 900;
  width: inherit;
  height: inherit;
  background: white;
  border-radius: 5px;
}

article #elec_details div.card .front p:nth-of-type(1) {
  position: absolute;
  top: 133px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
  font: 400 0.85em "Fira Sans Condensed", sans-serif;
  width: 100%;
  min-height: 40px;
  padding: 0 5px;
  box-sizing: border-box;
}

article #elec_details div.card .front p:nth-of-type(2) {
  position: absolute;
  top: 143px;
  width: 17px;
  left: 5px;
  color: black;
  background: white;
  text-align: center;
  font: 300 0.85em "Fira Sans Condensed", sans-serif;
  border-radius: 50%;
}

article #elec_details div.card.flip .front {
  z-index: 900;
}

article #elec_details div.card .back {
  float: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 800;
  width: inherit;
  height: inherit;
  background: white;
  border-radius: 5px;
  overflow-y: auto;
  overflow-x: hidden;
}

article #elec_details div.card .back p {
  text-align: center;
  font: 300 0.8em "Fira Sans Condensed", sans-serif;
  padding: 3px;
  margin: 2px;
  word-wrap: break-word;
}

article #elec_details div.card .back p:first-child {
  font-weight: 700;
}

article #elec_details div.card .back p br {
  content: "";
  display: block;
  margin-bottom: 5px;
}

article #elec_details div.card .back p.portrait {
  text-align: left;
  line-height: 1.4em;
}

article #elec_details div.card .back a {
  text-decoration: none;
  color: #049cd3;
}

article #elec_details div.card .back a:hover {
  text-decoration: underline;
}

article #elec_details div.card.flip .back {
  z-index: 1000;
}

article #elec_details div.candidats2018 span {
  min-width: 80px;
  width: 20%;
  display: inline-block;
  text-align: left;
}

article #elec_details div.candidats2018 p {
  width: 40%;
  display: inline-block;
  text-align: left;
}

article #elec_details div.candidats2018 a {
  min-width: 100px;
  width: 40%;
  display: inline-block;
  color: black;
  text-decoration: none;
  border: 1px solid #606060;
  padding: 5px 0 5px 15px;
  margin-bottom: 5px;
  border-radius: 4px;
  position: relative;
  transition: background 0.3s ease;
}

article #elec_details div.candidats2018 a:hover {
  background: rgba(255, 255, 255, 0.8);
}

article #elec_details div.candidats2018 a:before {
  background: grey;
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  top: 7px;
  left: -8px;
  content: " ";
  font: 300 0.8em "Fira Sans Condensed";
}

article #elec_details div.candidats2018 a.partial:before {
  width: 12px;
  height: 12px;
  padding: 0 3px 6px 2px;
  background: #a9d2e8;
  content: "\1F552";
  color: white;
}

article #elec_details div.candidats2018 a.complete:before {
  width: 12px;
  height: 12px;
  padding: 0 3px 6px 2px;
  background: #4f95ba;
  content: "\2713";
  color: white;
}

article #elec_details div.candidats2018 a.csv:before {
  background: rgba(238, 124, 0, 1);
}

article #elec_details div.candidats2018 a.dp:before {
  background: rgba(0, 42, 84, 1);
}

article #elec_details div.candidats2018 a.lsap:before {
  background: rgba(194, 14, 26, 1);
}

article #elec_details div.candidats2018 a.adr:before {
  background: rgba(96, 166, 217, 1);
}

article #elec_details div.candidats2018 a.déilénk:before {
  background: rgba(112, 93, 70, 1);
}

article #elec_details div.candidats2018 a.déigréng:before {
  background: rgba(122, 186, 62, 1);
}

article #elec_details div.candidats2018 a.kpl:before {
  background: rgba(148, 19, 30, 1);
}

article #elec_details div.candidats2018 a.piratepartei:before {
  background: rgba(132, 18, 110, 1);
}

.fusion_details0,
.fusion_details1,
.fusion_details2,
.fusion_details3,
.list_details0,
.list_details1,
.list_details2,
.list_details3,
.list_details4,
.list_details5,
.list_details6,
.list_details7,
.list_details8,
.list_details9,
.list_details10 {
  display: none;
}

#elec_details > .fusion0:checked ~ .fusion_details0,
#elec_details > .fusion1:checked ~ .fusion_details1,
#elec_details > .fusion2:checked ~ .fusion_details2,
#elec_details > .fusion3:checked ~ .fusion_details3,
#elec_details > .list0:checked ~ .list_details0,
#elec_details > .list1:checked ~ .list_details1,
#elec_details > .list2:checked ~ .list_details2,
#elec_details > .list3:checked ~ .list_details3,
#elec_details > .list4:checked ~ .list_details4,
#elec_details > .list5:checked ~ .list_details5,
#elec_details > .list6:checked ~ .list_details6,
#elec_details > .list7:checked ~ .list_details7,
#elec_details > .list8:checked ~ .list_details8,
#elec_details > .list9:checked ~ .list_details9,
#elec_details > .list10:checked ~ .list_details10 {
  display: block;
}

#tooltip {
  position: absolute;
  display: none;
  text-decoration: none;
  top: 0;
  left: 0;
  z-index: 20;
  min-width: 20px;
  width: auto;
  padding: 2px;
  opacity: 0.9;
  background: #4a4a4a;
  border-radius: 3px;
  color: white;
  line-height: 1.4em;
  text-align: center;
  font: 300 1em "Fira Sans Condensed", Verdana, Sans-serif;
}

#azsearch {
  width: 30px;
  height: 30px;
  position: absolute;
  right: 0px;
  top: 100px;
  z-index: 20;
  border: 1px solid #dadada;
  border-radius: 4px;
  font: 400 0.8em "Fira Sans Condensed", sans-serif;
  text-align: center;
  padding-top: 6px;
  box-sizing: border-box;
  cursor: pointer;
}

#azsearch:hover {
  background: black;
  color: white;
}

#azsearchresults {
  text-align: right;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 0 4px 0 0;
  display: block;
  position: absolute;
  right: 0;
  top: 140px;
  z-index: 25;
  width: 150px;
}

#search {
  width: 145px;
  height: 120px;
  position: absolute;
  right: 50px;
  top: 100px;
  z-index: 20;
}

#search div:nth-of-type(1) {
  display: flex;
  justify-content: flex-end;
}

#searchfield {
  margin-left: 50px;
  text-align: right;
  width: 30px;
  font: 300 1em "Fira Sans Condensed", Verdana, Sans-serif;
  background: rgba(0, 0, 0, 0);
  border: 0px solid white;
  outline: 0;
  border: 1px solid #dadada;
  border-radius: 4px;
  box-sizing: border-box;
  padding: 5px;
  background: url("images/magnifier.png") top 5px left 5px no-repeat;
  margin: 0 0 10px 0;
  transition: width 0.5s ease-in, color 0.3s ease-out, border 0.5s ease;
  color: rgba(0, 0, 0, 0);
  clear: both;
  animation: magnifierborder 5s ease-out;
}

#searchfield:hover {
  width: 100%;
  color: black;
  border: 1px solid #303030;
  transition: width 0.3s ease-out, color 0.9s cubic-bezier(0.8, 0, 0.1, 1),
    border 0.5s ease;
}

#searchresults {
  text-align: right;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 0 4px 0 0;
}

#searchresults a,
#azsearchresults a {
  font: 300 1em "Fira Sans Condensed", Verdana, Sans-serif;
  margin-bottom: 8px;
  display: block;
  text-decoration: none;
  color: black;
}

#searchresults a:hover,
#searchresults a.selected,
#azsearchresults a:hover,
#azsearchresults a.selected {
  font-weight: 400;
}

.choropleth-commune path,
.choropleth-canton path,
.choropleth-circonscription path {
  stroke-width: 0.5px;
  -webkit-tap-highlight-color: transparent;
}

.standard {
  fill: #c0e4f7;
  stroke: #93b1ca;
}

.standardlive {
  fill: #fafdff;
  stroke: #93b1ca;
}

.egrey {
  fill: #e9e9e9;
  stroke: #dbdbdb;
}

.choropleth-commune path:focus,
.choropleth-commune path:hover,
.choropleth-canton path:focus,
.choropleth-canton path:hover,
.choropleth-circonscription path:focus,
.choropleth-circonscription path:hover {
  fill: #9ec9e0;
}

.completecity,
.completecirco {
  fill: #4f95ba;
}

.finishingcirco {
  fill: #6ba7c7;
}

.partialcity {
  fill: #c0e4f7;
}

.partialcirco {
  fill: #dceff9;
}

.midcirco {
  fill: #84bbd8;
}

.contour {
  fill: #049cd3 !important;
}
.gris {
  fill: #89847e;
  stroke: #ddd;
  transition: fill 0.3s;
}
.lsap {
  fill: #ce171f;
  stroke: #ddd;
  transition: fill 0.3s;
}
.csv {
  fill: #ee7c00;
  stroke: #ddd;
  transition: fill 0.3s;
}
.lsapcsv {
  fill: url(#lsapcsv);
  stroke: #ddd;
  transition: fill 0.3s;
}
.csvblanc {
  fill: url(#csvblanc);
  stroke: #ddd;
  transition: fill 0.3s;
}
.dp {
  fill: #3a4fa2;
  stroke: #ddd;
  transition: fill 0.3s;
}
.csvdp {
  fill: url(#csvdp);
  stroke: #ddd;
  transition: fill 0.3s;
}
.lsapdp {
  fill: url(#lsapdp);
  stroke: #ddd;
  transition: fill 0.3s;
}
.vertsdp {
  fill: url(#vertsdp);
  stroke: #ddd;
  transition: fill 0.3s;
}
.blancdp {
  fill: url(#blancdp);
  stroke: #ddd;
  transition: fill 0.3s;
}
.lsapverts {
  fill: url(#lsapverts);
  stroke: #ddd;
  transition: fill 0.3s;
}
.lsapcsvverts {
  fill: url(#lsapcsvverts);
  stroke: #ddd;
  transition: fill 0.3s;
}
.blanccsvverts {
  fill: url(#blanccsvverts);
  stroke: #ddd;
  transition: fill 0.3s;
}
.blanclsapverts {
  fill: url(#blanclsapverts);
  stroke: #ddd;
  transition: fill 0.3s;
}
.blancparti {
  fill: #f2f2f2;
  stroke: #ddd;
  transition: fill 0.3s;
}
.dpcsvverts {
  fill: url(#dpcsvverts);
  stroke: #ddd;
  transition: fill 0.3s;
}
.vertscsv {
  fill: url(#vertscsv);
  stroke: #ddd;
  transition: fill 0.3s;
}
.dplsapverts {
  fill: url(#dplsapverts);
  stroke: #ddd;
  transition: fill 0.3s;
}
.lsapkpl {
  fill: url(#lsapkpl);
  stroke: #ddd;
  transition: fill 0.3s;
}

.hidemap {
  display: none;
}

@media screen and (min-width: 830px) {
  aside {
    position: absolute;
    z-index: 10;
    width: 350px;
    height: 450px;
    left: 180px;
    top: -80px;
  }
  article {
    width: 100%;
    max-width: 300px;
    margin-top: 0;
  }
  .navandcontent {
    flex-direction: row;
  }
  #azsearch,
  #search {
    top: 10px;
  }

  #azsearchresults {
    top: 50px;
  }

  article #elec_details div.card {
    transition: all 0.4s cubic-bezier(0, 0, 0.01, 1);
  }

  /*
    article #elec_details div.card:hover {
		transform: rotateX(20deg) rotateZ(0) rotateY(-10deg) skew(-2deg);
		box-shadow: 6px 6px 30px 0px rgba(0,0,0,0.15);
    }
	
	article #elec_details div.card.flip:hover {
		transform: rotateX(0) rotateZ(0) rotateY(-0) skew(-0);
		box-shadow: none;
    }
	*/

  article #elec_details div.card .front {
    transform: rotateX(0deg) rotateY(0deg);
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: all 0.4s ease-in-out;
  }

  article #elec_details div.card.flip .front {
    transform: rotateY(180deg);
  }

  article #elec_details div.card .back {
    -webkit-transform: rotateY(-180deg);
    -moz-transform: rotateY(-179deg);
    transform: rotateY(-179deg);
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transition: all 0.4s ease-in-out;
    transition: all 0.4s ease-in-out;
  }

  article #elec_details div.card.flip .back {
    transform: rotateX(0deg) rotateY(0deg);
  }
}

@media screen and (min-width: 900px) {
  aside {
    width: 400px;
    height: 500px;
    top: -50px;
  }
  article {
    width: 100%;
    max-width: 350px;
  }
  nav img {
    display: block;
  }
  header h1 {
    font: 200 2em "Fira Sans Condensed", Verdana, Sans-serif;
  }
}

@media screen and (min-width: 1050px) {
  aside {
    width: 450px;
    height: 600px;
  }
  article {
    width: 100%;
    max-width: 400px;
  }
}

@media screen and (min-width: 1100px) {
  aside {
    width: 500px;
    height: 700px;
  }
  article {
    width: 100%;
    max-width: 450px;
  }
}

@media screen and (min-width: 1150px) {
  aside {
    left: 200px;
  }
}
