/* Up/down vote controls on a community build card.
 *
 * Extracted so a FOURTH page did not have to paste a fourth copy. The three
 * hub stylesheets (arena-teams, guild-boss, event-teams) each carry these rules
 * scoped to their own `body[data-route=…]`, which is why they are unscoped
 * here: a route-scoped copy beats an unscoped one on specificity, so the hubs
 * keep rendering from their own rules and nothing about them changes. Migrating
 * them onto this file is a separate, visible change and belongs in its own
 * commit — until then, retune here AND there.
 *
 * The markup contract is `.community-build-vote-controls` wrapping two
 * `.community-build-vote-button`s, each with an icon and a
 * `.community-build-vote-count`.
 */

.community-build-vote-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.community-build-vote-button {
  appearance: none;
  min-width: 1.92rem;
  min-height: 1.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.14rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 0.52rem;
  background: transparent;
  box-shadow: none;
  color: #f8fbff;
  font-family: "Inter", "Outfit", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.community-build-vote-button:hover,
.community-build-vote-button:focus-visible,
.community-build-vote-button.is-active {
  filter: brightness(1.14);
  transform: translateY(-1px);
  outline: none;
}

.community-build-vote-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.community-build-vote-icon {
  width: 1.08rem;
  height: 1.08rem;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0.1rem 0.08rem rgba(0, 0, 0, 0.98))
    drop-shadow(0 0.02rem 0.22rem rgba(0, 0, 0, 0.86));
  pointer-events: none;
}

.community-build-vote-count {
  min-width: 0.78rem;
  text-align: center;
  text-shadow: 0 0.08rem 0.08rem rgba(0, 0, 0, 0.98), 0 0 0.2rem rgba(0, 0, 0, 0.9);
}

.community-build-vote-count--up::before {
  content: "+";
}

/* Downvotes are recorded, and the count is deliberately not shown — the same
   decision the hubs make. The button stays, so the vote is still castable; it
   is the running total that is withheld, because a visible negative tally on a
   volunteer's work discourages posting more than it informs anyone. */
.community-build-vote-controls .community-build-vote-count--down {
  display: none;
}

@media (max-width: 560px) {
  .community-build-vote-controls {
    gap: 0.1rem;
  }

  .community-build-vote-button {
    min-width: 1.22rem;
    min-height: 1.5rem;
    padding: 0.14rem 0.01rem;
  }

  .community-build-vote-icon {
    width: 0.9rem;
    height: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-build-vote-button {
    transition: none;
  }

  .community-build-vote-button:hover,
  .community-build-vote-button:focus-visible,
  .community-build-vote-button.is-active {
    transform: none;
  }
}
