:root {
  --color-spd: #E80A16;
  --color-union: #000000;
  --color-gruene: #409a3c;
  --color-afd: #0099cc;
  --color-fdp: #ffd520;
  --color-bsw: #650066;
  --color-linke: #cf2480;
  --color-andere: #aaaaaa;
}

* {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

.bg-th-main { background-color: #777; }
.bg-spd { background-color: var(--color-spd); }
.bg-union { background-color: var(--color-union); }
.bg-gruene { background-color: var(--color-gruene); }
.bg-fdp { background-color: var(--color-fdp); }
.bg-afd { background-color: var(--color-afd); }
.bg-linke { background-color: var(--color-linke); }
.bg-bsw { background-color: var(--color-bsw); }
.bg-andere { background-color: var(--color-andere); }

.fc-th-main { background-color: #777; }
.fc-spd { background-color: var(--color-spd); }
.fc-union { background-color: var(--color-union); }
.fc-gruene { background-color: var(--color-gruene); }
.fc-fdp { background-color: var(--color-fdp); }
.fc-afd { background-color: var(--color-afd); }
.fc-linke { background-color: var(--color-linke); }
.fc-bsw { background-color: var(--color-bsw); }
.fc-andere { background-color: var(--color-andere); }

body {
  font-family: Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.header {
  width: 100%;
  background-color: #a2d9ff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-container img {
  height: 70px;
  display: block;
}

.nav-container ul {
  list-style-type: none;
  display: flex;
  color: rgba(0,86,179,0.3);
  font-size: 12px;
  line-height: 16px;
}

.nav-container ul li a {
  color: #f6f6f6;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0 10px;
}

.container {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 15px;
}

.filter-wrapper {
  font-family: Verdana, sans-serif;
  margin: 20px auto;
  padding: 15px;
  background-color: #f6f6f6;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  text-align: left;
}

.filter-group label {
  margin-bottom: 5px;
  color: rgba(0,86,179,0.6);
  font-size: 0.8rem;
}

.filter-wrapper select,
.filter-wrapper input[type="date"] {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease-in-out;
  color: #0056b3;
}

.filter-wrapper button {
  font-family: Verdana, sans-serif;
  padding: 10px 15px;
  font-size: 0.8rem;
  background-color: #0056b3;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  max-height: 50px;
  margin-top: 25px;
}

.filter-wrapper button svg {
  height: 13px;
  width: 13px;
  padding-top: 2px;
  fill: #fff;
}

.filter-wrapper select:hover,
.filter-wrapper input[type="date"]:hover,
.filter-wrapper select:focus,
.filter-wrapper input[type="date"]:focus {
  border-color: #a2d9ff;
  box-shadow: 0 0 5px rgba(0,123,255,0.5);
}

.filter-wrapper button:hover {
  background-color: rgba(0,86,179,0.8);
}

.table-wrapper {
  margin: 30px 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

#surveyTable {
  width: 100%;
  table-layout: fixed;
  border-radius: 5px;
  font-size: 12px;
  font-weight: normal;
  border: none;
  border-collapse: collapse;
  white-space: nowrap;
  background-color: white;
}

#surveyTable td,
#surveyTable th {
  text-align: center;
  padding: 8px;
}

#surveyTable td {
  border-right: 1px solid #f8f8f8;
  font-size: 15px;
  color: #444;
}

#surveyTable thead th {
  color: #ffffff;
  border-right: solid 1px #fff;
}

#surveyTable thead th.date {
  width: 100px;
}

#surveyTable thead th.party {
  width: 80px;
}

#surveyTable tr:nth-child(even) {
  background: #F8F8F8;
}

#surveyTable td.party {
  text-align: right;
  margin-right: 20px;
}

#surveyTable td.surveydate,
#surveyTable td.institute,
#surveyTable td.parliament {
  text-align: left;
}

#surveyTable th.institute,
#surveyTable td.institute {
  width: 180px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#surveyTable th.parliament,
#surveyTable td.parliament {
  width: 190px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

#pagination {
  max-width: 400px;
  background-color: #fff;
  padding: 15px;
}

.pagination-container button {
  margin: 0 2px;
  padding: 7px 12px;
  border: 1px solid rgba(162,217,255,0.8);
  cursor: pointer;
  background: rgba(162,217,255,0.5);
  color: #0056b3;
}

.pagination-container button.active {
  font-weight: bold;
  background: #fff;
  border: solid 1px rgba(162,217,255,1);
}

.dawum {
  font-size: 0.8rem;
  color: #888;
  margin-top: 50px;
}

.dawum a {
  color: rgba(0,123,255,0.5);
  text-decoration: none;
}

.svg-wrapper {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  position: static;
  margin-top: 20px;
}

.svg-wrapper svg {
  width: 100%;
  height: auto;
  display: block;
}

.footer-nav {
  display: none;
  background-color: #a2d9ff;
  text-align: center;
  padding: 15px 0;
  color: #0056b3;
  font-size: 14px;
  font-family: Verdana, sans-serif;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  color: rgba(0,86,179,0.3);
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
}

/* Media Queries */
@media (min-width: 601px) {
  .nav-container { display: block; }
  .footer-nav { display: none; }
}

@media (max-width: 600px) {
  .filter-wrapper { justify-content: flex-start; }
  .filter-group { flex: 1 1 100%; }
  .filter-group.date-group { flex: 1 1 45%; }
  .filter-group button {margin-top: 10px;}
  .logo-container { margin: 0 auto; }
  .logo-container img { height: 50px; }
  .nav-container { display: none; }
  .footer-nav { display: block; }
}

@media (min-width: 1201px) {
  body { margin-bottom: 220px; }
  .svg-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    z-index: -1;
  }
}

@media (max-width: 1000px) {
  #surveyTable {
    display: block;
    width: 100%;
  }
  .table-wrapper:before {
    content: "Scroll horizontally >";
    display: block;
    text-align: right;
    font-size: 11px;
    color: white;
    padding: 0 0 10px;
  }
  #surveyTable thead,
  #surveyTable tbody,
  #surveyTable thead th {
    display: block;
  }
  #surveyTable thead th:last-child { border-bottom: none; }
  #surveyTable thead { float: left; }
  #surveyTable tbody {
    width: auto;
    position: relative;
    overflow-x: auto;
  }
  #surveyTable td,
  #surveyTable th {
    padding: 10px 0.625em 0.625em 0.625em;
    height: 40px;
    vertical-align: middle;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100px;
    font-size: 13px;
    text-overflow: ellipsis;
  }
  #surveyTable thead th { text-align: left; border-bottom: 1px solid #f7f7f9; }
  #surveyTable tbody tr { display: table-cell; }
  #surveyTable tbody tr:nth-child(odd) { background: none; }
  #surveyTable tr:nth-child(even) { background: transparent; }
  #surveyTable tr td:nth-child(odd) {
    background: #F8F8F8;
    border-right: 1px solid #E6E4E4;
  }
  #surveyTable tr td:nth-child(even) {
    border-right: 1px solid #E6E4E4;
  }
  #surveyTable tbody td { display: block; text-align: center; }
  #surveyTable thead th.institute,
  #surveyTable td.institute,
  #surveyTable thead th.parliament,
  #surveyTable td.parliament,
  #surveyTable thead th.party,
  #surveyTable td.party {
    width: 100px;
  }
}
