/* COMMITTEEREFRESH – Bill page cousin for committees */

*,
*::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;
  margin: 0;
}

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

.committee-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 */
.committee-header {
  margin-bottom: 12px;
}

.committee-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
}

.committee-header-id {
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
}

.committee-header-meta {
  color: #6b7280;
}

.committee-header-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 4px 0 0 0;
  line-height: 1.35;
}

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

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

.committee-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;
}

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

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

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

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

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

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

/* Section label */
.committee-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 4px;
}

/* Details box */
.committee-details-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
}

.committee-details-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.committee-details-list li + li {
  margin-top: 6px;
}

.detail-label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  display: block;
}

.detail-value {
  font-size: 14px;
  color: #111827;
}

/* Pills (shared style: cosponsor-pill reused) */
.cosponsor-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 9999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  font-size: 13px;
  color: #1d3b7a;
  text-decoration: none;
  font-weight: 600;
}

.cosponsor-pill:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

/* Member list */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  font-size: 14px;
}

.member-pill {
  display: inline-block;
  width: fit-content;
  margin: 0;
}

.pill-role {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-left: 6px;
}

/* Collapsible members */
.members-collapsible {
  overflow: hidden;
  max-height: 9999px;
  transition: max-height 0.35s ease-in-out;
}

.members-collapsed {
  max-height: 260px;
  position: relative;
}

.members-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
  pointer-events: none;
}

.collapsible-toggle,
.committee-members-toggle {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}

/* Subcommittees */
.committee-sub-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Associated bills */
.committee-associated-note {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 6px;
}

.committee-bill-list {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 10px 12px;
  font-size: 14px;
}

/* We assume /get-committeepage-bills.php outputs .custom-pagination etc. 
   That styling should already live in your global CSS or bill CSS.
   If not, you can bring over the pagination styles from billrefresh. */

/* Empty text */
.committee-empty-text {
  font-size: 14px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
}

/* SHARE MODAL (exactly like bill page) */
#share-modal {
  display: none;
  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;
}

/* Reusable list item (shared between bill, legislator, committee) */
.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; /* Correct LegiList blue */
}

.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 — right aligned like legislator page */
.custom-pagination {
  display: flex;
  justify-content: flex-end;  /* <<< THE FIX */
  gap: 4px;
  margin-top: 10px;
  font-size: 13px;
}

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

.page-btn.active {
  background: #1d3b7a;    /* Correct dark LegiList blue */
  color: #ffffff;
  border-color: #1d3b7a;
}


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

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

  .committee-header-title {
    font-size: 20px;
  }

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