/* ============================================================
   Encuesta única por cuenta (origen para usuarios nuevos, feedback
   para usuarios que ya estaban registrados) + premio de 1 sobre a
   elección. Se muestra como overlay encima de todo, una sola vez
   por cuenta — ver encuesta.js y 19_encuesta_bienvenida.sql.
   Reusa la paleta y tipografía de auth.css a propósito, para que se
   sienta parte de la misma app y no un cartel pegado aparte.
   ============================================================ */

.encuesta-view {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(2, 12, 5, 0.94);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.encuesta-view.visible {
  display: flex;
}

.encuesta-card {
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 1.9rem 1.6rem 1.6rem;
  border-radius: 26px;
  background: rgba(10, 26, 13, 0.97);
  border: 1px solid rgba(103, 244, 127, 0.2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  animation: encuesta-card-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes encuesta-card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.encuesta-step { display: none; flex-direction: column; }
.encuesta-step.active { display: flex; animation: encuesta-fade-in 0.25s ease; }

@keyframes encuesta-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.encuesta-badge {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 0.4rem;
  background: rgba(246, 236, 90, 0.12);
  border: 1px dashed rgba(246, 236, 90, 0.5);
  color: #f6ec5a;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}

.encuesta-emoji-hero {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5));
}

.encuesta-title {
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  color: #7dffa0;
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.encuesta-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1.4rem;
  line-height: 1.5;
}

.encuesta-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.encuesta-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(103, 244, 127, 0.15);
  border-radius: 16px;
  padding: 0.9rem 0.6rem;
  cursor: pointer;
  font-family: inherit;
  color: #eafbe9;
  font-weight: 600;
  font-size: 0.82rem;
  text-align: center;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.encuesta-opt:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 244, 127, 0.4);
  box-shadow: none;
}

.encuesta-opt .encuesta-opt-emoji { font-size: 1.6rem; }

.encuesta-opt.selected {
  border-color: #67f47f;
  background: linear-gradient(160deg, rgba(103,244,127,0.18), rgba(103,244,127,0.05));
  box-shadow: 0 8px 22px rgba(43, 145, 76, 0.25);
}

.encuesta-opt-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.encuesta-opt-row .encuesta-opt { flex: 1; padding: 0.8rem 0.3rem; }
.encuesta-opt-row .encuesta-opt .encuesta-opt-emoji { font-size: 1.8rem; }

.encuesta-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.encuesta-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
}

.encuesta-dots span.on {
  background: #67f47f;
  box-shadow: 0 0 8px rgba(103,244,127,0.6);
}

.encuesta-card textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(103, 244, 127, 0.16);
  background: rgba(15, 35, 18, 0.82);
  color: #e8ffe8;
  outline: none;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
  margin-bottom: 1.1rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.encuesta-card textarea::placeholder { color: #7fa07a; }
.encuesta-card textarea:focus {
  border-color: rgba(103,244,127,0.5);
  box-shadow: 0 0 0 3px rgba(103,244,127,0.14);
}

.encuesta-card .button-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.encuesta-prize-box {
  text-align: center;
  margin: 0.4rem 0 1.2rem;
}

.encuesta-prize-emoji {
  font-size: 4rem;
  display: inline-block;
  animation: encuesta-prize-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

@keyframes encuesta-prize-pop {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

.encuesta-confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.encuesta-confetti-bit {
  position: absolute;
  top: -10%;
  width: 8px; height: 14px;
  opacity: 0.9;
  animation: encuesta-confetti-fall linear forwards;
  border-radius: 2px;
}

@keyframes encuesta-confetti-fall {
  to { transform: translateY(120vh) rotate(540deg); opacity: 0.2; }
}

.encuesta-sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  max-height: 260px;
  overflow-y: auto;
}

.encuesta-sobre-card {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(103, 244, 127, 0.15);
  border-radius: 16px;
  padding: 0.9rem 0.6rem;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  color: #eafbe9;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.encuesta-sobre-card:hover {
  transform: translateY(-2px);
  border-color: rgba(103,244,127,0.4);
  box-shadow: none;
}

.encuesta-sobre-card.selected {
  border-color: #67f47f;
  background: linear-gradient(160deg, rgba(103,244,127,0.18), rgba(103,244,127,0.05));
  box-shadow: 0 8px 22px rgba(43, 145, 76, 0.25);
}

.encuesta-sobre-card .encuesta-sobre-emoji { font-size: 2rem; margin-bottom: 0.3rem; }
.encuesta-sobre-card .encuesta-sobre-name { font-weight: 700; font-size: 0.86rem; }

.encuesta-final-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.encuesta-final-note strong { color: #c8ffd0; }

@media (max-width: 480px) {
  .encuesta-card {
    padding: 1.5rem 1.2rem 1.3rem;
  }
}