/* Force vote UI to use the same typography as the page */
.voteCard, .voteCard *{
  font-family: "IBM Plex Sans Thai", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.voteWrap{
  width: min(var(--maxw), 100%);
  padding: 0 16px 28px;
  margin: 10px auto 0;
  display: flex;
  justify-content: center;
}

.voteCard{
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 26px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
}

.voteHeader{ text-align:center; margin-bottom: 14px; }
.voteTitle{ font-weight: 800; font-size: 22px; line-height: 1.15; }
.voteSub{
  margin-top: 6px;
  font-weight: 600;
  color: rgba(0,0,0,.55);
  font-size: 24px;
}
.voteSub .voteNum{ color: var(--pink); font-weight: 800; }

.voteList{ display: grid; gap: 14px; }

/* Row (button) */
.voteItem{
  font-family: inherit;
  letter-spacing: 0;
  position: relative;
  width: 100%;
  height: 74px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  overflow: hidden;
  transition: transform 120ms ease;
}

.voteItem:hover{ transform: translateY(-1px); }
.voteItem:active{ transform: translateY(0px) scale(.99); }

/* Background pill */
.voteBg{
  position: absolute;
  inset: 0;
  background: rgba(219,105,111,.12);
}

/* Fill bar (hidden until results mode) */
.voteFill{
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--pink);
  transition: width 420ms ease;
  opacity: 0; /* default hidden */
}

/* Text left */
.voteText{
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 24px;
  color: rgba(0,0,0,.72);
  z-index: 2;
}

/* Percent right (hidden until results mode) */
.votePct{
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 24px;
  color: rgba(0,0,0,.55);
  z-index: 2;
  opacity: 0;
}

/* Results mode: show fill + percent */
.voteCard.results .voteFill{ opacity: 1; }
.voteCard.results .votePct{ opacity: 1; }

/* When fill is strong, keep text readable */
.voteCard.results .voteText{
  left: 28px;
  transform: translateY(-50%);
  text-align: left;
  color: rgba(0,0,0,.78);
}

/* Button mode: center label */
.voteCard:not(.results) .voteText{
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Disable clicking after locked OR after voted */
.voteItem:disabled{
  cursor: not-allowed;
}

/* Locked state: no hover/press visuals */
.voteCard.locked .voteItem{
  opacity: .45;
}
.voteCard.locked .voteItem:hover,
.voteCard.locked .voteItem:active{
  transform: none;
}

/* When results are shown, rows are no longer interactive */
.voteCard.results .voteItem{
  cursor: default;
  pointer-events: none;
}

/* Remove hover / press animation completely */
.voteCard.results .voteItem:hover{
  transform: none;
}

.voteCard.results .voteItem:active{
  transform: none;
}

/* While loading: block all clicks and show spinner */
.voteCard.loading .voteItem{
  pointer-events: none;
}

.voteCard.loading::after{
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.18);
  border-top-color: var(--pink);
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Desktop 50% */
@media (min-width: 860px){
  .voteCard{ width: 55%; max-width: 520px; }
}