/* ═══════════════════════════════════════════════════════════════════════
   GymBro — Encuesta NPS por folio (mobile-first, la responde el socio)
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --color-primary:        #f97316;
  --color-primary-oscuro: #c2590f;
  --color-text:           #1a1a1a;
  --color-text-muted:     #666;
  --color-border:         #e5e7eb;
}

/* Obligatorio: el atributo hidden gana sobre displays explícitos */
[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(160deg, #fff7ed, #ffedd5);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--color-text);
  line-height: 1.55;
}
button { cursor: pointer; border: none; font-family: inherit; }

.encuesta-caja {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 14px 50px rgba(0,0,0,.12);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}
.encuesta-head {
  background: linear-gradient(135deg, var(--color-primary-oscuro), var(--color-primary));
  color: #fff;
  text-align: center;
  padding: 28px 24px;
}
.encuesta-logo {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.22);
  border-radius: 14px;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  overflow: hidden;
}
.encuesta-logo img { width: 100%; height: 100%; object-fit: contain; }
.encuesta-head h1 { font-size: 1.25rem; font-weight: 800; font-family: Poppins, Inter, sans-serif; }
.encuesta-head p { font-size: .82rem; opacity: .85; }

.encuesta-cuerpo { padding: 28px 26px; }
.encuesta-cuerpo h2 { font-size: 1.15rem; font-weight: 800; line-height: 1.35; margin-bottom: 6px; }
.encuesta-saludo { font-size: .95rem; font-weight: 700; margin-bottom: 8px; color: var(--color-primary-oscuro); }
.texto-muted { color: var(--color-text-muted); font-size: .87rem; }
.icono-grande { font-size: 3.2rem; text-align: center; margin-bottom: 10px; }
#vista-invalida, #vista-duplicada, #vista-gracias { text-align: center; padding: 44px 28px; }
.nota-chica { margin-top: 14px; font-size: .78rem; color: var(--color-text-muted); font-style: italic; }

.escala {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin: 20px 0 6px;
}
.btn-nps {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px solid var(--color-border);
  background: #fff;
  font-weight: 800;
  font-size: .95rem;
  transition: all .15s ease;
  color: var(--color-text);
}
.btn-nps:hover { transform: translateY(-2px); border-color: var(--color-primary); }
.btn-nps.activo { color: #fff; border-color: transparent; transform: scale(1.08); }
.btn-nps.activo.rojo  { background: #ef4444; }
.btn-nps.activo.ambar { background: #f59e0b; }
.btn-nps.activo.verde { background: #10b981; }
.escala-etiquetas {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.pregunta-extra { margin: 8px 0 20px; }
.pregunta-extra h3 { font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.opciones-aspecto { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-aspecto {
  padding: 11px 14px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  font-size: .88rem;
  font-weight: 600;
  text-align: left;
  transition: all .15s ease;
  flex: 1 1 45%;
}
.btn-aspecto:hover { border-color: var(--color-primary); }
.btn-aspecto.activo {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, #fff);
  color: var(--color-primary-oscuro);
}

.comentario-label { font-size: .88rem; font-weight: 700; display: block; margin-bottom: 8px; }
#comentario {
  width: 100%;
  min-height: 90px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .9rem;
  resize: vertical;
  margin-bottom: 20px;
}
#comentario:focus { outline: none; border-color: var(--color-primary); }

#btn-enviar-encuesta {
  width: 100%;
  padding: 15px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 13px;
  font-size: 1rem;
  font-weight: 800;
  transition: all .2s ease;
}
#btn-enviar-encuesta:hover:not(:disabled) { background: var(--color-primary-oscuro); transform: translateY(-1px); }
#btn-enviar-encuesta:disabled { opacity: .45; cursor: not-allowed; }

.encuesta-pie {
  border-top: 1px solid var(--color-border);
  padding: 14px;
  text-align: center;
}
.encuesta-pie a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
}
.encuesta-pie img { height: 14px; }

@media (max-width: 420px) {
  .escala { gap: 4px; }
  .btn-nps { font-size: .82rem; border-radius: 8px; }
  .btn-aspecto { flex-basis: 100%; }
}
