.search-results-filters {
  grid-template-columns: minmax(0, 1.8fr) minmax(140px, 220px) auto;
}

.search-results-query input {
  font-size: 15px;
}

.search-results-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-start;
  height: 100%;
}

.search-results-btn {
  height: 36px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-results-btn:hover {
  background: #e8ecf5;
  color: #1c335f;
  border-color: #cdd4e0;
}

.search-results-btn-primary {
  background: #1c335f;
  border-color: #1c335f;
  color: #fff;
}

.search-results-btn-primary:hover {
  background: #284a86;
  border-color: #284a86;
  color: #fff;
}

.search-results-sections {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  min-height: 320px;
}

.search-results-sections.is-updating {
  opacity: 0.88;
  transition: opacity 0.12s ease;
}

.search-results-context {
  margin-top: 10px;
}

#searchResultsPagination {
  min-height: 34px;
}

.search-context-card {
  border: 1px solid #d9deea;
  background: #f8faff;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.search-context-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.search-context-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a68;
}

.search-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #344d7a;
  background: #edf2ff;
  border: 1px solid #d2dcf7;
  border-radius: 999px;
  padding: 3px 8px;
}

.search-context-chip-history {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.search-context-notes {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 12px;
  color: #5b6473;
  display: grid;
  gap: 4px;
}

.search-context-helper {
  border-top: 1px solid #e3e8f2;
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.search-context-helper-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f3d72;
}

.search-context-helper-copy {
  font-size: 13px;
  color: #4b5563;
}

.search-context-helper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-results-section {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.search-results-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

.search-results-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-results-section-meta {
  font-size: 12px;
  color: #6b7280;
}

.search-results-table-wrapper {
  overflow-x: auto;
}

.search-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.search-results-table th,
.search-results-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.search-results-table th {
  background: #f9fafb;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.search-results-table tr:last-child td {
  border-bottom: 0;
}

.search-results-table tr.clickable-row {
  cursor: pointer;
}

.search-results-table tr.clickable-row:hover {
  background: #eef2ff;
}

.search-bill-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-congress-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #d5dbe8;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #40546f;
}

.search-congress-badge-current {
  color: #1f3d72;
  border-color: #ccdaf5;
  background: #eff5ff;
}

.search-congress-badge-historical {
  color: #9a3412;
  border-color: #fed7aa;
  background: #fff7ed;
}

.search-results-table tr.search-historical-row td {
  background-image: linear-gradient(0deg, rgba(255, 247, 237, 0.52), rgba(255, 247, 237, 0.52));
}

.search-results-table a,
.search-results-table a:visited,
.search-results-table a:hover,
.search-results-table a:active {
  color: inherit;
  text-decoration: none;
}

.search-legislator-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.search-legislator-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 34px;
}

.search-empty-state,
.search-loading-state,
.search-error-state {
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  color: #6b7280;
  background: #fafafa;
}

.search-loading-state i {
  margin-right: 6px;
}

.search-empty-state-rich {
  display: grid;
  gap: 8px;
}

.search-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.search-empty-copy {
  font-size: 14px;
  color: #4b5563;
}

.search-empty-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-empty-link {
  display: inline-flex;
  align-items: center;
  height: 30px;
  border: 1px solid #cfd8ea;
  border-radius: 999px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 700;
  color: #1f3d72;
  background: #f7faff;
  text-decoration: none;
}

.search-empty-link:hover {
  background: #edf3ff;
  border-color: #bccbe8;
  color: #15315e;
}

@media (max-width: 900px) {
  .search-results-filters {
    grid-template-columns: 1fr 1fr;
  }

  .search-results-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .search-results-filters {
    grid-template-columns: 1fr;
  }

  .search-bill-cell {
    flex-wrap: wrap;
    gap: 6px;
  }

  .search-results-actions {
    width: 100%;
  }

  .search-results-btn {
    flex: 1 1 0;
    justify-content: center;
  }
}
