body {
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
  margin: 20px;
  overflow-x: hidden;
}

h1 {
  color: #204f5e;
  margin-bottom: 4px;
}

.dropdown {
  margin: 10px 0;
}

.dropdown label {
  font-weight: bold;
  margin-right: 5px;
}

#bool-checkboxes label,
#voting-method-checkboxes label,
#state-checkboxes label,
#dist-checkboxes label,
#cand-checkboxes label {
  display: inline-block;
  margin-right: 10px;
  font-weight: 400;
  cursor: pointer;
}

.image-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 15px;
  width: 100%;
  margin-top: 30px;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

.table-container table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  max-width: 900px;
}

.table-container th,
.table-container td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.image-block {
  width: 100%;
  /* max-width: 600px; */
  word-wrap: break-word;
}

.image-block img {
  width: 100%;
  max-width: 600px;
  display: block;
  margin-bottom: 5px;
}

.site-header {
  margin-bottom: 20px;
  margin-top: -20px;
  margin-left: -20px;
  width: 100vw;
}

.tab-nav {
  display: flex;
  background-color: #70a0af8a;
}

.tab-nav .tab {
  padding: 12px 20px;
  text-decoration: none;
  color: #333;
}

.tab-nav .tab:last-child {
  border-right: none;
}

.tab-nav .tab.active {
  background-color: #ffffff;
  font-weight: bold;
}

.select-unselected {
  border: 2px solid rgb(217, 46, 46);
}

select {
  border-radius: 3px;
  padding: 2px 4px;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
}

input {
  cursor: pointer;
}

#states {
  display: none;
}

#search-button {
  padding: 8px 12px;
  font-size: 1em;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 5px;
  background-color: #6396a6;
  border: none;
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
}

input[type="checkbox"]:checked + label,
label:has(input[type="checkbox"]:checked) {
  font-weight: 800 !important;
  color: #6396a6;
}

.description-box {
  position: relative;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px;
  background-color: #f9f9f9;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  color: #333;
  transition: opacity 0.5s ease, max-height 0.5s ease, padding 0.5s ease,
    margin 0.5s ease;
  box-shadow: 5px 10px 10px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
}

.description-box p {
  margin: 0;
}

.description-box.hidden {
  opacity: 0;
  max-height: 0;
  padding: 0 15px;
  margin: 0;
}

.close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 30;
  display: block;
  border-radius: 5px;
  border: 1px dashed;
  background-color: #dce8eb;
}

.toggle-btn {
  padding: 6px 12px;
  border: 1px dashed;
  background-color: #95bbc5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.toggle-btn:hover {
  background-color: #6396a6;
}

.showMetaButton {
  padding: 8px 14px;
  background: #6396a6;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
}

.overview-tabs {
  margin-bottom: 20px;
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.overview-tabs a {
  font-family: "Space Grotesk", sans-serif;
  padding: 10px 16px;
  border: none;
  background-color: #eaf1f3;
  border-radius: 5px;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.overview-tabs .active {
  background-color: #204f5e;
  color: white;
}
