/* Discharge petitions section (lists/discharge_petitions.html + detail). */

.dp-intro {
  max-width: 70ch;
  color: var(--ink-600);
  margin-bottom: var(--sp-5);
}

.dp-progress {
  position: relative;
  height: 10px;
  border-radius: var(--r-full);
  background: var(--ink-100);
  overflow: hidden;
}
.dp-progress-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  background: var(--civic-blue);
  border-radius: var(--r-full);
}
.dp-progress.is-reached .dp-progress-fill { background: var(--success); }

.dp-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.dp-count .dp-of { color: var(--ink-500); font-weight: 600; }

.dp-detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  align-items: baseline;
  margin-bottom: var(--sp-3);
}

.dp-signers-table {
  width: 100%;
  border-collapse: collapse;
}
.dp-signers-table th,
.dp-signers-table td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--ink-100);
  font-size: var(--fs-sm);
  white-space: nowrap;
}
.dp-signers-table th {
  color: var(--ink-500);
  font-weight: 600;
}
.dp-signers-table td.dp-name { white-space: normal; }
.dp-party-totals { margin: calc(-1 * var(--sp-1)) 0 var(--sp-3); }

/* Phones: one stacked block per signer (number and name, then party, seat
   and date) instead of a five-column table whose Signed column started past
   the card's edge. The thead is hidden visually but kept for screen readers,
   and the markup's roles keep the table semantics. */
@media (max-width: 599.98px) {
  .dp-signers-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .dp-signers-table,
  .dp-signers-table tbody,
  .dp-signers-table tr { display: block; width: 100%; }
  .dp-signers-table tr { padding: var(--sp-2) 0; border-bottom: 1px solid var(--ink-100); }
  .dp-signers-table td {
    display: inline-block;
    padding: 2px var(--sp-2) 2px 0;
    border-bottom: 0;
    white-space: normal;
    vertical-align: baseline;
  }
  .dp-signers-table td.dp-order { color: var(--ink-500); }
  .dp-signers-table td.dp-order::before { content: '#'; }
  .dp-signers-table td.dp-name { font-weight: 600; }
  .dp-signers-table td.dp-signed { display: block; color: var(--ink-600); }
  .dp-signers-table td.dp-signed:not(:empty)::before { content: 'Signed '; }
}

.dp-source-note {
  margin-top: var(--sp-5);
  color: var(--ink-500);
  font-size: var(--fs-sm);
}

/* The bill-detail cross-link chip. */
.dp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-full);
  background: var(--ink-50);
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--ink-800);
}
.dp-chip .dp-chip-count { font-variant-numeric: tabular-nums; font-weight: 700; }
