/* divisions_page.css -- Political Gadgets standard look for the Recent
 * Divisions page, matching indsummary/generate_static_pages.py, polcompare,
 * HowPolsVote and votes2/votes3 (Inter font, white rounded-14px card
 * shadows, pg-* naming). Replaces the old page's Bootstrap 4 / radial
 * "circle" visualization theme.
 */

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #eef1f5;
  color: #1a1a2e;
  font-size: 0.93rem;
  margin: 0;
}

.pg-navbar {
  background: #fff;
  border-bottom: 1px solid #e2e6ea;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  flex-wrap: wrap;
}
.pg-navbar .pg-nav-title { font-size: 0.88rem; color: #555; }
.pg-nav-btn {
  font-size: 0.8rem;
  padding: 0.3em 0.9em;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  cursor: pointer;
  line-height: 1.5;
}
.pg-nav-btn:hover { background: #f5f5f5; color: #222; }
.dropdown-toggle::after { display: none; }
.pg-navbar .dropdown-menu { font-size: 0.88rem; min-width: 140px; }
.pg-navbar .dropdown-item i { width: 1.2em; }

.pg-wrap { max-width: 860px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.pg-h1 { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0 0.5rem; }
.pg-sub { font-size: 0.86rem; color: #555; margin-bottom: 1.25rem; line-height: 1.6; }
.pg-muted { color: #888; }

/* Picker */
.pg-division-picker { margin-bottom: 1.5rem; }
.pc-search { margin-bottom: 0.6rem; }
.pc-picker-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
}
.pc-picker-item {
  padding: 0.5em 0.9em;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f3f3;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.pc-picker-item:last-child { border-bottom: none; }
.pc-picker-item:hover { background: #f5f7fa; }
.pc-picker-item.selected { background: #eef1f5; font-weight: 600; }
.pc-picker-item .pc-item-title { flex: 1; min-width: 0; }
.pc-picker-item .pc-item-date { color: #999; font-size: 0.78rem; white-space: nowrap; }
.pc-chamber-badge {
  display: inline-block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 0.1em 0.5em;
  border-radius: 4px;
  margin-right: 0.4em;
  background: #e5e9ef;
  color: #555;
}

/* Division detail card */
.pg-section {
  background: #fff;
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.pg-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2c3e50;
  margin: 0 0 0.6rem;
}
.pg-division-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.4rem; line-height: 1.35; }
.pg-topic-badge, .pg-procedural-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15em 0.55em;
  border-radius: 20px;
  margin-left: 0.4em;
  vertical-align: middle;
}
.pg-topic-badge { background: #e8f0fe; color: #1a56b0; }
.pg-procedural-badge { background: #f0f0f0; color: #777; }

.pg-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin: 1rem 0 1.25rem;
}
.pg-kpi {
  background: #f7f9fb;
  border-radius: 12px;
  padding: 0.9rem 0.5rem;
  text-align: center;
}
.pg-kpi-value { font-size: 1.7rem; font-weight: 700; color: #2c3e50; line-height: 1; }
.pg-kpi-label { font-size: 0.68rem; color: #777; margin-top: 0.3rem; text-transform: uppercase; letter-spacing: 0.05em; }

.pg-vote-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  display: inline-block;
}
.pg-vote-label.for { background: #d4edda; color: #155724; }
.pg-vote-label.against { background: #f8d7da; color: #721c24; }
.pg-vote-list { max-height: 260px; overflow-y: auto; }
.pg-vote-badge {
  display: inline-block;
  margin: 2px 3px 2px 0;
  padding: 0.25em 0.65em;
  border-radius: 20px;
  font-size: 0.74rem;
  background: #f0f2f5;
  color: #333;
  cursor: default;
}

@media (max-width: 520px) {
  .pg-kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}

/* Circle ("flood gauge") visualization -- old votes.css's .circle/.circleT/
 * .circle-big/.circle-big2/.name rules, restored verbatim (2026-10-21,
 * after a renamed/rescaled first pass didn't fit -- the vw/vh-based radius
 * was designed against the old page's full-width body, not a narrow
 * max-width card, which clipped and over-spread it). This block is full
 * viewport width on purpose -- it deliberately breaks out of .pg-wrap's
 * max-width via negative margins, same as the old page's layout. */
.pg-circle-outer {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 70vh;
  padding-top: 1rem;
}
.circle-big {
  width: 95%;
  height: 40vh;
  position: absolute;
  margin-top: 10%;
  left: 2.5%;
}
.circle-big2 {
  width: 100%;
  height: 40vh;
  position: absolute;
}
.circle, .circleT {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -15px;
}
.circle { background-color: rgba(255, 0, 0, 0.3); }
.circleT { background-color: rgba(0, 255, 0, 0.3); }
.circleM {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -15px;
  background-color: rgba(128,0,128,0);
}
.name {
  margin-left: 30px;
  min-width: 100px;
  display: inline-block;
  padding: 0.3em 0.75em;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  white-space: nowrap;
  cursor: default;
}
.nameM {
  margin-left: 5px;
  min-width: 135px;
  display: inline-block;
  padding: 0.3em 0.75em;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
}
