/* BILLREFRESH – Congress.gov-style, LegiList polish */

*,
*::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 */
.bill-shell {
  max-width: 980px;
  margin: 32px auto;
  padding: 0 16px;
}

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

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

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

.bill-header-congress {
  color: #6b7280;
}

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

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

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

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

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

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

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

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

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

.bill-meta-item-wide {
  grid-column: span 1;
}

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

/* Section wrapper */
.bill-section {
  margin-top: 18px;
}

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

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

/* Cosponsors */
.bill-cosponsor-list,
.bill-related-list,
.bill-timeline {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.bill-cosponsor-list li {
  margin-bottom: 4px;
}

.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-toggle {
  cursor: pointer;
  margin-top: 4px;
  font-size: 13px;
  color: #1d4ed8;
  font-weight: 600;
}

.cosponsor-collapsed li:nth-child(n+11) {
  display: none;
}

/* Summary */
.bill-summary-box {
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
  font-size: 14px;
}

/* Timeline (Actions) */
.bill-timeline {
  border-left: 2px solid #1d3b7a;
  margin-left: 4px;
}

.bill-timeline .action-entry {
  padding: 10px 0 10px 12px;
  position: relative;
}

.bill-timeline .action-entry::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #1d3b7a;
}

.action-date {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 2px;
}

.action-desc {
  font-size: 14px;
  color: #111827;
}

/* Related bills */
.related-item {
  margin-bottom: 8px;
}

.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  background: #f9fafb;
  color: #111827;
  font-size: 14px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.related-card:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  transform: translateX(2px);
}

.related-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.related-bill {
  font-weight: 600;
}

.related-type {
  font-size: 12px;
  color: #4b5563;
}

.related-arrow-icon {
  font-size: 14px;
  color: #4b5563;
}

/* Vote / text */
.vote-toggle-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 8px;
}

.vote-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  font-size: 13px;
  cursor: pointer;
  color: #111827;
}

.vote-toggle-btn .fa-chevron-down {
  font-size: 11px;
}

/* Scroll box (votes / fallback text) */
.scroll-box {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  font-size: 13px;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
}

/* Share modal */
#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;
}

/* --- Collapsible Summary / Actions --- */

/* Smooth collapsible animation */
.collapsible {
  position: relative;
  overflow: hidden;
  max-height: 9999px; /* default expanded */
  transition: max-height 0.35s ease-in-out;
}

.collapsible.collapsed {
  max-height: 420px; /* your limit */
}

/* Fade gradient stays the same */
.collapsible-gradient.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
  pointer-events: none;
}


.collapsible-gradient.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
  pointer-events: none;
}

.collapsible-toggle {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
}
.click-to-actions {
  cursor: pointer;
  color: #1E4AA7;
}

.action-more-pill {
  display: inline-block;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 4px;
  background: #e5e7eb; /* light gray */
  color: #374151; /* muted text */
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.action-more-pill:hover {
  background: #cbd5e1; /* slightly darker */
}



.related-list-group {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.related-row + .related-row {
  border-top: 1px solid #e5e7eb;
}

.related-row .related-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  text-decoration: none;
  color: #1f2937;
}

.related-link:hover {
  background: #f3f4f6;
}

.related-bill-id {
  font-weight: 600;
  font-size: 14px;
}

.related-bill-rel {
  font-size: 13px;
  color: #6b7280;
  margin-right: auto;
  margin-left: 12px;
}

.related-arrow {
  color: #9ca3af;
  font-size: 14px;
}

.related-empty {
  padding: 14px;
  color: #6b7280;
  font-size: 14px;
}


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

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

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

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