/* Scoped styles for the risultati_comunali_2026 shortcode. */
.pdaerc-results {
  --election-green: #0a7a3d;
  --election-green-dark: #075b2e;
  --election-red: #c92222;
  --election-blue: #073b7a;
  --election-blue-dark: #052654;
  --election-ink: #162033;
  --election-muted: #667085;
  --election-paper: #fffaf1;
  --election-border: rgba(22, 32, 51, .14);
}

.entry-content .pdaerc-results {
	max-width: 100% !important;
}

.pdaerc-results {
  color: var(--election-ink);
  background:
    radial-gradient(circle at top left, rgba(10, 122, 61, .13), transparent 34rem),
    radial-gradient(circle at top right, rgba(201, 34, 34, .12), transparent 32rem),
    #f5f7fb;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pdaerc-results .page-shell {
  max-width: 1180px;
}

.pdaerc-results .site-brand {
  min-height: 74px;
  color: #fff;
  background: linear-gradient(135deg, #06182f, #075b2e);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 16px 45px rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px);
}

.pdaerc-results .site-brand .text-secondary {
  color: rgba(255, 255, 255, .72) !important;
}

.pdaerc-results .site-brand .fw-semibold {
  color: #fff;
}

.pdaerc-results .portal-logo {
  width: min(260px, 62vw);
  height: auto;
}

.pdaerc-results .hero {
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5, 38, 84, .96), rgba(7, 91, 46, .94)),
    linear-gradient(45deg, rgba(255, 255, 255, .12) 25%, transparent 25%);
  box-shadow: 0 22px 60px rgba(5, 38, 84, .18);
}

.pdaerc-results .hero::after {
  position: absolute;
  inset: auto -4rem -6rem auto;
  width: 18rem;
  height: 18rem;
  content: "";
  background: rgba(255, 255, 255, .09);
  border-radius: 999px;
}

.pdaerc-results .civic-mark {
  display: grid;
  place-items: center;
  width: min(170px, 50vw);
  padding: .75rem;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 1.4rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .2);
}

.pdaerc-results .civic-crest {
  display: block;
  width: 100%;
  height: auto;
}

.pdaerc-results .eyebrow {
  color: rgba(255, 255, 255, .78);
  letter-spacing: .12em;
}

.pdaerc-results .metric-card,
.pdaerc-results .result-panel,
.pdaerc-results .list-card,
.pdaerc-results .source-card {
  border: 1px solid var(--election-border);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.pdaerc-results .metric-card {
  background: rgba(255, 255, 255, .94);
}

.pdaerc-results .metric-value {
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1;
}

.pdaerc-results .section-banner {
  color: #fff;
  border-radius: 1rem 1rem 0 0;
}

.pdaerc-results .section-banner.majority {
  background: linear-gradient(135deg, var(--election-green), var(--election-green-dark));
}

.pdaerc-results .section-banner.opposition {
  background: linear-gradient(135deg, var(--election-red), #8e1717);
}

.pdaerc-results .result-panel {
  overflow: hidden;
  background: rgba(255, 255, 255, .96);
  border-radius: 1rem;
}

.pdaerc-results .candidate-strip {
  background: var(--election-blue);
}

.pdaerc-results .candidate-strip.secondary {
  background: var(--election-blue-dark);
}

.pdaerc-results .list-card {
  background: #fff;
  border-radius: .9rem;
  transition: transform .18s ease, box-shadow .18s ease;
}

.pdaerc-results .list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .12);
}

.pdaerc-results .party-logo,
.pdaerc-results .party-fallback {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
/*   border: 2px solid rgba(15, 23, 42, .1); */
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .85);
}

.pdaerc-results .party-logo {
  object-fit: contain;
  padding: .25rem;
}

.pdaerc-results .party-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  line-height: 1.05;
}

.pdaerc-results .fallback-green { background: linear-gradient(135deg, #0a7a3d, #094e2a); }
.pdaerc-results .fallback-blue { background: linear-gradient(135deg, #0b4f94, #052654); }
.pdaerc-results .fallback-red { background: linear-gradient(135deg, #d62828, #8c1b1b); }
.pdaerc-results .fallback-gold { background: linear-gradient(135deg, #d89b18, #895d00); }
.pdaerc-results .fallback-teal { background: linear-gradient(135deg, #098b8f, #075b5e); }

.pdaerc-results .seat-badge {
  color: #fff;
  background: var(--election-green);
  border-radius: 999px;
  white-space: nowrap;
}

.pdaerc-results .seat-badge.blue {
  background: var(--election-blue);
}

.pdaerc-results .percentage-bar {
  height: .55rem;
  overflow: hidden;
  background: #e8edf5;
  border-radius: 999px;
}

.pdaerc-results .percentage-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--election-green), #41b883);
  border-radius: inherit;
}

.pdaerc-results .percentage-bar.blue > span {
  background: linear-gradient(90deg, var(--election-blue), #4f8bd6);
}

.pdaerc-results .elected-list {
  display: grid;
  gap: .45rem;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.pdaerc-results .elected-list li {
  display: flex;
  gap: .55rem;
  align-items: baseline;
  color: #344054;
}

.pdaerc-results .elected-list li::before {
  flex: 0 0 auto;
  width: .45rem;
  height: .45rem;
  margin-top: .55rem;
  content: "";
  background: currentColor;
  border-radius: 999px;
  opacity: .45;
}

.pdaerc-results .council-summary {
  color: #fff;
  background: linear-gradient(135deg, #082245, #06182f);
  box-shadow: 0 22px 55px rgba(5, 38, 84, .2);
}

.pdaerc-results .summary-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border-radius: 1rem;
}

.pdaerc-results .source-card {
  color: #475467;
  background: rgba(255, 255, 255, .92);
}

.pdaerc-results .eligendo-logo {
  width: 170px;
  max-width: 100%;
  height: auto;
  padding: .7rem .9rem;
  background: #081f3f;
  border-radius: .75rem;
}

@media (max-width: 575.98px) {
  .pdaerc-results .site-brand {
    justify-content: center;
    text-align: center;
  }

  .pdaerc-results .party-logo,
  .pdaerc-results .party-fallback {
    width: 64px;
    height: 64px;
  }
}
