* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f9f9f9;
  color: #1c1c1c;
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

h4 {
  text-align: center;
  margin-bottom: 30px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.filters .filter-group {
  flex: 1 1 200px;
}

input, select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

thead {
  background-color: #eee;
}

th, td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

a.btn {
  padding: 6px 12px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
}

a.btn:hover {
  background: #555;
}

.custom-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 20px;
  gap: 6px;
}

.custom-pagination a {
  padding: 6px 12px;
  text-decoration: none;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  transition: background 0.2s;
}

.custom-pagination a:hover {
  background: #f0f0f0;
}

.custom-pagination a.active {
  background: #333;
  color: #fff;
  border-color: #333;
}


.page-btn {
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background-color: #f5f5f5;
}

.page-btn.active {
  background-color: #333;
  color: #fff;
  border-color: #333;
  font-weight: bold;
  pointer-events: none;
}
/* Wrap table in scrollable box on smaller screens */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #ddd;
  border-radius: 6px;
}
input[type="text"],
select {
  width: 100%;
  padding: 10px;
  height: 42px; /* Standard height for dropdowns */
  box-sizing: border-box;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  appearance: none;
}
input[type="number"],
input[type="search"],
input[type="date"] {
  width: 100%;
  padding: 10px;
  height: 42px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}


tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

tr.clickable-row:hover {
  background-color: #f5f5f5;
}

/* Responsive filters on narrow screens */
@media (max-width: 700px) {
  .filters {
    flex-direction: column;
    gap: 12px;
  }

  .filters .filter-group {
    flex: 1 1 100%;
  }

  h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 8px;
  }

  .custom-pagination {
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
  }

  .page-btn {
    min-width: 34px;
    font-size: 13px;
    padding: 6px 10px;
  }

  a.btn {
    padding: 5px 10px;
    font-size: 13px;
  }
	  td[data-party]::before {
    content: attr(data-party);
  }

  td[data-chamber]::before {
    content: attr(data-chamber);
  }

  td[data-party],
  td[data-chamber] {
    font-size: 0; /* hide original text */
    position: relative;
  }

  td[data-party]::before,
  td[data-chamber]::before {
    font-size: 14px; /* restored readable text */
    white-space: nowrap;
  }

  td[data-party]::before {
    content: attr(data-party);
  }

  td[data-party][data-party="Democratic"]::before {
    content: "Dem";
  }

  td[data-party][data-party="Republican"]::before {
    content: "Rep";
  }

  td[data-party][data-party="Independent"]::before {
    content: "Ind";
  }

  td[data-chamber][data-chamber="House"]::before {
    content: "H";
  }

  td[data-chamber][data-chamber="Senate"]::before {
    content: "S";
  }
	
	  tr.clickable-row {
    position: relative;
  }

  tr.clickable-row::after {
    content: '›';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 18px;
    pointer-events: none;
  }

  td:last-child {
    padding-right: 24px; /* avoid overlap with the arrow */
  }
}

