

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
  background: #f5f6f8;
  color: #111827;
}

/* Shell & main card */
.leg-shell {
  max-width: 980px;
  margin: 32px auto;
  padding: 0 16px;
}

.leg-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  padding: 24px 28px 30px;
}

/* Header */
.leg-header {
  margin-bottom: 12px;
}

.leg-header-top {
  display: flex;
  gap: 16px;
  align-items: center;
}

.leg-header-photo-wrap {
  flex-shrink: 0;
}

.leg-header-photo {
  width: 88px;
  height: 88px;
  border-radius: 10px; /* square with rounded corners */
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.leg-header-photo-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.leg-header-main {
  flex: 1;
  min-width: 0;
}

.leg-header-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.leg-header-name {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.leg-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.leg-header-subline,
.leg-header-party-line {
  font-size: 14px;
  color: #4b5563;
}

.leg-header-subline {
  margin-bottom: 2px;
}

.leg-header-role {
  font-weight: 600;
}

.leg-header-state {
  font-weight: 500;
}

.leg-header-party {
  font-weight: 600;
}

.leg-header-span {
  font-size: 13px;
  color: #6b7280;
}

.leg-dot {
  margin: 0 6px;
  color: #9ca3af;
}

.leg-header-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 14px 0 18px;
}

/* Meta row */
.leg-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.leg-meta-item {
  font-size: 14px;
}

.leg-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 3px;
}

.leg-meta-value {
  color: #111827;
}

.leg-meta-muted {
  font-size: 12px;
  color: #6b7280;
  margin-left: 4px;
}

/* Utility bar */
.leg-utility-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.leg-utility-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #1d3b7a;
  cursor: pointer;
  text-decoration: none;
}

.leg-utility-btn .fa-file-pdf {
  color: #b91c1c;
}

.leg-utility-btn.pinned,
.pin-btn.pinned {
  background: #1d3b7a;
  color: #ffffff;
  border-color: #1d3b7a;
}

.leg-utility-btn.pinned .fa-thumbtack,
.pin-btn.pinned .fa-thumbtack {
  transform: rotate(30deg);
}

/* Sections */
.leg-section {
  margin-top: 18px;
}

/* Biography */
.leg-bio-box {
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
  font-size: 14px;
  color: #111827;
  line-height: 1.6;
}

.leg-bio-box p {
  margin-bottom: 8px;
}

.leg-bio-box ul,
.leg-bio-box ol {
  margin-left: 20px;
  margin-bottom: 8px;
}

/* Filter row (sponsored / cosponsored) */
.leg-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.legislator-congress-select label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  display: block;
  margin-bottom: 2px;
}

.legislator-congress-select select {
  min-width: 120px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
}

.legislator-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legislator-search-box input {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  width: 220px;
  max-width: 100%;
}

.legislator-search-box button {
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  cursor: pointer;
}

.legislator-search-box button i {
  font-size: 13px;
  color: #374151;
}

/* Scroll box containers (lists rendered via AJAX) */
.leg-scroll-box {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  font-size: 13px;
  background: #ffffff;
  overflow: visible;    
  max-height: none;      
  height: auto;        
}


.leg-scroll-box table {
  width: 100%;
  border-collapse: collapse;
}

.leg-scroll-box table th,
.leg-scroll-box table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
}

/* Pagination returned from AJAX */
.custom-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 10px;
  font-size: 13px;
}

.custom-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  text-decoration: none;
  color: #374151;
  background: #f9fafb;
}

.custom-pagination a.active {
  background: #1d3b7a;
  color: #ffffff;
  border-color: #1d3b7a;
}

/* Share modal (same layout as billrefresh) */
#share-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

#share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
}

#share-panel {
  position: relative;
  max-width: 460px;
  margin: 80px auto;
  background: #ffffff;
  border-radius: 8px;
  padding: 18px 20px 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.32);
  text-align: center;
}

#share-og {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
}

.share-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  text-decoration: none;
}

.share-btn i {
  font-size: 16px;
  color: #1d3b7a;
}

.share-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  color: #6b7280;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Reusable list item (shared by sponsor, cosponsor, committee, vote) */
.ll-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  margin-bottom: 10px;
  text-decoration: none;
  color: #1f2937;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.ll-list-item:hover {
  background: #f3f4f6;
  border-color: #c7d2fe;
  transform: translateX(2px);
}

.ll-list-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.ll-list-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ll-list-title i {
  margin-right: 6px;
  color: #1d3b7a;
}

.ll-list-sub {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ll-list-arrow i {
  font-size: 14px;
  color: #9ca3af;
}

/* Empty state */
.ll-empty-state {
  padding: 10px;
  color: #6b7280;
  font-size: 14px;
}

/* Pagination stays identical */
.custom-pagination {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.page-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  font-size: 13px;
  text-decoration: none;
  color: #111827;
}

.page-btn.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.ll-vote-cast {
    font-weight: 700;
    font-size: 1.1em;
    color: #111; /* You can change to green/red if you want later */
}
.ll-list-title i.fa-users {
    color: #1e40af; /* LegiList blue */
}
/* Financial disclosure scroll box */
.financial-scroll {
  max-height: 380px;      /* adjustable */
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 10px 12px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .leg-card {
    padding: 18px 16px 20px;
  }

  .leg-header-top {
    align-items: flex-start;
  }

  .leg-header-name {
    font-size: 20px;
  }

  .leg-meta-row {
    grid-template-columns: 1fr;
  }

  .leg-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  #share-panel {
    margin: 60px 14px;
  }
}
