/* Channels-style election poll results chart */

.ec-epoll {
  --epoll-ink: #16315a;
  --epoll-muted: #6b7c93;
  --epoll-line: rgba(22, 49, 90, 0.12);
  --epoll-track: #dbe7f2;
  --epoll-red: #d32f2f;
  --epoll-check: #2e9d46;
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  padding: 1.15rem 1rem 1.1rem;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(180deg, #f4f8fc 0%, #e8f0f7 100%);
  border: 1px solid rgba(148, 175, 198, 0.35);
  box-shadow: 0 10px 28px rgba(15, 40, 70, 0.08);
}

.ec-epoll::before,
.ec-epoll::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 18px solid rgba(180, 198, 214, 0.18);
  pointer-events: none;
}
.ec-epoll::before {
  width: 210px;
  height: 210px;
  right: -40px;
  top: -50px;
}
.ec-epoll::after {
  width: 150px;
  height: 150px;
  right: 70px;
  top: 20px;
  border-width: 12px;
}

html.dark .ec-epoll {
  --epoll-ink: #e8eef7;
  --epoll-muted: rgba(232, 238, 247, 0.62);
  --epoll-line: rgba(255, 255, 255, 0.12);
  --epoll-track: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #152033 0%, #0f1a2c 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.ec-epoll__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ec-epoll__mark {
  flex: 0 0 auto;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.7rem;
  overflow: hidden;
  background: linear-gradient(180deg, #1d4e89, #16315a);
  box-shadow: 0 6px 14px rgba(22, 49, 90, 0.22);
  display: grid;
  place-items: center;
}
.ec-epoll__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ec-epoll__titles {
  min-width: 0;
}
.ec-epoll__kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--epoll-muted);
}
.ec-epoll__headline {
  margin: 0.1rem 0 0;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--epoll-ink);
  text-transform: uppercase;
}
.ec-epoll__location {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.18rem 0.7rem 0.22rem;
  border-radius: 0.28rem;
  background: var(--epoll-red);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.ec-epoll__plot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.35rem;
  min-height: 17.5rem;
}

.ec-epoll--compact .ec-epoll__plot {
  min-height: 14.5rem;
}

.ec-epoll__chart {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ec-epoll__plot-area {
  position: relative;
  flex: 1 1 auto;
  min-height: 12.5rem;
}
.ec-epoll__tracks {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 12.5rem;
  display: grid;
  align-items: stretch;
}
.ec-epoll__col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  cursor: default;
}

.ec-epoll__labels {
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 0.35rem 0.2rem 0;
}

.ec-epoll__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.ec-epoll__yaxis {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.35rem 0 4.35rem;
}
.ec-epoll__tick {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--epoll-muted);
  line-height: 1;
}
.ec-epoll__ylabel {
  position: absolute;
  left: -0.15rem;
  top: 50%;
  transform: translate(-50%, -70%) rotate(-90deg);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--epoll-muted);
  white-space: nowrap;
}

.ec-epoll__bars {
  position: relative;
  display: grid;
  align-items: stretch;
  padding: 0.2rem 0.2rem 0;
  min-width: 0;
}
.ec-epoll__gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--epoll-line);
  pointer-events: none;
}

.ec-epoll__col.is-vote {
  cursor: pointer;
}
.ec-epoll__col.is-vote:hover .ec-epoll__bar {
  filter: brightness(1.06);
  transform: translateY(-2px);
}
.ec-epoll__col.is-mine .ec-epoll__count {
  color: var(--epoll-red);
}

.ec-epoll__track {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  height: 100%;
  border-bottom: 2px solid #1f3b5c;
}
html.dark .ec-epoll__track {
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.ec-epoll__stack {
  position: relative;
  width: 58%;
  max-width: 5.6rem;
  min-width: 2.6rem;
  min-height: 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.ec-epoll__photo {
  position: relative;
  z-index: 2;
  width: 3.15rem;
  height: 3.15rem;
  margin-bottom: -0.85rem;
  border-radius: 50%;
  overflow: hidden;
  background: #cfd8e3;
  box-shadow: 0 4px 10px rgba(15, 40, 70, 0.18);
  border: 2px solid #fff;
}
.ec-epoll__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.ec-epoll__check {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--epoll-check);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  border: 2px solid #fff;
}

.ec-epoll__bar {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0.45rem;
  border-radius: 0.35rem 0.35rem 0 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.ec-epoll__count {
  margin-top: 0.45rem;
  font-size: clamp(0.72rem, 1.8vw, 0.95rem);
  font-weight: 800;
  color: var(--epoll-ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.ec-epoll__party {
  margin-top: 0.35rem;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 40, 70, 0.12);
  display: grid;
  place-items: center;
}
.ec-epoll__party img {
  width: 86%;
  height: 86%;
  object-fit: contain;
}
.ec-epoll__party-fallback {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--epoll-ink);
  text-align: center;
  line-height: 1.05;
  padding: 0.15rem;
}

.ec-epoll__meta {
  position: relative;
  z-index: 1;
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}
.ec-epoll__status {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--epoll-muted);
}
.ec-epoll__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: #16315a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.ec-epoll__cta:hover {
  background: #1d4e89;
}

.ec-epoll-vote {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: 0.95rem 0.95rem 1rem;
  border-radius: 0.95rem;
  background: #fff;
  border: 1px solid rgba(22, 49, 90, 0.12);
  box-shadow: 0 8px 20px rgba(15, 40, 70, 0.06);
}
html.dark .ec-epoll-vote {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.ec-epoll-vote.is-done {
  background: rgba(46, 157, 70, 0.08);
  border-color: rgba(46, 157, 70, 0.28);
}
.ec-epoll-vote__kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--epoll-muted);
}
.ec-epoll-vote__title {
  margin: 0.18rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--epoll-ink);
}
.ec-epoll-vote__hint {
  margin: 0.28rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--epoll-muted);
  line-height: 1.4;
}
.ec-epoll-vote__list {
  display: grid;
  gap: 0.45rem;
  margin: 0.85rem 0 0.8rem;
}
.ec-epoll-vote__choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(22, 49, 90, 0.12);
  background: #f7fafc;
  cursor: pointer;
}
html.dark .ec-epoll-vote__choice {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
.ec-epoll-vote__choice input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #1b8a3e;
  flex: 0 0 auto;
}
.ec-epoll-vote__choice.is-selected {
  border-color: #1b8a3e;
  background: rgba(27, 138, 62, 0.1);
  box-shadow: inset 0 0 0 1px #1b8a3e;
}
.ec-epoll-vote__swatch {
  width: 0.7rem;
  height: 2rem;
  border-radius: 999px;
  flex: 0 0 auto;
}
.ec-epoll-vote__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.ec-epoll-vote__copy strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--epoll-ink);
}
.ec-epoll-vote__copy em {
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--epoll-muted);
}
.ec-epoll-vote__submit {
  width: 100%;
  min-height: 2.85rem;
  border: 0;
  border-radius: 0.8rem;
  background: #1b8a3e;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.ec-epoll-vote__submit:hover:not(:disabled) {
  background: #167a36;
}
.ec-epoll-vote__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ec-epoll-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ec-epoll-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 49, 90, 0.14);
  background: #fff;
  color: #16315a;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
html.dark .ec-epoll-share__btn {
  background: rgba(255, 255, 255, 0.06);
  color: #e8eef7;
  border-color: rgba(255, 255, 255, 0.12);
}
.ec-epoll-share__btn:hover {
  border-color: #d4a017;
  color: #b8862e;
}

.ec-epoll-host {
  margin-top: 1.25rem;
}
.ec-epoll-host[hidden] {
  display: none !important;
}
.ec-epoll-slot + .ec-epoll-slot {
  margin-top: 1rem;
}

.ec-epoll-page {
  padding-bottom: 4rem;
}
.ec-epoll-page__lead {
  margin: 0 0 1.1rem;
  max-width: 40rem;
  font-size: 0.95rem;
  color: #475569;
}
html.dark .ec-epoll-page__lead {
  color: rgba(255, 255, 255, 0.65);
}
.ec-epoll-page__empty,
.ec-epoll-page__error {
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgba(15, 40, 70, 0.04);
  color: #334155;
}
html.dark .ec-epoll-page__empty,
html.dark .ec-epoll-page__error {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
}

.ec-epoll-opt {
  border: 1px solid rgba(148, 175, 198, 0.35);
  border-radius: 0.9rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
}
html.dark .ec-epoll-opt {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
.ec-epoll-opt__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.ec-epoll-opt__head strong {
  font-size: 0.82rem;
}
.ec-epoll-opt__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.ec-epoll-opt__preview {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  object-fit: cover;
  background: #dbe7f2;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 40, 70, 0.12);
}
.ec-epoll-opt__preview.is-logo {
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 0.2rem;
}

@media (max-width: 640px) {
  .ec-epoll__plot {
    grid-template-columns: 1.8rem 1fr;
    min-height: 15.5rem;
  }
  .ec-epoll__photo {
    width: 2.45rem;
    height: 2.45rem;
  }
  .ec-epoll__stack {
    width: 70%;
    min-width: 2.1rem;
  }
  .ec-epoll__count {
    font-size: 0.68rem;
  }
  .ec-epoll-opt__media {
    grid-template-columns: 1fr;
  }
}
