/* ── Speaker Voting ── */

/* ─── Star picker widget ─────────────────────── */

.sv-stars {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  cursor: pointer;
}

.sv-star {
  font-size: 1.4rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.2);
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}

.sv-star:hover,
.sv-star--on {
  color: #fbbf24;
  transform: scale(1.15);
}

.sv-vote-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  display: block;
  margin-bottom: 8px;
}

.sv-widget {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
}

.sv-widget-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sv-avg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #fbbf24;
  font-weight: 700;
}

.sv-count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--grey);
  letter-spacing: 0.08em;
}

/* ─── Star display (read-only, leaderboard) ──── */

.sv-star-disp {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.15);
}

.sv-star-disp--on {
  color: #fbbf24;
}

/* ─── Modal ──────────────────────────────────── */

/* display:flex on state containers has equal CSS specificity to [hidden]{display:none},
   so the class rule wins and hidden stops working. Force it to always win. */
.sv-modal-state[hidden] {
  display: none !important;
}

.sv-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sv-modal[hidden] {
  display: none;
}

.sv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sv-modal-box {
  position: relative;
  z-index: 1;
  background: var(--dark-2, #161616);
  border: 1px solid var(--border-2, rgba(255, 255, 255, 0.16));
  width: 100%;
  max-width: 380px;
  padding: 40px 36px 36px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.sv-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  background: var(--accent, #7237c8);
  color: #fff;
  border: none;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.sv-modal-close:hover {
  background: #5c2ba0;
}

.sv-modal-label {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white, #fff);
  text-align: center;
  margin: 20px 0;
}

.sv-modal-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--grey, rgba(255, 255, 255, 0.55));
  text-align: center;
  margin-top: 20px;
}

.sv-modal-hint {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--grey, rgba(255, 255, 255, 0.55));
  text-align: center;
  margin: 0;
}

/* Loading */
.sv-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent, #7237c8);
  border-radius: 50%;
  animation: sv-spin 0.7s linear infinite;
}

@keyframes sv-spin {
  to {
    transform: rotate(360deg);
  }
}

.sv-state-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  color: var(--grey, rgba(255, 255, 255, 0.55));
  font-family: var(--font-mono);
  font-size: 1rem;
}

/* QR */
.sv-qr-wrap {
  background: #111;
  padding: 12px;
  border: 1px solid var(--border-2, rgba(255, 255, 255, 0.16));
  display: flex;
  align-items: center;
  justify-content: center;
}

.sv-qr-wrap canvas,
.sv-qr-wrap img {
  display: block;
}

/* BTCPay logo */
.sv-btcpay-logo {
  display: block;
  width: auto;
  margin: 20px auto;
  background: #fff;
  padding: 10px 20px;
  border-radius: 8px;
}

/* BOLT11 copy area */
.sv-bolt11-wrap {
  display: flex;
  width: 100%;
  gap: 0;
}

.sv-bolt11 {
  flex: 1;
  background: var(--dark-3, #1e1e1e);
  border: 1px solid var(--border-2, rgba(255, 255, 255, 0.16));
  border-right: none;
  color: var(--grey, rgba(255, 255, 255, 0.55));
  font-family: var(--font-mono);
  font-size: 0.55rem;
  padding: 8px 10px;
  resize: none;
  height: 48px;
  overflow: hidden;
}

.sv-copy-btn {
  background: var(--dark-3, #1e1e1e);
  border: 1px solid var(--border-2, rgba(255, 255, 255, 0.16));
  color: var(--white, #fff);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.sv-copy-btn:hover {
  background: var(--accent, #7237c8);
}

.sv-timer {
  color: var(--accent, #7237c8);
  font-weight: 700;
}

/* Success */
.sv-state-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.sv-success-icon {
  font-size: 3rem;
  animation: sv-pop 0.4s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

@keyframes sv-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Expired / Error */
.sv-state-expired,
.sv-state-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.sv-retry-btn {
  font-size: 0.65rem;
  padding: 10px 24px;
}

/* ─── Artist card rating badge ──────────────── */

.sv-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  pointer-events: none;
}

.sv-card-badge .sv-avg {
  font-size: 0.65rem;
}

/* ─── Leaderboard ────────────────────────────── */

.sv-leaderboard-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--border);
}

.sv-leaderboard-header {
  /* 3 × 240px cards + 2 × 16px gaps = 752px — same width as the podium */
  max-width: 752px;
  margin: 0 auto 64px;
  text-align: center;
}

.sv-leaderboard-intro {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--grey);
}

.sv-leaderboard-intro strong {
  color: var(--white);
  font-weight: 700;
}

/* Flash the leaderboard when the order updates */
@keyframes sv-lb-flash {
  0% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

.sv-lb-flash {
  animation: sv-lb-flash 0.6s ease-out both;
}

/* Podium */
.sv-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}

.sv-podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 240px;
  position: relative;
  padding: 32px 20px 28px;
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}

.sv-podium-card:hover {
  border-color: var(--border-2);
}

.sv-podium-card--gold {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.04);
  transform: translateY(-24px);
}

.sv-podium-card--gold:hover {
  border-color: rgba(251, 191, 36, 0.6);
}

.sv-podium-card--silver {
  border-color: rgba(200, 200, 210, 0.2);
  background: rgba(200, 200, 210, 0.03);
}

.sv-podium-card--bronze {
  border-color: rgba(180, 120, 60, 0.2);
  background: rgba(180, 120, 60, 0.03);
}

.sv-podium-rank {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.sv-podium-card--gold .sv-podium-rank {
  background: #fbbf24;
  color: #0a0a0a;
}
.sv-podium-card--silver .sv-podium-rank {
  background: #c8c8d2;
  color: #0a0a0a;
}
.sv-podium-card--bronze .sv-podium-rank {
  background: #b4783c;
  color: #fff;
}

.sv-podium-photo {
  display: block;
  width: 80px;
  height: 80px;
  overflow: hidden;
  flex-shrink: 0;
}

.sv-podium-card--gold .sv-podium-photo {
  width: 96px;
  height: 96px;
}

.sv-podium-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.3s;
}

.sv-podium-card:hover .sv-podium-photo img {
  filter: grayscale(0%);
}

.sv-podium-no-photo {
  width: 100%;
  height: 100%;
  background: var(--dark-3);
}

.sv-podium-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.sv-podium-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.1;
}

.sv-podium-role {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--grey);
  text-transform: uppercase;
}

.sv-podium-stars {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

.sv-podium-votes {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--grey);
  letter-spacing: 0.06em;
}

/* Top-10 list */
.sv-lb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.sv-lb-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.sv-lb-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.sv-lb-rank {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--grey);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.sv-lb-photo {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  overflow: hidden;
}

.sv-lb-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sv-lb-no-photo {
  width: 100%;
  height: 100%;
  background: var(--dark-3);
}

.sv-lb-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  color: var(--white);
  text-transform: uppercase;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sv-lb-stars {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.sv-lb-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--grey);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

.sv-lb-empty {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--grey);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 40px 0;
  text-align: center;
}

/* ─── Responsive ─────────────────────────────── */

@media (max-width: 680px) {
  .sv-podium {
    flex-direction: column;
    align-items: center;
  }

  .sv-podium-card {
    max-width: 100%;
    width: 100%;
    transform: none !important;
  }

  /* Restore 1st–2nd–3rd reading order on mobile */
  .sv-podium-card--gold {
    order: 1;
  }
  .sv-podium-card--silver {
    order: 2;
  }
  .sv-podium-card--bronze {
    order: 3;
  }

  .sv-modal-box {
    max-width: 100%;
    margin: 16px;
    padding: 32px 20px 24px;
  }

  .sv-lb-item {
    gap: 12px;
  }

  .sv-lb-count {
    display: none;
  }
}
