/* EmbWin Votes — up/down stacks + Top 10 */

.embwin-card-wrap {
  position: relative;
}

.embwin-vote-float {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 5;
}

.embwin-vote-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  min-width: 40px;
  padding: 0.28rem 0.22rem;
  border-radius: 999px;
  background: var(--emb-chip-bg, rgba(255, 255, 255, 0.95));
  color: var(--emb-ink, #1a2332);
  box-shadow: var(--emb-chip-shadow, 0 8px 20px rgba(15, 23, 42, 0.14));
  border: 1px solid var(--emb-line, rgba(15, 23, 42, 0.08));
  backdrop-filter: blur(8px);
}

.embwin-vote-stack--bar {
  flex-direction: row;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 14px;
  box-shadow: none;
}

.embwin-vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--emb-muted, #64748b);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.embwin-vote-btn:hover:not(:disabled) {
  color: var(--emb-accent, #0e7490);
  background: var(--emb-accent-soft, rgba(14, 116, 144, 0.1));
  transform: scale(1.06);
}

.embwin-vote-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.embwin-vote-btn--up.is-active {
  color: var(--emb-accent, #0e7490);
}

.embwin-vote-btn--down.is-active {
  color: var(--emb-warn, #c2410c);
}

.embwin-vote-count {
  font-weight: 800;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--emb-ink, #1a2332);
  min-width: 1.1rem;
  text-align: center;
  padding: 0.1rem 0;
}

.embwin-vote-stack--bar .embwin-vote-count {
  font-size: 0.95rem;
  min-width: 1.4rem;
}

.embwin-vote-ico {
  display: block;
}

.embwin-vote {
  margin: 0 0 1.25rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--emb-line);
  border-radius: 14px;
  background: var(--emb-card, #fff);
}

.embwin-vote__hint {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--emb-muted);
}

.embwin-top-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .embwin-top-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .embwin-top-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.embwin-top-card {
  position: relative;
  display: block;
  text-decoration: none !important;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--emb-card, #fff);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.embwin-top-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--emb-shadow);
}

.embwin-top-card__rank {
  position: absolute;
  z-index: 1;
  top: 0.45rem;
  left: 0.45rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--emb-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.embwin-top-card__media {
  display: block;
  aspect-ratio: 1;
  background: center/cover no-repeat;
}

.embwin-top-card--text {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--emb-line);
}

.embwin-top-card--text .embwin-top-card__meta {
  padding-top: 1.6rem;
}

.embwin-top-card__meta {
  display: block;
  padding: 0.55rem 0.65rem 0.7rem;
}

.embwin-top-card__title {
  display: block;
  color: var(--emb-ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.embwin-top-card__votes {
  display: block;
  margin-top: 0.25rem;
  color: var(--emb-accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.embwin-leaderboard {
  margin: 1rem 0 2rem;
}

.embwin-leaderboard__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.embwin-leaderboard__tab {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--emb-line);
  background: var(--emb-card);
  color: var(--emb-ink);
  font-weight: 700;
  cursor: pointer;
}

.embwin-leaderboard__tab.is-active {
  background: var(--emb-navy);
  border-color: var(--emb-navy);
  color: #fff;
}

.embwin-leaderboard__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--emb-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--emb-card);
}

.embwin-leaderboard__item {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--emb-line);
}

.embwin-leaderboard__item:last-child {
  border-bottom: 0;
}

.embwin-leaderboard__rank {
  font-family: var(--emb-font-display);
  font-weight: 700;
  color: var(--emb-accent);
}

.embwin-leaderboard__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none !important;
  color: var(--emb-ink) !important;
  font-weight: 650;
  min-width: 0;
}

.embwin-leaderboard__thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: center/cover no-repeat;
  flex: 0 0 auto;
}

.embwin-leaderboard__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.embwin-leaderboard__item--text .embwin-leaderboard__link {
  padding-left: 0;
}

.embwin-leaderboard__vote {
  justify-self: end;
}

.embwin-leaderboard__vote .embwin-vote-stack--bar {
  background: var(--emb-paper);
}

.embwin-leaderboard__votes {
  color: var(--emb-accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.embwin-leaderboard__foot,
.embwin-leaderboard__empty {
  margin: 0.85rem 0 0;
  color: var(--emb-muted);
}

/* Full-width Top 100 page */
body.embwin-top-page .magpal-singular-outer-wrapper,
body.embwin-top-page .magpal-post-content-outer-wrapper,
body.embwin-top-page .magpal-outer-wrapper {
  max-width: min(1280px, 100%) !important;
  width: 100%;
}

body.embwin-top-page .magpal-singular-content,
body.embwin-top-page .magpal-post-content-wrapper,
body.embwin-top-page article {
  width: 100%;
  max-width: none;
}

body.embwin-top-page .entry-content {
  max-width: none;
}

/* Hide duplicate share plugins sitewide — keep our end-of-page Share block */
body.embwin-studio .heateor_sss_vertical_sharing,
body.embwin-studio .heateor_sss_sharing_container.heateor_sss_vertical_sharing,
body.embwin-top-page .heateor_sss_sharing_container,
body.embwin-top-page .heateor_sss_horizontal_sharing,
body.embwin-top-page .addtoany_share_save_container,
body.embwin-top-page .addtoany_content {
  display: none !important;
}

/* Engage footer: share + reviews + comments intro */
.embwin-engage {
  margin: 2.25rem 0 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--emb-line);
}

.embwin-engage__title {
  font-family: var(--emb-font-display);
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
  color: var(--emb-navy);
}

.embwin-engage__lede {
  margin: 0 0 0.85rem;
  color: var(--emb-muted);
}

.embwin-engage__share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.embwin-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--emb-navy);
}

.embwin-share-btn--fb { background: #1877f2; }
.embwin-share-btn--pin { background: #bd081c; }
.embwin-share-btn--x { background: #111827; }
.embwin-share-btn--wa { background: #25d366; color: #0f141b !important; }

.embwin-engage__reviews,
.embwin-engage__comments {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--emb-line);
}

body.embwin-top-page #comments,
body.embwin-top-page .comments-area,
body.embwin-top-page .magpal-comments-area {
  max-width: none;
  margin-top: 0.5rem;
}
