/* =============================================================
   Vote verification popup
   -------------------------------------------------------------
   Shared modal that opens whenever any "Vote" button is clicked
   (leaderboard rows + spotlight "Vote on website"). White card
   over a dimmed backdrop — matches the provided mockup.
   Built + controlled by vote-popup.js.
   ============================================================= */

.vpop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 6, 12, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.vpop-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s;
}

.vpop-backdrop[hidden] {
  display: none;
}

.vpop-card {
  position: relative;
  width: min(600px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 18px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  font-family: "Montserrat", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.vpop-backdrop.is-open .vpop-card {
  transform: none;
}

/* Close (X) button */
.vpop-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6b6b73;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.vpop-close:hover {
  background: #f0f0f2;
  color: #1a1a1a;
}

.vpop-close svg {
  width: 18px;
  height: 18px;
}

/* Top row: captcha (left) + reside checkbox (right) */
.vpop-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.vpop-cell {
  display: flex;
  align-items: center;
  min-height: 78px;
  border: 1px solid #dcdce2;
  border-radius: 10px;
  background: #fbfbfc;
}

.vpop-cell--captcha {
  flex: 0 0 auto;
  padding: 0.35rem;
  border: none;
  background: transparent;
  min-height: 0;
}

/* Cloudflare Turnstile renders its own bordered widget, so the cell
   wrapper stays borderless to avoid a double frame. */
.vpop-cell--reside {
  flex: 1 1 200px;
  padding: 0.75rem 1rem;
}

.vpop-reside {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a1a;
}

.vpop-reside input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: #111111;
  cursor: pointer;
}

/* Fallback placeholder shown until Turnstile mounts */
.vpop-captcha-loading {
  display: inline-flex;
  align-items: center;
  min-width: 260px;
  min-height: 65px;
  padding: 0 1rem;
  border: 1px solid #dcdce2;
  border-radius: 8px;
  color: #8a8a92;
  font-size: 0.85rem;
}

.vpop-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.55rem;
}

.vpop-email {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d0d0d6;
  border-radius: 10px;
  background: #f3f3f5;
  color: #1a1a1a;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.vpop-email::placeholder {
  color: #9a9aa2;
}

.vpop-email:focus {
  border-color: #7b5ba1;
  background: #ffffff;
}

/* "Why do we ask for your email?" toggle + revealed copy */
.vpop-why {
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: none;
  background: none;
  color: #5a5a63;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.vpop-why:hover {
  color: #111111;
  text-decoration: underline;
}

.vpop-why svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.vpop-why__body {
  margin-top: 0.55rem;
  color: #5a5a63;
  font-size: 0.88rem;
  line-height: 1.55;
}

.vpop-why__body[hidden] {
  display: none;
}

.vpop-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.vpop-send {
  padding: 0.85rem 2.6rem;
  border: none;
  border-radius: 10px;
  background: #5a5a63;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.vpop-send:not(:disabled):hover {
  background: #3f3f47;
}

.vpop-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vpop-msg {
  margin-top: 0.85rem;
  min-height: 1.2em;
  text-align: center;
  font-size: 0.9rem;
}

.vpop-msg.is-error {
  color: #c0392b;
}

.vpop-msg.is-info {
  color: #2d7a3a;
}

/* --- Returning-link confirmation card --- */
.vpop-card--confirm {
  width: min(460px, 100%);
  text-align: center;
}

.vpop-confirm-title {
  margin: 0 0 0.75rem;
  padding-right: 1.5rem;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: 800;
  color: #1a1a1a;
}

.vpop-confirm-body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #45454d;
}

.vpop-confirm-body strong {
  color: #1a1a1a;
}

.vpop-card--confirm .vpop-send {
  background: #9d71f6;
}

.vpop-card--confirm .vpop-send:not(:disabled):hover {
  background: #8657ec;
}

@media (max-width: 520px) {
  .vpop-row {
    flex-direction: column;
  }

  .vpop-cell--captcha,
  .vpop-cell--reside {
    flex: 1 1 auto;
    width: 100%;
  }
}
