/* PIFster of the Month Leaderboard */
.pifster-pom-leaderboard {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: #111827;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.06);
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.pifster-pom-leaderboard__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 18px;
  color: #0f172a;
}

.pifster-pom-leaderboard__icon {
  font-size: 20px;
  line-height: 1;
}

.pifster-pom-leaderboard__period {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  font-weight: 600;
}

.pifster-pom-leaderboard__cta {
  text-align: center;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #fef3c7 0%, #fef9e7 100%);
  border-radius: 8px;
  border: 1px solid #fde68a;
}

.pifster-pom-leaderboard__cta strong {
  color: #0f172a;
  font-weight: 700;
}

.pifster-pom-leaderboard__eyebrow {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 2px 0 10px;
}

.pifster-pom-leaderboard__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.pifster-pom-leaderboard__item {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 8px;
  padding: 10px;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  background: #fafbfc;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pifster-pom-leaderboard__item:hover {
  background: #f0f4f8;
  border-color: #e2e8f0;
}

.pifster-pom-leaderboard__rank {
  font-weight: 700;
  font-size: 15px;
  color: #64748b;
  text-align: center;
  grid-row: 1 / 3;
  align-self: center;
}

.pifster-pom-leaderboard__rank span[aria-label] {
  font-size: 20px;
  line-height: 1;
}

.pifster-pom-leaderboard__name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  grid-column: 2;
  grid-row: 1;
}

.pifster-pom-leaderboard__count {
  font-size: 12px;
  color: #64748b;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  grid-column: 2;
  grid-row: 2;
}

.pifster-pom-leaderboard__count-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pifster-pom-leaderboard__count-primary {
  font-weight: 600;
  color: #475569;
  line-height: 1.2;
}

.pifster-pom-leaderboard__count-secondary {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}

.pifster-pom-leaderboard__count-tertiary {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}

.pifster-pom-leaderboard__join-btn {
  padding: 5px 10px;
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #ec4899;
  border-radius: 6px;
  background: #fdf2f8;
  color: #be185d;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pifster-pom-leaderboard__join-btn:hover,
.pifster-pom-leaderboard__join-btn:focus {
  background: #fbcfe8;
  border-color: #db2777;
  color: #9f1239;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.pifster-pom-leaderboard__countdown {
  margin-top: 14px;
  border: 1px solid #f5ead2;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffbf5 0%, #fff7eb 100%);
  padding: 10px 12px 12px;
  text-align: center;
}

.pifster-pom-leaderboard__countdown-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.pifster-pom-leaderboard__countdown-value {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.pifster-pom-leaderboard__countdown-sublabel {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.pifster-pom-leaderboard__user-stats {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #eef2ff 0%, #f5f7ff 100%);
}

.pifster-pom-leaderboard__user-stats-header {
  font-size: 14px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 8px;
  text-align: center;
}

.pifster-pom-leaderboard__user-rank,
.pifster-pom-leaderboard__user-count {
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
  line-height: 1.5;
}

.pifster-pom-leaderboard__user-rank strong,
.pifster-pom-leaderboard__user-count strong {
  color: #0f172a;
  font-weight: 700;
}

.pifster-pom-leaderboard__user-goal {
  color: #2563eb;
  font-weight: 600;
}

/* Vote Power Incentive */
.pifster-pom-leaderboard__incentive {
  text-align: center;
  font-size: 14px;
  color: #065f46;
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #d1fae5 0%, #ecfdf5 100%);
  border-radius: 8px;
  border: 1px solid #6ee7b7;
}

.pifster-pom-leaderboard__incentive strong {
  color: #047857;
  font-weight: 700;
}

.pifster-pom-leaderboard__incentive-link {
  margin-top: 6px;
  font-size: 12px;
}

.pifster-pom-leaderboard__incentive-link a {
  color: #047857;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.pifster-pom-leaderboard__incentive-link a:hover,
.pifster-pom-leaderboard__incentive-link a:focus {
  color: #065f46;
}

/* User rank states */
.pifster-pom-leaderboard__user-rank--leading {
  font-size: 16px;
  font-weight: 700;
  color: #b45309;
  text-align: center;
}

.pifster-pom-leaderboard__user-status {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.pifster-pom-leaderboard__user-hint {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.pifster-pom-leaderboard__user-proximity {
  font-size: 13px;
  font-weight: 600;
  color: #7c3aed;
  margin-top: 4px;
  margin-bottom: 8px;
}

.pifster-pom-leaderboard__user-link {
  margin-top: 8px;
  margin-bottom: 8px;
}

.pifster-pom-leaderboard__user-link label {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.pifster-pom-leaderboard__user-link-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-family: ui-monospace, monospace;
}

.pifster-pom-leaderboard__copy-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid #ec4899;
  border-radius: 8px;
  background: linear-gradient(180deg, #fce7f3 0%, #fbcfe8 100%);
  color: #be185d;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 8px;
}

.pifster-pom-leaderboard__copy-btn:hover,
.pifster-pom-leaderboard__copy-btn:focus {
  background: linear-gradient(180deg, #fbcfe8 0%, #f9a8d4 100%);
  border-color: #db2777;
  color: #9f1239;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.25);
  transform: translateY(-1px);
}

/* Guest sign-in CTA - subtle pill style */
.pifster-pom-leaderboard__user-stats--guest {
  padding: 12px;
}

.pifster-pom-leaderboard__sign-in-cta {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

/* Guest nudge - clickable text prompt */
.pifster-pom-leaderboard__guest-nudge {
  display: block;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: #64748b;
  padding: 12px 8px;
  margin-top: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.pifster-pom-leaderboard__guest-nudge:hover,
.pifster-pom-leaderboard__guest-nudge:focus {
  color: #475569;
  transform: scale(1.02);
}

.pifster-pom-leaderboard__toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 20px;
  background: #1f2937;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.pifster-pom-leaderboard__toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pifster-pom-leaderboard--empty .pifster-pom-leaderboard__empty-content {
  text-align: center;
  padding: 16px 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.pifster-pom-leaderboard--empty .pifster-pom-leaderboard__empty-content p {
  margin: 0 0 8px 0;
}

.pifster-pom-leaderboard--empty .pifster-pom-leaderboard__empty-content p:first-child {
  font-weight: 600;
  color: #475569;
  font-size: 15px;
}

.pifster-pom-leaderboard--empty .pifster-pom-leaderboard__empty-content p:last-child {
  margin-bottom: 0;
}

.pifster-pom-leaderboard__empty-learn-more {
  margin-top: 8px;
  font-size: 12px;
}

.pifster-pom-leaderboard__empty-learn-more a {
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.pifster-pom-leaderboard__empty-learn-more a:hover,
.pifster-pom-leaderboard__empty-learn-more a:focus {
  color: #475569;
}

.pifster-pom-leaderboard::after {
  content: "";
  display: block;
  width: 46px;
  height: 6px;
  border-radius: 999px;
  background: #e9eef5;
  margin: 10px auto 2px;
}

/* Mobile: two-row layout is now the default, no special handling needed */

@media (min-width: 1024px) {
  .pifster-pom-leaderboard {
    max-width: 400px;
    position: sticky;
    top: 16px;
  }
}
