/* Passe un Dessin — results voting visibility patch v2.
   Purely visual; no changes to click handlers, votes, scores or API. */

/* The original styled-components hover rule has no &. Mark only real voting
   overlays (with their existing data-test buttons) from the companion script. */
@media (hover: hover) and (pointer: fine) {
  .pud-vote-overlay:hover,
  .pud-vote-overlay:focus-within {
    opacity: 1 !important;
  }

  .pud-vote-overlay [data-test="upvote"]:hover > svg,
  .pud-vote-overlay [data-test="downvote"]:hover > svg {
    transform: scale(1.12) !important;
  }
}

/* Undo the old SVG-mask override that made the thumb disappear in Firefox.
   The companion script paints the original SVG path using native SVG
   <linearGradient>, with a solid color fallback until the script runs. */
svg.pud-vote-thumb {
  -webkit-mask: none !important;
  mask: none !important;
  background: none !important;
  overflow: visible !important;
}

svg.pud-vote-thumb > path.main {
  stroke: white !important;
  stroke-width: 1.9px !important;
  stroke-linejoin: round !important;
  paint-order: stroke fill !important;
  filter: drop-shadow(0 1px 1px rgba(17, 21, 34, .9));
}

/* The two clickable icons: large, outlined, and legible even on a light drawing. */
.pud-vote-overlay [data-test="upvote"] > svg,
.pud-vote-overlay [data-test="downvote"] > svg {
  width: 32px !important;
  height: 32px !important;
  box-sizing: content-box;
  padding: 9px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: rgba(31, 26, 53, .91) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .55);
  transition: transform .12s ease !important;
}

/* Keep the small post-vote counters unobtrusive but visible. */
svg.pud-vote-thumb {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .65));
}

/* Preserve the original touch layout: don't enlarge the two 24px touch buttons. */
@media (hover: none), (pointer: coarse) {
  .pud-vote-overlay [data-test="upvote"] > svg,
  .pud-vote-overlay [data-test="downvote"] > svg {
    width: 24px !important;
    height: 24px !important;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}
