:root {
  --primary-color: #1a212e;
  --secondary-color: #54b0fd;
  --accent-color: #efbd5d;
  --background-color: #f4f4f4;
  --text-color: #333;
}

body {
  font-family: Inter, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--background-color);
  color: var(--text-color);
}

header {
  background-color: var(--primary-color);
  color: var(--background-color);
  text-align: center;
}

footer {
  background-color: var(--primary-color);
  color: var(--background-color);
  padding: 2px 0;
  text-align: center;
}

footer a {
  color: var(--background-color);
  text-decoration: none;
}

footer a:visited {
  color: var(--secondary-color);
}

footer a:hover,
footer a:active {
  color: var(--accent-color);
}

.title {
  background: url("/images/Bundeshaus_Nationalratsratssaal.jpg") no-repeat
    center center;
  background-color: var(--primary-color);
  background-blend-mode: multiply;
  background-size: cover;
  padding: 100px 0;
}

nav {
  background-color: var(--primary-color);
  padding: 15px 0;
  /* text-align: left; */
  position: fixed;
  top: 0px;
  width: 100%;
  z-index: 999;
}

nav a {
  display: block;
  color: var(--background-color);
  text-decoration: none;
  padding: 5px 10px;
  margin: 0 10px;
}

nav a:hover {
  color: var(--accent-color);
}

#repo_link {
  float: right;
}

/* Hide Checkbox */
#toggle {
  display: none;
}

/* Hamburger Icon */
#home label {
  display: none;
  padding: 15px;
  background-color: var(--primary-color);
  color: var(--background-color);
  cursor: pointer;
  position: fixed;
  top: 0px;
  right: 0px;
}

/* Responsive styling */
@media screen and (max-width: 600px) {
  /* Show the hamburger icon */
  #home label {
    display: block;
  }

  /* Initially hide the navigation links */
  nav {
    display: none;
  }

  /* Display navigation links when toggle is checked */
  #toggle:checked + nav {
    display: block;
  }
}

@media screen and (min-width: 601px) {
  /* Horizontal layout for larger screens */
  nav a {
    float: left; /* This makes the links align horizontally */
  }

  /* Since the nav is always visible on larger screens, hide the toggle elements */
  #toggle,
  #home label {
    display: none;
  }

  nav {
    display: block; /* Ensure nav is always visible on larger screens */
  }
}

hr {
  color: var(--secondary-color);
  margin: 30px 0;
}

#legend li {
  list-style-type: none; /* Remove default bullets */
  padding-left: 20px; /* Ensure space for custom bullet */
  padding-bottom: 10px;
}

/* Create custom bullet  */
#legend li:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--bullet-color, blue);
  border-radius: 50%; /* Round shape */
  margin-right: 10px; /* Spacing between bullet and text */
  vertical-align: middle; /* Align bullet with text */
}

/* Make the page responsive */
section {
  /* Source of computation: https://matthewjamestaylor.com/responsive-padding */
  padding: 50px calc(8px + 15vw);
}

figure {
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
}

#visu_section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row;
}

svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 -14px;
  background: var(--background-color);
}

.tooltip {
  position: absolute;
  background-color: var(--background-color);
  border: solid 1px;
  border-radius: 5px;
  padding: 10px;
  font-size: 14px;
  pointer-events: none; /* Tooltip should not interfere with mouse events */
}

#party_repartition {
  background-color: var(--primary-color);
  color: var(--background-color);
}

#party_repartition svg {
  background: var(--primary-color);
  margin-top: 50px;
}

/* Dropdown with search: */
/* Inspiration: https://youtu.be/R4owT-LcKOo */
.select-box {
  margin-top: 10px;
  margin-bottom: 10px;
  width: 380px;
  position: relative;
}

.select-options {
  position: relative;
}

.select-options input {
  width: 100%;
  background: var(--background-color);
  color: var(--text-color);
  border: 1px solid var(--secondary-color);
  border-radius: 5px;
  cursor: pointer;
  /* font-size: 22px; */
  padding: 15px 20px;
}

/* Down arrow */
.select-options:after {
  content: "";
  border-top: 12px solid var(--text-color);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  position: absolute;
  right: 0px;
  top: 50%;
  margin-top: -8px;
}

.content {
  background: var(--background-color);
  position: absolute;
  color: var(--text-color);
  border-radius: 5px;
  border: 1px solid var(--secondary-color);
  margin-top: 15px;
  width: 100%;
  z-index: 999;
  padding: 20px;
  display: none; /* Initially hidden */
}

.search input {
  width: 100%;
  /* font-size: 17px; */
  padding: 15px 5px;
  /* outline: 0; */
  border: 1px solid var(--secondary-color);
  border-radius: 5px;
}

.options {
  margin-top: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding: 0px;
}

.options li {
  padding: 10px 20px;
  /* font-size: 20px; */
  cursor: pointer;
  border-bottom: 1px solid var(--secondary-color);
}

.options li:hover {
  background: var(--secondary-color);
  color: var(--background-color);
  border-radius: 5px;
}

/* Handle when the select box is active */
.select-box.active .content {
  display: block;
}

.select-box.active .select-options:after {
  transform: rotate(180deg);
}

/* Custom toggle */
/* Source: https://www.w3schools.com/howto/howto_css_switch.asp */
/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--secondary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--secondary-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
