/* Polls plugin — frontend poll display (moved from core cms.css). Uses theme tokens from style.css. */
/* ---------------------------------------------------------------------------
   Polls — embedded via the [poll_<id>] shortcode, rendered anywhere a body is
   shown. Uses the theme tokens defined in style.css.
   --------------------------------------------------------------------------- */
.mp-poll {
  margin: 1.75rem 0; padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid var(--border); border-radius: 1rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 6%, var(--card)), var(--card));
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.mp-poll-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.mp-poll-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: .2rem .55rem; border-radius: 999px;
}
.mp-poll-ico { width: .9rem; height: .9rem; }
.mp-poll-closed {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted-foreground); background: var(--muted); padding: .2rem .5rem; border-radius: 999px;
}
.mp-poll-q { font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 1.15rem; line-height: 1.35; color: var(--foreground); }
.mp-poll-q > :first-child { margin-top: 0; }
.mp-poll-q p { margin: .25rem 0; }

.mp-poll-options { display: flex; flex-direction: column; gap: .5rem; margin: .9rem 0 1rem; }
.mp-poll-option {
  display: flex; align-items: center; gap: .65rem; cursor: pointer;
  padding: .65rem .85rem; border: 1px solid var(--border); border-radius: .7rem;
  background: var(--card); transition: border-color .15s, background .15s, box-shadow .15s;
}
.mp-poll-option:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--card)); }
.mp-poll-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.mp-poll-dot {
  width: 1.05rem; height: 1.05rem; border-radius: 999px; border: 2px solid var(--border);
  flex: 0 0 auto; position: relative; transition: border-color .15s;
}
.mp-poll-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.mp-poll-option:has(input:checked) .mp-poll-dot { border-color: var(--primary); }
.mp-poll-option:has(input:checked) .mp-poll-dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 999px; background: var(--primary);
}
.mp-poll-label { font-size: .98rem; color: var(--foreground); }

.mp-poll-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.mp-poll-vote {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  background: var(--primary); color: var(--primary-foreground, #fff);
  font-weight: 600; font-size: .92rem; padding: .55rem 1.1rem; border: 0; border-radius: .6rem;
  transition: filter .15s;
}
.mp-poll-vote:hover { filter: brightness(.95); }
.mp-poll-vote:disabled { opacity: .5; cursor: not-allowed; }
.mp-poll-link {
  background: none; border: 0; cursor: pointer; color: var(--muted-foreground);
  font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; padding: 0;
}
.mp-poll-link:hover { color: var(--primary); }
.mp-poll-link[hidden] { display: none; }

.mp-poll-results { display: none; margin-top: .3rem; }
.mp-poll.is-results .mp-poll-results { display: block; }
.mp-poll.is-results .mp-poll-form { display: none; }
.mp-poll-result { margin-bottom: .7rem; }
.mp-poll-result-top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .3rem; }
.mp-poll-result-label { font-size: .95rem; color: var(--foreground); }
.mp-poll-result-pct { font-weight: 700; color: var(--foreground); font-variant-numeric: tabular-nums; }
.mp-poll-you {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: .05rem .4rem; border-radius: 999px; margin-left: .4rem;
}
.mp-poll-bar { height: .6rem; border-radius: 999px; background: var(--muted); overflow: hidden; }
.mp-poll-bar-fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--gold, #d9a441)));
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.mp-poll-result.is-mine .mp-poll-bar-fill { background: linear-gradient(90deg, var(--primary), var(--primary)); }
.mp-poll-result-votes { font-size: .78rem; color: var(--muted-foreground); margin-top: .25rem; }
.mp-poll-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: .9rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.mp-poll-total { font-size: .85rem; font-weight: 600; color: var(--muted-foreground); }
.mp-poll-flash { margin-top: .6rem; font-size: .85rem; font-weight: 600; color: var(--destructive); }
