/* DSA NEC Style Guide - Election Night 2026 */

:root {
  /* Primary Colors */
  --dsa-black: #231F20;
  --dsa-red: #EC1F27;
  --dsa-white: #FFFFFF;

  /* Secondary Colors */
  --dsa-yellow: #FFCC00;
  --dsa-grey: #F6F6F6;
  --dsa-dark-red: #AC2529;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(35, 31, 32, 0.1);
  --shadow-md: 0 4px 12px rgba(35, 31, 32, 0.15);
  --shadow-lg: 0 8px 24px rgba(35, 31, 32, 0.2);

  /* Transitions */
  --transition-smooth: all 0.3s ease;
}

/* Global Styles */
body {
  font-family: var(--font-body);
  color: var(--dsa-black);
  background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dsa-black);
}

/* Loading Spinner */
.lds-ring {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid var(--dsa-red);
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: var(--dsa-red) transparent transparent transparent;
}

.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Header */
.election-header {
  background: linear-gradient(135deg, var(--dsa-red) 0%, var(--dsa-dark-red) 100%);
  color: var(--dsa-white);
  padding: var(--spacing-md) var(--spacing-md);
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.election-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>') repeat;
  pointer-events: none;
}

.election-header h1 {
  color: var(--dsa-white);
  font-size: 1.75rem;
  margin-bottom: var(--spacing-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.election-header img {
    width: 22vw;
    max-width: 240px;
}

@media (min-width: 1280px) {
  .election-header img {
    width: 24vw;
    max-width: 360px;
  }
}

.header-logo-link {
  display: inline-block;
  transition: var(--transition-smooth);
  margin-bottom: var(--spacing-xs);
}

.header-logo-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.header-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  align-items: center;
  margin: var(--spacing-sm) 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.join-dsa-link {
  display: inline-block;
  background: var(--dsa-white);
  color: var(--dsa-red);
  padding: 0.55rem 1.35rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.join-dsa-link:hover {
  background: var(--dsa-yellow);
  color: var(--dsa-black);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.donate-link {
  display: inline-block;
  background: var(--dsa-white);
  color: var(--dsa-red);
  padding: 0.55rem 1.35rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.donate-link:hover {
  background: var(--dsa-yellow);
  color: var(--dsa-black);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.election-header .subtitle {
  color: var(--dsa-white);
  opacity: 0.95;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 1;
  font-weight: 500;
}

.last-updated {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: var(--spacing-sm);
  position: relative;
  z-index: 1;
  font-weight: 600;
}

/* Last-updated under the live section heading */
.live-section .section-heading:has(+ .last-updated) {
  margin-bottom: var(--spacing-sm);
}

.live-section > .last-updated {
  margin-top: 0;
  margin-bottom: var(--spacing-lg);
  font-size: 0.8rem;
  font-weight: 500;
  color: #777;
  opacity: 1;
  text-align: right;
}

/* Season stats moved to top of results body — colors retuned for light bg */
.season-stats-banner {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.season-stats-banner .stats-group:first-child .stats-group-label {
  color: var(--dsa-black);
  opacity: 1;
}

.season-stats-banner .stat-box {
  background: var(--dsa-grey);
  border: 1px solid #ddd;
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
}

.season-stats-banner .stat-box:hover {
  background: #ececec;
}

.season-stats-banner .stat-number {
  color: var(--dsa-black);
}

.season-stats-banner .stat-label {
  color: #666;
}

/* Summary Stats */
.stats-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.stats-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.stats-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.85;
  color: var(--dsa-white);
}

.stats-group:first-child .stats-group-label {
  color: var(--dsa-yellow);
  opacity: 1;
}

.summary-stats {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stat-box {
  background: rgba(255, 255, 255, 0.18);
  padding: 0.4rem 0.75rem 0.5rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  min-width: 72px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-box:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  opacity: 0.9;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

/* Main Content */
.results-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
}

/* Election Date Sections */
.election-section {
  margin-bottom: var(--spacing-xl);
}

.election-section:last-child {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
  border-bottom: 2px solid rgba(35, 31, 32, 0.1);
}

.section-heading h2 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  color: var(--dsa-black);
}

.section-date-short { display: none; }
.section-date-full  { display: inline; }

@media (max-width: 640px) {
  .section-date-short { display: inline; }
  .section-date-full  { display: none; }
}

.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
  padding: 0.3rem 0.7rem;
  background: var(--dsa-grey);
  border-radius: 4px;
}

.race-count {
  margin-left: auto;
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
}

.section-chevron {
  font-size: 1rem;
  color: #888;
  transition: var(--transition-smooth);
}

.section-heading.collapsible {
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.section-heading.collapsible:hover {
  border-bottom-color: var(--dsa-red);
}

.section-heading.collapsible:hover .section-chevron,
.section-heading.collapsible:hover h2 {
  color: var(--dsa-red);
}

/* Live Results section — most visually prominent */
.live-section .section-heading {
  border-bottom: 3px solid var(--dsa-red);
  margin-bottom: var(--spacing-xl);
}

.live-section .section-heading h2 {
  font-size: 2rem;
  color: var(--dsa-black);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--dsa-red);
  color: var(--dsa-white);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(236, 31, 39, 0.4);
}

.live-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--dsa-white);
  animation: live-pulse 1.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Compact stat boxes inside the live section heading */
.section-summary-stats {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(35, 31, 32, 0.04);
  border: 1px solid rgba(35, 31, 32, 0.08);
  line-height: 1;
}

.section-stat-box.is-win {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
}

.section-stat-box.is-running {
  background: rgba(255, 204, 0, 0.18);
  border-color: rgba(255, 204, 0, 0.5);
}

.section-stat-box.is-loss {
  background: rgba(35, 31, 32, 0.06);
  border-color: rgba(35, 31, 32, 0.12);
  opacity: 0.75;
}

.section-stat-number {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dsa-black);
  display: block;
}

.section-stat-label {
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #777;
}

@media (max-width: 768px) {
  .live-text { display: none; }
  .live-badge { padding: 0.4rem; gap: 0; }

  .live-section .section-heading {
    gap: var(--spacing-xs);
  }

  .section-legend {
    order: -1;
    flex-basis: 100%;
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  .section-summary-stats {
    margin-left: auto;
    width: auto;
    justify-content: flex-end;
    gap: 0.25rem;
  }

  .section-stat-box {
    min-width: 40px;
    padding: 0.2rem 0.3rem;
  }

  .section-stat-number {
    font-size: 0.9rem;
  }

  .section-stat-label {
    font-size: 0.55rem;
    letter-spacing: 0.3px;
    margin-top: 0.1rem;
  }
}

/* Upcoming sections — neutral */
.upcoming-section .section-heading h2 {
  color: var(--dsa-black);
}

.upcoming-section .section-eyebrow {
  background: var(--dsa-yellow);
  color: var(--dsa-black);
}

/* Date TBD section */
.tbd-section .section-eyebrow {
  background: #eee;
  color: #666;
}

/* Other Upcoming section — collapsible */
.other-upcoming-section .section-heading h2 {
  color: #555;
}

.other-upcoming-section .nested-sections {
  margin-top: var(--spacing-lg);
  padding-left: var(--spacing-md);
  border-left: 3px solid var(--dsa-grey);
}

.other-upcoming-section .nested-sections .election-section {
  margin-bottom: var(--spacing-lg);
}

.other-upcoming-section .nested-sections .election-section:last-child {
  margin-bottom: 0;
}

.other-upcoming-section .nested-sections .section-heading h2 {
  font-size: 1.2rem;
  color: var(--dsa-black);
}

/* Past Results section — collapsed, muted */
.past-results-section .section-heading h2 {
  color: #555;
}

.candidate-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.candidate-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: #ededed;
  border: 2px solid var(--dsa-grey);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

a.candidate-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.candidate-tile.is-win    { background: #e0f2e6; }
.candidate-tile.is-runoff { background: #fce5d7; }
.candidate-tile.is-loss   { opacity: 0.45; }

.candidate-tile .tile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-sm);
}
.candidate-tile .tile-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.candidate-tile .tile-name   { font-weight: 700; font-size: 1.2rem; line-height: 1.2; color: var(--dsa-black); }
.candidate-tile .tile-office { font-size: 0.85rem; color: #555; line-height: 1.3; }
.candidate-tile .tile-meta   { font-size: 0.75rem; color: #888; }

.candidate-tile .tile-photo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.candidate-tile .tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.candidate-tile .tile-photo.no-photo {
  background: var(--dsa-grey);
  color: #ccc;
  font-size: 1.75rem;
}
.candidate-tile .tile-photo.no-photo i { opacity: 0.5; }

.candidate-tile .tile-footer {
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-xs);
  border-top: 1px solid rgba(35, 31, 32, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.candidate-tile .tile-result {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.candidate-tile .status-badge {
  position: static;
  box-shadow: none;
  font-size: 0.65rem;
  padding: 0.25rem 0.55rem;
}
.candidate-tile .tile-percentage {
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--dsa-black);
  line-height: 1;
}
.candidate-tile.is-win .tile-percentage { color: #16a34a; }

.candidate-tile .tile-info-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--spacing-sm);
  font-size: 0.7rem;
  color: #888;
  line-height: 1.2;
}
.candidate-tile .tile-reporting,
.candidate-tile .tile-last-updated {
  font-size: 0.7rem;
  color: #888;
  line-height: 1.2;
}
.candidate-tile .tile-last-updated {
  white-space: nowrap;
}
.candidate-tile .tile-reporting {
  text-align: right;
  white-space: nowrap;
}
.candidate-tile .tile-polls-close {
  font-size: 0.8rem;
  color: #555;
  font-weight: 500;
}

/* Live-section legend explaining the national-endorsement marker */
.section-legend {
  position: relative;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #555;
  cursor: help;
}

.section-legend:focus { outline: none; }

/* Tooltip explaining the national-endorsement marker — shown on hover/focus
   of either the tile folder tab or the live-section legend */
.tile-folder-tab::after,
.section-legend::after {
  content: "Endorsed by national DSA — backed by the full organization, not just a local chapter.";
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: var(--dsa-black);
  color: var(--dsa-white);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  width: max-content;
  max-width: 180px;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1000;
}

.tile-folder-tab { cursor: help; }

.tile-folder-tab:hover::after,
.tile-folder-tab:focus::after,
.section-legend:hover::after,
.section-legend:focus::after {
  opacity: 1;
  visibility: visible;
}

.section-legend .legend-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border: 1.5px dashed var(--dsa-red);
  border-radius: 4px;
}

.section-legend .legend-tab img {
  height: 14px;
  width: auto;
  display: block;
}

/* Nationally endorsed: full red border + folder tab top-right */
.candidate-tile.is-national,
.past-result-tile.is-national {
  border: 2px solid var(--dsa-red);
}

.tile-folder-tab {
  position: absolute;
  top: -22px;
  right: -2px;
  height: 24px;
  padding: 0 10px;
  background: #ededed;
  border: 2px solid var(--dsa-red);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: center;
  z-index: 2;
  box-sizing: border-box;
}

.candidate-tile.is-win    .tile-folder-tab,
.past-result-tile.is-win  .tile-folder-tab { background: #e0f2e6; }

.candidate-tile.is-runoff   .tile-folder-tab,
.past-result-tile.is-runoff .tile-folder-tab { background: #fce5d7; }

.tile-folder-tab img {
  height: 16px;
  width: auto;
  display: block;
}

/* Past Results — compact tile grid */
.past-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.past-result-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: #ededed;
  border: 2px solid var(--dsa-grey);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

a.past-result-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.past-result-tile.is-win    { background: #e0f2e6; }
.past-result-tile.is-runoff { background: #fce5d7; }
.past-result-tile.is-loss   { opacity: 0.45; }

.past-result-tile .tile-header { display: flex; flex-direction: column; gap: 2px; }
.past-result-tile .tile-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-xs);
}
.past-result-tile .tile-date {
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 600;
  color: #777;
  white-space: nowrap;
  text-align: right;
}
.past-result-tile .tile-name   { font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--dsa-black); }
.past-result-tile .tile-office { font-size: 0.85rem; color: #555; line-height: 1.3; }
.past-result-tile .tile-meta   { font-size: 0.75rem; color: #888; }

.past-result-tile .tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-xs);
  border-top: 1px solid rgba(35, 31, 32, 0.08);
}

.past-result-tile .status-badge {
  position: static;
  box-shadow: none;
  font-size: 0.65rem;
  padding: 0.25rem 0.55rem;
}

.past-result-tile .tile-percentage {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--dsa-black);
}

.past-result-tile.is-win .tile-percentage { color: #16a34a; }

/* Grid Layout */
.candidates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.election-section .candidates-grid {
  margin-bottom: 0;
}

@media (max-width: 1400px) {
  .candidates-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .candidates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Candidate Card */
.candidate-card {
  background: transparent;
  border: none;
  padding: 0;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  position: relative;
  height: 100%;
}

.candidate-card:hover {
  transform: translateY(-4px);
}

/* Card for winners */
.candidate-card.winner .vote-percentage {
  color: var(--dsa-red);
  font-weight: 800;
}

/* Card for losses */
.candidate-card.loss {
  opacity: 0.6;
}

/* Status badge (top left on card) */
.status-badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.status-badge.is-win {
  background: #16a34a;
  color: var(--dsa-white);
}

.status-badge.is-loss {
  background: #666;
  color: var(--dsa-white);
}

.status-badge.is-runoff {
  background: #FF6B35;
  color: var(--dsa-white);
}

/* Candidate Photo */
.candidate-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
}

.candidate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.candidate-photo.no-photo {
  background: var(--dsa-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #ccc;
}

.candidate-photo.no-photo i {
  opacity: 0.4;
}

/* Candidate Info */
.candidate-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.candidate-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dsa-black);
  line-height: 1.2;
}

.candidate-office {
  font-size: 0.85rem;
  color: #888;
  line-height: 1.3;
  font-weight: 400;
  text-align: center;
}

.candidate-meta {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
  text-align: center;
  margin-bottom: var(--spacing-xs);
}

.candidate-chapter {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

a.candidate-chapter:hover {
  color: var(--dsa-red);
  text-decoration: underline;
}

.candidate-state {
  color: #888;
  font-weight: 600;
}

/* Vote Results */
.vote-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: var(--spacing-xs);
  text-align: center;
  position: relative;
  width: 100%;
}

.vote-percentage {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dsa-black);
  line-height: 1;
  text-align: center;
}

.reporting-percent {
  font-size: 0.8rem;
  color: #888;
  font-weight: 500;
  text-align: center;
}

.ballots-counted {
  bottom: 0;
  right: 0;
  text-align: right;
  font-size: 0.65rem;
  color: #999;
  font-weight: 400;
  font-style: italic;
}

.vote-results.no-results {
  padding: 0;
}

.vote-results.no-results .status-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Links Section */
.candidate-links {
  display: none;
  /* Hide links for public display - less clutter */
}

.candidate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background-color: var(--dsa-grey);
  color: var(--dsa-black);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.candidate-link:hover {
  background-color: var(--dsa-red);
  color: var(--dsa-white);
}

.candidate-link i {
  font-size: 1rem;
}

/* Footer */
.election-footer {
  background: linear-gradient(135deg, var(--dsa-black) 0%, #3a3536 100%);
  color: var(--dsa-white);
  padding: var(--spacing-xl);
  text-align: center;
  margin-top: calc(var(--spacing-xl) * 2);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}

.election-footer p {
  color: var(--dsa-white);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.election-footer a {
  color: var(--dsa-red);
  text-decoration: none;
  font-weight: 600;
}

.election-footer a:hover {
  color: var(--dsa-white);
  text-decoration: underline;
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: var(--spacing-md);
  transition: var(--transition-smooth);
}

.footer-logo-link:hover {
  transform: scale(1.05);
  text-decoration: none;
}

.footer-logo {
  width: 200px;
  height: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .election-header img {
    width: 45vw;
  }

  .election-header h1 {
    font-size: 1.4rem;
  }

  .summary-stats {
    gap: var(--spacing-xs);
  }

  .stat-box {
    min-width: 64px;
    padding: 0.5rem 0.6rem 0.35rem;
  }

  .stat-number {
    font-size: 1.1rem;
  }

  .candidate-card {
    padding: var(--spacing-sm);
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
