/* ==========================================================================
   Public Campaign Listing Page (/campaigns) — sidebar filters layout
   ========================================================================== */

.pub-list {
  padding: 0 0 60px;
  background: #fff;
}

.pub-list__header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0a2a6e;
}

.pub-list__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0a2a6e;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Horizontal filter bar ───────────────────────────────────────────────── */
.pub-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: #f7f8fb;
  border: 1px solid #e3e3e8;
  border-radius: 6px;
}

.pub-filters-bar__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  flex: 1 1 200px;
  max-width: 280px;
}

.pub-filters-bar__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0a2a6e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pub-filters-bar__select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 32px 8px 12px;
  border: 1px solid #cfd2dc;
  border-radius: 4px;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%230a2a6e' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-size: 0.875rem;
  color: #333;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pub-filters-bar__select:focus {
  outline: none;
  border-color: #0a2a6e;
  box-shadow: 0 0 0 2px rgba(10, 42, 110, 0.15);
}

.pub-filters-bar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.pub-filters-bar__apply {
  background: #b22234;
  color: #fff;
  border: 1px solid #b22234;
  border-radius: 4px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.pub-filters-bar__apply:hover {
  background: #8e1a28;
  border-color: #8e1a28;
}

.pub-filters-bar__clear {
  font-size: 0.85rem;
  color: #b22234;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .pub-filters-bar__group {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .pub-filters-bar__actions {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
}

.pub-list__main {
  min-width: 0;
}

.pub-list__active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: #f4f6fb;
  border-left: 3px solid #0a2a6e;
  border-radius: 4px;
  font-size: 0.85rem;
}

.pub-list__active-label {
  color: #0a2a6e;
  font-weight: 600;
}

.pub-list__chip {
  display: inline-block;
  padding: 2px 10px;
  background: #0a2a6e;
  color: #fff;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.pub-list__active-clear {
  margin-left: auto;
  color: #b22234;
  text-decoration: underline;
  font-weight: 500;
}

/* Empty state */
.pub-list__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1rem;
}
.pub-list__empty a {
  color: #b22234;
  text-decoration: underline;
}

/* Pagination */
.pub-list__pagination {
  margin-top: 40px;
  text-align: center;
}

/* ── Card state badge (top-left of image) ────────────────────────────────── */
.fp-card__img-wrap {
  position: relative;
}

.fp-card__state-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  background: #0a2a6e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 12px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Admin Review Queue (/admin/campaigns/review)
   ========================================================================== */
.rcq {
  padding: 16px 0;
}

.rcq__intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e3e3e8;
}

.rcq__intro p {
  margin: 0;
  color: #555;
  font-size: 0.9rem;
}

.rcq__count {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #b22234;
  color: #fff;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.rcq__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #f7f8fb;
  border: 1px solid #e3e3e8;
  border-radius: 4px;
}

.rcq__filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rcq__filter label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0a2a6e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rcq__filter input {
  padding: 6px 10px;
  border: 1px solid #cfd2dc;
  border-radius: 4px;
  font-size: 0.85rem;
  min-width: 180px;
}

.rcq__filter--actions {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.rcq__apply {
  background: #0a2a6e;
  color: #fff;
  border: 1px solid #0a2a6e;
  border-radius: 4px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.rcq__apply:hover {
  background: #081f52;
}

.rcq__clear {
  font-size: 0.85rem;
  color: #b22234;
  text-decoration: underline;
}

.rcq__table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e3e3e8;
  border-radius: 4px;
  overflow: hidden;
}

.rcq__th {
  text-align: left;
  background: #f4f6fb;
  color: #0a2a6e;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border-bottom: 2px solid #cfd6e8;
}

.rcq__th--actions {
  width: 100px;
  text-align: right;
}

.rcq__td {
  padding: 10px 14px;
  border-bottom: 1px solid #eef0f4;
  font-size: 0.88rem;
  color: #333;
  vertical-align: top;
}

.rcq__table tbody tr:hover {
  background: #fafbfd;
}

.rcq__title-link {
  color: #0a2a6e;
  font-weight: 600;
  text-decoration: none;
}

.rcq__title-link:hover {
  text-decoration: underline;
}

.rcq__td--date {
  white-space: nowrap;
  color: #666;
  font-size: 0.82rem;
}

.rcq__td--actions {
  text-align: right;
  white-space: nowrap;
}

.rcq__action {
  display: inline-block;
  padding: 5px 12px;
  background: #b22234;
  color: #fff;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.rcq__action:hover {
  background: #8e1a28;
  color: #fff;
  text-decoration: none;
}

.rcq__empty {
  padding: 40px 20px;
  text-align: center;
  background: #f7f8fb;
  color: #666;
  border: 1px dashed #cfd2dc;
  border-radius: 4px;
}

.rcq__pager {
  margin-top: 18px;
  text-align: center;
}

/* ==========================================================================
   Admin Review Page (/admin/campaigns/review/{nid})
   ========================================================================== */
.rcv {
  padding: 16px 0 40px;
}

.rcv__crumbs {
  margin-bottom: 12px;
}

.rcv__back {
  font-size: 0.85rem;
  color: #0a2a6e;
  text-decoration: none;
}

.rcv__back:hover { text-decoration: underline; }

.rcv__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 2px solid #0a2a6e;
}

.rcv__title {
  margin: 0;
  font-size: 1.5rem;
  color: #0a2a6e;
}

.rcv__state {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f4f6fb;
  color: #0a2a6e;
}

.rcv__state--needs_review { background: #fff8e1; color: #8a5b00; }
.rcv__state--published { background: #e6f4ea; color: #1e5b35; }
.rcv__state--draft { background: #f3f3f5; color: #555; }
.rcv__state--archived { background: #f3f3f5; color: #555; }

.rcv__layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}

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

.rcv__preview {
  background: #fff;
  border: 1px solid #e3e3e8;
  border-radius: 6px;
  padding: 20px;
}

.rcv__image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 16px;
}

.rcv__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rcv__chip {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rcv__chip--cat   { background: #b22234; color: #fff; }
.rcv__chip--state { background: #0a2a6e; color: #fff; }

.rcv__desc {
  margin: 0 0 14px;
  color: #444;
  font-size: 1rem;
  line-height: 1.55;
}

.rcv__details {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.rcv__details img { max-width: 100%; height: auto; }

.rcv__links {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e3e3e8;
  font-size: 0.85rem;
}

.rcv__links a { color: #0a2a6e; text-decoration: underline; }
.rcv__sep { margin: 0 6px; color: #aaa; }

.rcv__side { display: flex; flex-direction: column; gap: 16px; }

.rcv__card {
  background: #fff;
  border: 1px solid #e3e3e8;
  border-radius: 6px;
  padding: 16px;
}

.rcv__card-title {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0a2a6e;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef0f4;
}

.rcv__meta { margin: 0; }
.rcv__meta dt {
  font-size: 0.72rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  margin-top: 8px;
}
.rcv__meta dt:first-child { margin-top: 0; }
.rcv__meta dd {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: #222;
}
.rcv__meta a { color: #0a2a6e; }
.rcv__email {
  font-size: 0.78rem;
  color: #777;
  margin-top: 2px;
}

.rcv__form .rcv__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0a2a6e;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.rcv__textarea {
  width: 100%;
  border: 1px solid #cfd2dc;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.rcv__textarea:focus {
  outline: none;
  border-color: #0a2a6e;
  box-shadow: 0 0 0 2px rgba(10, 42, 110, 0.15);
}

.rcv__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.rcv__btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.rcv__btn--approve {
  background: #34a853;
  border-color: #34a853;
  color: #fff;
}
.rcv__btn--approve:hover { background: #277f3f; border-color: #277f3f; }

.rcv__btn--return {
  background: #fff;
  border-color: #cfd2dc;
  color: #333;
}
.rcv__btn--return:hover { background: #f4f6fb; border-color: #0a2a6e; color: #0a2a6e; }

.rcv__btn--archive {
  background: #fff;
  border-color: #e0c3c7;
  color: #b22234;
}
.rcv__btn--archive:hover { background: #fbecee; }

.rcv__hint {
  margin: 0;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.5;
}

.rcv__hint strong { color: #333; }

/* ── Campaign edit status banners (flagged creator) ──────────────────────── */
.status-banner {
  padding: 10px 14px;
  margin: 0 0 10px;
  border-radius: 4px;
  font-size: 0.88rem;
  border-left: 4px solid;
}

.status-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.92rem;
}

.status-banner--review {
  background: #fff8e1;
  border-color: #f5a623;
  color: #6b4900;
}

.status-banner--published {
  background: #e6f4ea;
  border-color: #34a853;
  color: #1e5b35;
}

.status-banner--archived {
  background: #f3f3f5;
  border-color: #888;
  color: #555;
}

/* ==========================================================================
   Legacy — kept for backward compat
   ========================================================================== */

.pub-campaigns {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.pub-campaigns__hero {
  text-align: center;
  margin-bottom: 32px;
}

.pub-campaigns__title {
  font-size: 2rem;
  font-weight: 700;
  color: #0a2a6e;
  margin: 0 0 10px;
}

.pub-campaigns__sub {
  color: #555;
  font-size: 1rem;
  margin: 0;
}

/* Category filter pills */
.pub-campaigns__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.pub-campaigns__pill {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 20px;
  border: 0.5px solid #ccc;
  background: #f4f4f6;
  color: #555;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.pub-campaigns__pill:hover {
  background: #0a2a6e;
  color: #ffffff;
  border-color: #0a2a6e;
  text-decoration: none;
}

.pub-campaigns__pill--active {
  background: #0a2a6e;
  color: #ffffff;
  border-color: #0a2a6e;
}

.pub-campaigns__count {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
}

/* Cards grid — same breakpoints as homepage */
.pub-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 991px) {
  .pub-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
  .pub-cards-grid { grid-template-columns: 1fr; }
}

/* Override CTA to filled on this page */
.pub-cards-grid .fp-card__cta--filled {
  background-color: #b22234;
  color: #ffffff;
  border: 1px solid #b22234;
}

.pub-cards-grid .fp-card__cta--filled:hover {
  background-color: #8e1a28;
  border-color: #8e1a28;
  text-decoration: none;
}

/* Empty state */
.pub-campaigns__empty {
  text-align: center;
  padding: 60px 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.pub-campaigns__clear {
  display: inline-block;
  margin-top: 12px;
  color: #b22234;
  text-decoration: none;
  font-weight: 500;
}

/* Pagination */
.pub-campaigns__pagination {
  margin-top: 36px;
  text-align: center;
}

.pub-pagination {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  gap: 6px;
}

.pub-pagination__link {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  font-size: 0.875rem;
}

.pub-pagination__link:hover {
  background: #f0f0f0;
  text-decoration: none;
}

.pub-pagination__link--active {
  background: #0a2a6e;
  color: #ffffff;
  border-color: #0a2a6e;
}

/* Related Bills Section */
.related-bills-section {
  margin-top: 30px;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 20px;
  background: #fff;
}

.related-bills-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
}

/* Tab Navigation */
.bill-tabs {
  display: flex;
  border-bottom: 2px solid #ddd;
  margin-bottom: 20px;
}

.bill-tab-item {
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  margin-right: 5px;
  background: #f5f5f5;
  border-radius: 5px 5px 0 0;
  font-weight: 500;
}

.bill-tab-item:hover {
  background: #e0e0e0;
}

.bill-tab-item.active {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

/* Tab Content */
.bill-tab-content {
  display: none;
  padding: 15px 0;
}

.bill-tab-content.active {
  display: block;
}

/* Bill Search Form */
.bill-search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.bill-search-form select,
.bill-search-form input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 150px;
}

.bill-search-form .btn {
  padding: 8px 20px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.bill-search-form .btn:hover {
  background: #005a87;
}

/* Bill List Items */
.sblistitem {
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
  background: #fafafa;
}

.sblistitem .visualIndicator {
  display: inline-block;
  padding: 2px 8px;
  background: #0073aa;
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  margin-right: 10px;
}

.sblistitem .addsbillbtn,
.sblistitem .removesbillbtn {
  float: right;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
}

.sblistitem .addsbillbtn {
  background: #28a745;
  color: #fff;
  border: none;
}

.sblistitem .removesbillbtn {
  background: #dc3545;
  color: #fff;
  border: none;
}

.sblistitem .result-heading {
  display: block;
  font-weight: bold;
  margin: 10px 0 5px;
}

.sblistitem .result-heading a {
  color: #0073aa;
  text-decoration: none;
}

.sblistitem .result-title {
  display: block;
  color: #555;
  margin-bottom: 10px;
}

.sblistitem .result-item {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 5px;
}

/* Status Tracker */
.stat_leg {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
  gap: 5px;
}

.stat_leg li {
  padding: 3px 8px;
  background: #e0e0e0;
  border-radius: 3px;
  font-size: 11px;
}

.stat_leg li.selected {
  background: #0073aa;
  color: #fff;
}

/* Messages */
.noselectedbills,
.no-results {
  padding: 20px;
  text-align: center;
  color: #666;
  background: #f9f9f9;
  border-radius: 5px;
}

.loading {
  padding: 20px;
  text-align: center;
  color: #0073aa;
}

.bmsg {
  padding: 10px;
  background: #d4edda;
  color: #155724;
  border-radius: 4px;
  margin-bottom: 15px;
}

.error {
  padding: 10px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 4px;
}

/* Submit + Preview buttons */
#save-campaign-btn,
a#preview-campaign-btn {
  margin-top: 20px;
  padding: 12px 30px;
  background: #b22234;
  color: #fff;
  border: 1px solid #b22234;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
}

#save-campaign-btn:hover,
a#preview-campaign-btn:hover {
  background: #8e1a28;
  border-color: #8e1a28;
  color: #fff;
  text-decoration: none;
}

/* State Legislators Styles */
.legislators-container {
  margin-top: 10px;
  margin-bottom: 15px;
}

.legislators-list-wrapper {
  max-height: 250px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.legislators-list-header {
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
  font-size: 14px;
}

.legislators-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legislator-checkbox-item {
  padding: 8px 10px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  transition: background-color 0.2s;
}

.legislator-checkbox-item:hover {
  background-color: #f0f0f0;
  border-color: #ccc;
}

.legislator-checkbox-item .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.legislator-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.loading-legislators,
.no-legislators,
.error-legislators {
  padding: 15px;
  text-align: center;
  color: #666;
  font-style: italic;
}

.error-legislators {
  color: #dc3545;
}

/* Custom scrollbar for legislators list */
.legislators-list-wrapper::-webkit-scrollbar {
  width: 8px;
}

.legislators-list-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.legislators-list-wrapper::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.legislators-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

