/* ==========================================================================
   BillPulse – Old-school Twitter-style layout (Navy palette) + Light/Dark
   ========================================================================== */

:root {
  --navy-950: #050a18;
  --navy-900: #08102a;
  --navy-800: #0c1a3a;
  --navy-700: #102755;
  --navy-600: #173575;

  --blue-500: #2563eb;

  --bg: var(--navy-950);
  --panel: rgba(8, 16, 42, 0.72);
  --panel-2: rgba(12, 26, 58, 0.72);

  --text: #eef2ff;
  --muted: #a5b4fc;
  --muted2: #94a3b8;

  --border: rgba(148, 163, 184, 0.22);
  --ring: rgba(37, 99, 235, 0.35);

  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.55);

  --col-left: 260px;
  --col-right: 350px;
  --center-max: 680px;
}

html[data-theme="light"] {
  --bg: #f6f8ff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-2: rgba(255, 255, 255, 0.92);

  --text: #0b1220;
  --muted: #334155;
  --muted2: #475569;

  --border: rgba(2, 6, 23, 0.12);
  --ring: rgba(37, 99, 235, 0.25);
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.12);
}

* { box-sizing: border-box; }
body.bp-body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.18), transparent 50%),
              radial-gradient(circle at 10% 40%, rgba(99, 102, 241, 0.12), transparent 55%),
              var(--bg);
}

a { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }

.bp-shell {
  display: grid;
  grid-template-columns: var(--col-left) minmax(0, var(--center-max)) var(--col-right);
  gap: 18px;
  align-items: start;
  padding: 14px 18px 10px;
  justify-content: center;
}

/* Desktop: keep the 3-column grid as-is */
.bp-shell {
  display: grid;
  grid-template-columns: var(--col-left) minmax(0, var(--center-max)) var(--col-right);
  gap: 18px;
  align-items: start;
  padding: 14px 18px 10px;
  justify-content: center;
}

/* LEFT + RIGHT default sticky only on desktop */
.bp-left,
.bp-right {
  position: sticky;
  top: 10px;
  height: calc(100vh - 20px);
}

/* Mobile / tablet: stack everything, center → left → right */
@media (max-width: 1180px) {
  .bp-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .bp-left,
  .bp-center,
  .bp-right {
    position: static;
    height: auto;
  }

  /* Reorder for stacked layout: bills first, then left, then right */
  .bp-center {
    order: 1;
  }
  .bp-left {
    order: 2;
  }
  .bp-right {
    order: 3;
  }

  /* Make jump targets land below sticky header */
  #bp-col-left,
  #bp-col-center,
  #bp-col-right {
    scroll-margin-top: 80px; /* tweak if your header is taller/shorter */
  }
}



/* LEFT */
.bp-left, .bp-right { position: sticky; top: 10px; height: calc(100vh - 20px); overflow: auto; }
.bp-left-inner, .bp-right-inner { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; }

.bp-brand { display: inline-flex; align-items: center; padding: 10px 8px; border-radius: var(--radius-lg); }
.bp-brand:hover { background: rgba(37, 99, 235, 0.08); }
.bp-brand-logo { width: 44px; height: 44px; object-fit: contain; }

.bp-nav { display: flex; flex-direction: column; gap: 6px; }
.bp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 15px;
}
.bp-nav-item:hover { background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.10); }
.bp-nav-item.is-active { background: rgba(37, 99, 235, 0.14); border-color: rgba(37, 99, 235, 0.22); }
.bp-ico { width: 22px; display: inline-flex; justify-content: center; }

.bp-left-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  padding: 12px;
  box-shadow: var(--shadow);
}

.bp-kicker { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted2); }
.bp-muted { color: var(--muted); font-size: 13px; line-height: 1.35; }

.bp-divider { height: 1px; background: var(--border); margin: 10px 0; }

.bp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.bp-btn {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.bp-btn:hover { border-color: rgba(37, 99, 235, 0.35); box-shadow: 0 0 0 3px var(--ring); }

.bp-btn-primary {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.92));
  border-color: rgba(37, 99, 235, 0.35);
}
.bp-btn-ghost { background: transparent; }

.bp-auth-user { font-size: 13px; color: var(--muted); }

/* STATUS */
.bp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
}
.bp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(148, 163, 184, 0.55);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
}

/* CENTER */
.bp-center { min-height: 60vh; }
.bp-center-header {
  position: sticky;
  top: 10px;
  z-index: 10;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: var(--radius-xl);
  padding: 12px 12px 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.bp-layout-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.bp-layout-jump {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

.bp-layout-jump:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 2px var(--ring);
  color: var(--text-main);
}

/* If you only want them on smaller screens, uncomment this:*/
@media (min-width: 1181px) {
  .bp-layout-jumps {
    display: none;
  }
}

#bp-col-left,
#bp-col-center,
#bp-col-right {
  scroll-margin-top: 80px; /* tweak to match your header height */
}




.bp-center-title { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.bp-title { font-weight: 800; font-size: 18px; letter-spacing: 0.02em; }
.bp-subtitle { font-size: 13px; color: var(--muted); }
/* Title row: BillPulse left, toggle right */
.bp-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Toggle used inside the header row – no extra top margin */
.bp-toggle-inline {
  margin-top: 0;
}


.bp-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.bp-tab {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.bp-tab:hover { border-color: rgba(37, 99, 235, 0.35); }
.bp-tab.is-active { background: rgba(37, 99, 235, 0.14); border-color: rgba(37, 99, 235, 0.25); }

.bp-center-controls {
  margin-top: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  padding: 12px;
  box-shadow: var(--shadow);
}

.bp-search-row { display: flex; gap: 10px; align-items: center; }
.bp-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  outline: none;
}
.bp-input:focus { box-shadow: 0 0 0 3px var(--ring); border-color: rgba(37, 99, 235, 0.35); }

.bp-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  user-select: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.bp-toggle input { display: none; }
.bp-toggle-ui {
  width: 42px; height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}
.bp-toggle-ui::after {
  content: "";
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.75);
  position: absolute;
  top: 2px; left: 3px;
  transition: transform 0.18s ease;
}
.bp-toggle input:checked + .bp-toggle-ui::after { transform: translateX(18px); background: rgba(37, 99, 235, 0.9); }

.bp-feed { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }

/* RIGHT */
.bp-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  padding: 12px;
  box-shadow: var(--shadow);
}
.bp-card-title { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.bp-card-title-chatter { font-weight: 800; font-size: 18px; margin-bottom: 8px; text-align: center;}
.bp-link { color: var(--blue-500); font-size: 13px; }
.bp-mini-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bp-mini-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.bp-district-user-link { color: var(--text); text-decoration: none; }
.bp-district-user-link:hover {
  color: var(--blue-500);
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 2px var(--ring);
}
.bp-mini-handle { font-weight: 700; font-size: 13px; }
.bp-mini-sub { color: var(--muted2); font-size: 12px; }

/* FOOTER */
.bp-footer {
  text-align: center;
  padding: 10px 16px 18px;
  color: var(--muted2);
  font-size: 12px;
}

/* ==========================================================================
   “Tweet-style” Bill Cards (reusing your class names)
   ========================================================================== */
/* --- Tweet-style collapse/expand --- */
.bill-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.bill-actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted2);
  font-size: 12px;
}

.bill-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bill-toggle:hover { box-shadow: 0 0 0 3px var(--ring); border-color: rgba(37,99,235,0.35); }

.bill-pin-btn {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  margin-right: 8px;
}
.bill-pin-btn.is-active {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px var(--ring);
}

.bill-watch-btn {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

/* Hover state */
.bill-watch-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px var(--ring);
}

/* Active "Watching" state */
.bill-watch-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
  color: var(--text-main);
}


.bill-body { display: none; }
.bill-card.is-open .bill-body { display: block; }


.bill-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bill-header {
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bill-topline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: var(--muted2);
}

.bill-topline-left {
  font-weight: 800;
  color: var(--text);
}

.bill-topline-right {
  color: var(--muted2);
}

.bill-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
}

/* Summary block right under the title */
.bill-summary {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  white-space: normal;
}

.bill-summary p { margin: 0 0 8px; }
.bill-summary p:last-child { margin-bottom: 0; }

/* Make the XML button sit below summary and span full width */
/* "Read before voting" link styled like a button */
.xml-open-btn{
  display: inline-block;          /* anchor behaves like a button */
  width: 100%;
  text-align: center;
  text-decoration: none;

  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);

  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  height: fit-content;
}

.xml-open-btn:hover{
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px var(--ring);
}

.comment-expand-btn{
  margin-top: 10px;
}

.bill-title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
}

.bill-meta {
  margin-top: 4px;
  color: var(--muted2);
  font-size: 12px;
}

/* Poll block (your existing structure) */
.poll-block { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); }
.poll-top-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.poll-question { font-weight: 800; font-size: 13px; }
.poll-note { color: var(--muted2); font-size: 12px; }

.poll-buttons { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.poll-btn {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
}
.poll-btn:hover { border-color: rgba(37, 99, 235, 0.35); box-shadow: 0 0 0 3px var(--ring); }

.poll-results {
  margin-top: 10px;
  white-space: pre-line;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 10px;
}

/* Comments */
.comments-section { padding: 10px 12px 12px; }
.comments-header-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.comments-title { font-weight: 800; font-size: 13px; }
.comments-count { color: var(--muted2); font-size: 12px; }

.comments-list { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.comments-section { padding: 10px 12px 12px; }
.comments-header-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.comments-title { font-weight: 800; font-size: 13px; }
.comments-count { color: var(--muted2); font-size: 12px; }

/* Use Public Sans inside Discussions & Debates */
.comments-section,
.comments-section * {
  font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.comments-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  gap: 10px;
}

.comment-reply {
  margin-left: 32px;
}

.comment-avatar-wrap {
  flex: 0 0 auto;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: radial-gradient(circle at 30% 20%, #f9fafb, #cbd5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.comment-avatar-has-image {
  color: transparent; /* hide initial if image is present */
}

.comment-content {
  flex: 1 1 auto;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.comment-header-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-author { font-weight: 800; font-size: 12px; }
.comment-meta { color: var(--muted2); font-size: 11px; }

.comment-header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.comment-menu-btn {
  border: none;
  background: transparent;
  color: var(--muted2);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 16px;
  line-height: 1;
  border-radius: 999px;
}

.comment-menu-btn:hover {
  background: rgba(148, 163, 184, 0.25);
}

.comment-body {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}

.comment-actions {
  margin-top: 8px;
}

.comment-reply-btn {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

.comment-reply-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.comment-new {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 13px;
  resize: vertical;
}

.comment-input::placeholder {
  color: var(--muted2);
}

.comment-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.comment-reply-chip {
  font-size: 11px;
  color: var(--muted2);
  margin-bottom: 4px;
  cursor: pointer;
}

.comment-reply-chip:hover {
  text-decoration: underline;
}

.comment-submit-btn {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.18);
  color: var(--text);
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.comment-submit-btn:hover {
  box-shadow: 0 0 0 3px var(--ring);
}

/* Toggle + Show replies buttons */
.comment-toggle-btn,
.comment-show-replies-btn {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}

html[data-theme="light"] .comment-toggle-btn,
html[data-theme="light"] .comment-show-replies-btn {
  background: rgba(255, 255, 255, 0.95);
}

.comment-toggle-btn:hover,
.comment-show-replies-btn:hover {
  border-color: rgba(37, 99, 235, 0.45);
}


/* Keep your existing modal styles compatible */
.bp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.bp-modal-card {
  background: var(--panel-2);
  border-radius: 0.75rem;
  padding: 16px 20px;
  max-width: 360px;
  width: 90%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Thought of the Day modal */
.bp-modal-card-totd {
  max-width: 520px;
  width: 95%;
  padding: 0;               /* image fills the card */
}

.bp-totd-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.bp-modal-title { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.bp-modal-text { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.bp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.bp-modal-actions button {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.bp-modal-actions button:hover { box-shadow: 0 0 0 3px var(--ring); }
.bp-modal-actions .bp-secondary-btn { color: var(--muted2); }

/* Wide modal for bill proposal builder */
.bp-modal-card-wide {
  max-width: 960px;
  width: min(960px, 96vw);
  max-height: 90vh;
  overflow: auto;
}

/* Simple select styling to match .bp-input */
.bp-select {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  outline: none;
}
.bp-select:focus {
  box-shadow: 0 0 0 3px var(--ring);
  border-color: rgba(37, 99, 235, 0.35);
}

/* Proposal form layout inside the modal */
.proposal-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}

.proposal-field label {
  display: block;
  font-size: 12px;
  color: var(--muted2);
  margin-bottom: 4px;
}

.proposal-field-wide {
  grid-column: 1 / -1;
}

.proposal-output-label {
  display: block;
  font-size: 12px;
  color: var(--muted2);
  margin-bottom: 4px;
}

/* Monospace output textarea for copy-pasting into Word */
.proposal-output {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  resize: vertical;
  max-height: 260px;
}


.trend-votes {
  color: var(--muted2);
  font-size: 12px;
  white-space: nowrap;
}
.trend-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}

.live-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(239,68,68,0.15);
  color: var(--text);
}
.live-time { color: var(--muted2); font-size: 12px; white-space: nowrap; }
.live-title { font-weight: 750; font-size: 13px; line-height: 1.2; }

.app-shell{
  display:grid;
  grid-template-columns: 280px minmax(520px, 680px) 360px;
  gap:16px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
  align-items:start;
}

.left-rail,.right-rail{
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  overflow:auto;
}

.center-feed{
  min-height: 100vh;
}

.profile-hero{
  background: var(--card);
  border:1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  overflow:hidden;
}

.profile-hero .banner{
  height: 160px;
  background: linear-gradient(135deg, rgba(59,130,246,.35), rgba(0,0,0,.2));
}

.profile-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  padding: 0 16px 12px;
  margin-top: -40px;
}

.avatar{
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border: 4px solid var(--bg-elevated);
  background: rgba(255,255,255,.08);
}

.profile-card{
  margin-top: 12px;
  background: var(--card);
  border:1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
}

.profile-stats{
  display:flex;
  gap:18px;
  margin: 12px 0 8px;
}
.profile-stats > div{display:flex; gap:8px; align-items:baseline;}

.verify-banner{
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.25);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.tabs{
  margin-top: 12px;
  display:flex;
  gap:10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.tab{
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border:1px solid transparent;
  background: transparent;
  color: var(--text-subtle);
}
.tab.active{
  background: var(--accent-soft);
  border-color: var(--accent-strong);
  color: var(--text-main);
}

.btn{
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text-main);
}

/* Profile view layout */
.bp-profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Profile header (cover + avatar) */
.bp-profile-header {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: var(--card);
}

.bp-profile-cover {
  position: relative;
  height: 140px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.6), transparent 55%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.5), transparent 55%),
    linear-gradient(120deg, #020617, #0f172a);
  background-size: cover;
  background-position: center;
}

.bp-profile-cover-upload {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.bp-profile-header-main {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 16px 16px;
}

.bp-profile-avatar-wrap {
  position: relative;
  margin-top: -40px; /* pull avatar up over cover */
}

.bp-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 3px solid var(--bg);
  background: radial-gradient(circle at 30% 20%, #e5e7eb, #64748b);
  background-size: cover;
  background-position: center;
}

.bp-avatar-upload-btn {
  margin-top: 6px;
  font-size: 11px;
  padding: 4px 10px;
}

.bp-profile-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bp-profile-display-name {
  font-size: 16px;
  font-weight: 700;
}

.bp-profile-district {
  font-size: 13px;
  color: var(--muted);
}

/* Share / invite modal */
.bp-share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bp-share-btn {
  flex: 1 1 calc(50% - 8px);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 6px 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.bp-share-btn strong {
  font-weight: 700;
}

.bp-share-btn small {
  display: block;
  font-size: 11px;
  color: var(--muted2);
}

/* Live on G – C-SPAN video embed */
.bp-video-wrap {
  position: relative;
  width: 100%;
  margin-top: 10px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #000;
}

.bp-video-wrap iframe {
  width: 100%;
  height: 200px;
  display: block;
  border: 0;
}

/* Inline G logo in card titles */
.bp-logo-inline img {
  height: 23px;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  margin-bottom: 2px;
}

/* ========================================================================== */
/* Citizen Proposals: kicker row + status badges                              */
/* ========================================================================== */

.bp-proposal-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--muted2);
}

.bp-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

html[data-theme="light"] .bp-badge {
  background: rgba(255, 255, 255, 0.9);
}

/* Main proposal badge: carries the BP ID + "Resolution" label */
.bp-badge-proposal {
  border-color: rgba(37, 99, 235, 0.55);   /* blue-ish */
  color: var(--text);
}

/* Status variants – we’ll map these from statusCode later */
.bp-badge-status-neutral {
  opacity: 0.9;
}

.bp-badge-status-adopted {
  border-color: rgba(34, 197, 94, 0.75);   /* green-ish */
}

.bp-badge-status-introduced {
  border-color: rgba(168, 85, 247, 0.75);  /* purple-ish */
}

.proposal-help {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 3px;
}


/* ========================================================================== */
/* Legislators directory (business cards)                                     */
/* ========================================================================== */

#legislator-results .bp-leg-district {
  margin-bottom: 10px;
}

#legislator-results .bp-leg-group {
  margin-top: 12px;
}

#legislator-results .bp-leg-group-title {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 8px;
}

#legislator-results .bp-official-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#legislator-results .bp-official-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 10px;
}

#legislator-results .bp-official-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

#legislator-results .bp-official-role {
  font-size: 12px;
  font-weight: 800;
}

#legislator-results .bp-official-name {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 800;
}

#legislator-results .bp-official-office {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted2);
}

#legislator-results .bp-official-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

/* Chips scoped to legislator directory so we don’t accidentally style other areas */
#legislator-results .bp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#legislator-results .bp-chip {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#legislator-results .bp-chip:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px var(--ring);
}

#legislator-results .bp-chip-btn {
  appearance: none;
}

  .bp-thought {
    text-align: center;
    margin: 0 0 8px;
  }

  .bp-thought-text {
    margin: 0;
    font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont,
      "Segoe UI", sans-serif;
    font-weight: 600;              /* bold-ish */
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bp-muted-fg, #9ca3af);
  }

  .bp-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    padding: 16px 24px 20px;
    margin-top: 16px;
    font-size: 12px;
    color: #9ca3af;
    background: var(--bp-surface, #020617);
  }

  .bp-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 8px;
  }

  .bp-footer-col {
    min-width: 0;
  }

  .bp-footer-brand {
    font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont,
      "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e5e7eb;
    margin-bottom: 4px;
  }

  .bp-footer-tagline {
    margin: 0 0 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #cbd5f5;
  }

  .bp-footer-meta {
    margin: 0;
    font-size: 11px;
    opacity: 0.8;
  }

  .bp-footer-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    color: #e5e7eb;
  }

  .bp-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .bp-footer-list li + li {
    margin-top: 2px;
  }

.bp-footer-link {
  text-decoration: none;
  color: #9ca3af;

  /* Make buttons look like links too */
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}


  .bp-footer-link:hover {
    color: #e5e7eb;
    text-decoration: underline;
  }

  .bp-footer-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid rgba(148, 163, 184, 0.6);
  }

  .bp-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 6px;
    margin-top: 4px;
    color: #9ca3af;
  }

  @media (max-width: 900px) {
    .bp-footer-inner {
      grid-template-columns: 1fr 1fr;
    }
  }

  @media (max-width: 640px) {
    .bp-footer-inner {
      grid-template-columns: 1fr;
    }
    .bp-footer {
      padding: 12px 16px 16px;
    }
    .bp-footer-bottom {
      flex-direction: column;
      align-items: flex-start;
    }
  }

/* Signal’s Chatter */
.bp-chatter-msg{
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.bp-chatter-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.bp-chatter-author{
  font-weight: 800;
  font-size: 12px;
}

/* Clickable handles in Chatter */
.bp-chatter-handle{
  color: inherit;
  text-decoration: none;
}
.bp-chatter-handle:hover{ text-decoration: underline; }
.bp-chatter-handle:focus{ outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 10px; }
.bp-chatter-meta{
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
}
.bp-chatter-text{
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Notifications "green light" */
.bp-nav-item.has-unread {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.14);
  position: relative;
}
.bp-nav-item.has-unread::after{
  content:"";
  position:absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 1);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

/* Notification items inside the modal */
.bp-notif-item{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
}
.bp-notif-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size: 12px;
}
.bp-notif-room{ font-weight: 800; }
.bp-notif-time{ color: var(--muted2); white-space: nowrap; }
.bp-notif-body{ margin-top: 6px; white-space: pre-wrap; word-break: break-word; }

.poll-results {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

/* New modern layout for poll results */
.poll-results-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-tier {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 10px 10px;
}

.poll-tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.poll-tier-label {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}

.poll-tier-votes {
  font-size: 11px;
  color: var(--muted2);
}

.poll-tier-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.25);
  margin-bottom: 6px;
}

.poll-tier-segment {
  height: 100%;
}

/* Color segments for support / oppose / unsure */
.poll-tier-segment-support {
  background: rgba(34, 197, 94, 0.9);   /* green-ish */
}

.poll-tier-segment-oppose {
  background: rgba(239, 68, 68, 0.9);   /* red-ish */
}

.poll-tier-segment-unsure {
  background: rgba(234, 179, 8, 0.9);   /* amber-ish */
}

.poll-tier-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poll-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  font-size: 11px;
  color: var(--text);
}

html[data-theme="light"] .poll-pill {
  background: rgba(255, 255, 255, 0.9);
}

.poll-pill-support {
  border-color: rgba(34, 197, 94, 0.7);
}

.poll-pill-oppose {
  border-color: rgba(239, 68, 68, 0.7);
}

.poll-pill-unsure {
  border-color: rgba(234, 179, 8, 0.7);
}
.bp-leg-card{
  position: relative;
  overflow: hidden;

  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 12px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  background:#fff;
}

/* Foreground seal icon */
.bp-leg-icon{
  width:44px;
  height:44px;
  flex: 0 0 44px;

  border-radius:50%;
  background:#fff;

  object-fit: contain;      /* ✅ keeps the seal fully visible */
  object-position: center;
  margin-top:2px;
}

.bp-leg-main{ min-width:0; }

.bp-leg-name{
  font-weight:800;
  font-size:13px;
  line-height:1.15;
}

.bp-leg-office{
  font-size:11px;
  opacity:.75;
  margin-top:2px;
}

.bp-leg-address{
  font-size:11px;
  opacity:.75;
  margin-top:3px;
}

.bp-leg-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:8px;
  font-size:11px;
}

.bp-leg-phone{ opacity:.85; }

.bp-leg-link{
  text-decoration:none;
  font-weight:700;
}
.bp-leg-link:hover{ 
  text-decoration:underline; }

/* Optional watermark */
.bp-leg-seal-bg{
  position:absolute;
  right:-6px;
  top:-6px;
  width:64px;
  height:64px;
  opacity:0.08;
  object-fit:contain;
  pointer-events:none;
}

/* =========================
   Mobile drawers + top bar
   ========================= */

/* Hidden by default (desktop) */
.bp-mobile-bar { display: none; }

.bp-drawer-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
}

/* Mobile / tablet: convert rails to drawers + show top bar */
@media (max-width: 1023px){

  /* Top bar */
  .bp-mobile-bar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    position: sticky;
    top: 0;
    z-index: 9997;
    background: var(--panel-2);
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }

  .bp-mobile-btn{
    width:40px;
    height:40px;
    border-radius:12px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    font-size:18px;
    font-weight:800;
    line-height:1;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .bp-mobile-title{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    flex: 1 1 auto;
    justify-content:center;
  }

  /* ✅ HARD FIX: shrink the G/logo on mobile no matter what */
  .bp-mobile-bar .bp-brand-logo,
  .bp-mobile-bar .bp-mobile-logo,
  .bp-mobile-bar img{
    width:28px !important;
    height:28px !important;
    max-width:28px !important;
    max-height:28px !important;
    object-fit:contain !important;
    display:block;
  }

  /* District label */
  .bp-mobile-district{
    font-weight:800;
    font-size:12px;
    opacity:.8;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width: 55vw;
  }

  /* Turn rails into drawers */
  #bp-col-left,
  #bp-col-right{
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: min(320px, 88vw) !important;
    z-index: 9999 !important;
    background: var(--panel-2) !important;
    color: var(--text);
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    transition: transform .18s ease;
  }

  /* Start hidden off-canvas */
  #bp-col-left{ left:0; transform: translateX(-105%); }
  #bp-col-right{ right:0; transform: translateX(105%); }

  /* Open states */
  body.bp-drawer-left-open #bp-col-left{ transform: translateX(0); }
  body.bp-drawer-right-open #bp-col-right{ transform: translateX(0); }

  /* Keep center column full width behind drawers */
  .bp-left, .bp-right { flex: 0 0 auto; }
}

/* Lock background scroll when a drawer is open */
body.bp-drawer-left-open,
body.bp-drawer-right-open{
  overflow: hidden;
}

/* Extra-small screens: even smaller logo + optionally hide datetime */
@media (max-width: 640px){
  .bp-mobile-bar .bp-brand-logo,
  .bp-mobile-bar .bp-mobile-logo,
  .bp-mobile-bar img{
    width:24px !important;
    height:24px !important;
    max-width:24px !important;
    max-height:24px !important;
  }

  /* If datetime badge crowds the bar, hide it in mobile bar */
  .bp-mobile-bar #datetime-badge{
    display:none !important;
  }
}

/* =========================
   Mobile: shrink brand logo everywhere
   ========================= */
@media (max-width: 640px){

  /* Mobile bar logo */
  .bp-mobile-bar .bp-brand-logo,
  .bp-mobile-bar .bp-mobile-logo{
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
  }

  /* Left drawer / rail logo */
  #bp-col-left .bp-brand-logo{
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
  }

  /* Keep the brand container from ballooning */
  #bp-col-left .bp-brand{
    padding: 6px 8px !important;
    gap: 8px !important;
  }
  
  body.bp-body { min-height: 100vh; display: flex; flex-direction: column; }
.bp-shell { flex: 1 0 auto; }
.bp-footer { margin-top: auto; }


  /* Optional: hide datetime badge on tiny screens */
  #bp-col-left #datetime-badge{
    display: none !important;
  }
}

/* ========================================================================== */
/* BillPulse Mail (web client layout)                                         */
/* ========================================================================== */

.bp-mail-shell{
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 18px 18px;
}

.bp-mail-app{
  display: grid;
  grid-template-columns: 240px 380px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1180px){
  .bp-mail-app{
    grid-template-columns: 1fr;
  }
}

.bp-mail-rail,
.bp-mail-list,
.bp-mail-view{
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bp-mail-rail-inner,
.bp-mail-list-inner,
.bp-mail-view-inner{
  padding: 12px;
}

.bp-mail-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.bp-mail-title{
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.bp-mail-sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.bp-mail-search{
  width: min(420px, 46vw);
}

@media (max-width: 1180px){
  .bp-mail-search{ width: 100%; }
}

.bp-mail-folder{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
}

.bp-mail-folder:hover{
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.10);
}

.bp-mail-folder.is-active{
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.22);
}

.bp-mail-folder-name{ font-weight: 800; font-size: 13px; }
.bp-mail-folder-count{ color: var(--muted2); font-size: 12px; white-space: nowrap; }

.bp-mail-list-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.bp-mail-list-title{ font-weight: 800; font-size: 13px; }
.bp-mail-list-meta{ color: var(--muted2); font-size: 12px; }

.bp-mail-items{
  max-height: calc(100vh - 210px);
  overflow: auto;
}

@media (max-width: 1180px){
  .bp-mail-items{ max-height: 56vh; }
}

.bp-mail-item{
  display:flex;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
}

.bp-mail-item:hover{
  background: rgba(255,255,255,0.03);
}

.bp-mail-item.is-active{
  background: rgba(37, 99, 235, 0.12);
  outline: 1px solid rgba(37, 99, 235, 0.22);
  outline-offset: -1px;
}

.bp-mail-item-main{ min-width:0; flex: 1 1 auto; }
.bp-mail-item-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 10px;
}

.bp-mail-item-from{
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-mail-item-date{
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
}

.bp-mail-item-subject{
  margin-top: 2px;
  font-weight: 750;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-mail-item-snippet{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-mail-view-head{
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.bp-mail-view-subject{
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
}

.bp-mail-view-meta{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted2);
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bp-mail-view-actions{
  display:flex;
  gap: 8px;
  margin-top: 10px;
}

.bp-mail-view-body{
  padding: 12px;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 13px;
}

/* Compose modal */
.bp-mail-modal{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 9999;
}

.bp-mail-modal.is-open{ display:flex; }

.bp-mail-modal-card{
  width: min(860px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.bp-mail-modal-head{
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.bp-mail-modal-title{ font-weight: 900; font-size: 14px; }

.bp-mail-modal-body{ padding: 12px; }

.bp-mail-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 760px){
  .bp-mail-grid{ grid-template-columns: 1fr; }
}

/* Google auth button */
.bp-btn-google{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}
.bp-btn-google:hover{
  background: rgba(255,255,255,0.10);
}

.bp-google-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid var(--border);
  font-weight:900;
  line-height:1;
}

.bp-btn-x{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}
.bp-btn-x:hover{
  background: rgba(255,255,255,0.10);
}

.bp-x-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid var(--border);
  font-weight:900;
  line-height:1;
}


.bp-auth-divider{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 8px 0 10px;
  color: var(--muted2);
  font-size: 12px;
}
.bp-auth-divider::before,
.bp-auth-divider::after{
  content:"";
  height:1px;
  flex:1;
  background: var(--border);
  opacity: 0.6;
}
.bp-auth-divider span{
  padding: 0 6px;
}

/* Danger variant (used for account deletion) */
.bp-btn-danger {
  border-color: rgba(239, 68, 68, 0.55);
  color: rgba(239, 68, 68, 0.95);
}

.bp-btn-danger:hover {
  border-color: rgba(239, 68, 68, 0.85);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* =========================================================================
   Job Performance Indicators row
   ========================================================================= */
.bp-jobperf{
  margin-top: 8px;   /* space from the All/House/Senate/Enrolled row */
  margin-bottom: 10px; /* space before first bill card */
}

.bp-jobperf-title{
  margin: 6px 0 6px;  /* gap above & below the title line */
  line-height: 1.1;
}

/* The row that holds the 3 tabs */
.bp-jobperf-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;           /* L/R + wrap gap */
  margin: 0;
  padding: 0;
}

/* Global pinned (main feed) — "What's Hot" styling */
#bp-pinned-slot.bp-pinned-slot {
  border: 2px solid rgba(255, 183, 0, 0.85);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 0 0 3px rgba(255, 183, 0, 0.20), 0 10px 30px rgba(0,0,0,0.25);
}

#bp-pinned-slot .bp-pinned-hot-title {
  display: inline-block;
  font-weight: 900;
  letter-spacing: 0.5px;
  font-size: 12px;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 183, 0, 0.70);
  background: rgba(255, 183, 0, 0.14);
  margin-bottom: 10px;
}

#bp-pinned-slot .bp-card { margin: 0; }


/* Keep the semantic border colors even on hover/focus */
.bp-tab.bp-tab--green:hover,
.bp-tab.bp-tab--green:focus-visible { border-color: #16a34a; }

.bp-tab.bp-tab--red:hover,
.bp-tab.bp-tab--red:focus-visible { border-color: #dc2626; }

.bp-tab.bp-tab--yellow:hover,
.bp-tab.bp-tab--yellow:focus-visible { border-color: #ca8a04; }

/* Pinned bill slot (center feed, under Job Performance Indicators) */
.bp-pinned-slot {
  margin: 10px 0 14px;
}


/* Profile header actions (Message button) */
.bp-profile-header-main{
  justify-content: space-between;
}

.bp-profile-header-text{
  flex: 1 1 auto;
  min-width: 0;
}

.bp-profile-actions{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bp-profile-message-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  position: relative;
}
.bp-profile-message-btn:hover{
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px var(--ring);
}
.bp-profile-message-btn .bp-ico{
  font-size: 14px;
  line-height: 1;
}

.bp-ico {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.bp-ico svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  opacity: 0.92;
}

.bp-nav-item:hover .bp-ico svg {
  opacity: 1;
}


/* Small unread dot on the Message button */
.bp-profile-message-btn.has-unread::after{
  content:"";
  position:absolute;
  right: 10px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 1);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.20);
}

/* ========= MessageBoard dropdown menu ========= */
.bp-mb-menu-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bp-mb-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(10, 20, 40, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  z-index: 999;
}

.bp-mb-menu::before{
  content:"";
  position:absolute;
  top:-6px;
  right: 18px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: rgba(10, 20, 40, 0.94);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.bp-mb-menu button{
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
}

.bp-mb-menu button:hover{
  background: rgba(255,255,255,0.07);
}

.bp-mb-menu button:active{
  background: rgba(255,255,255,0.10);
}

.bp-mb-menu-sep{
  height: 1px;
  margin: 6px 6px;
  background: rgba(255,255,255,0.10);
}

/* MessageBoard dropdown menu text color */
.bp-mb-menu button{
  color: rgba(235, 235, 235, 0.92) !important;  /* light gray */
}

.bp-mb-menu button:hover{
  color: rgba(255, 255, 255, 0.98) !important;
}

/* If any menu items are disabled now or later */
.bp-mb-menu button:disabled{
  color: rgba(235, 235, 235, 0.45) !important;
  cursor: not-allowed;
}


.bp-district-user-link{
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.bp-district-user-link:hover{
  text-decoration: underline;
}

.comment-author[data-profile-uid] { cursor: pointer; }
.comment-author[data-profile-uid]:hover { text-decoration: underline; }

.bp-mb-profilelink{ color: inherit; text-decoration:none; }
.bp-mb-profilelink:hover{ text-decoration:underline; }

/* =========================
   Pinned bill slot (All tab)
   ========================= */
.bp-pinned-slot {
  margin-bottom: 12px; /* space between pinned slot and the normal feed */
}

/* When pinned slot is shown, ensure the pinned card matches feed spacing */
.bp-pinned-slot .bp-card {
  margin-bottom: 0;
}
