:root {
  --verde: #11a24d;
  --verde-hover: #0d9143;
  --verde-focus: #087b38;
  --verde-claro: #eefbf3;
  --fondo: #f3f4f6;
  --blanco: #ffffff;
  --texto: #1f2937;
  --secundario: #6b7280;
  --borde: #e5e7eb;
  --campo: #f9fafb;
  --error: #ef4444;
  --amarillo-bg: #fffbeb;
  --amarillo-borde: #fde68a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 60px 20px;
  background: var(--fondo);
  color: var(--texto);
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.encuesta {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  border-top: 14px solid var(--verde);
  border-radius: 32px;
  background: var(--blanco);
  box-shadow: 0 25px 45px -12px rgb(0 0 0 / 16%);
}

.header-banner {
  padding: 45px 50px 25px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--borde);
}

.encuesta__logo {
  display: block;
  width: 320px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 25px;
  object-fit: contain;
}

.encuesta__titulo {
  margin: 0 0 14px;
  text-align: center;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -1px;
  color: var(--texto);
}

.encuesta__descripcion {
  margin: 0 auto;
  max-width: 780px;
  text-align: center;
  color: #374151;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 500;
}

.encuesta__contenido {
  padding: 40px 50px 60px;
}

.form-section {
  background: #ffffff;
  border: 1px solid var(--borde);
  border-radius: 24px;
  padding: 30px 32px;
  margin-bottom: 36px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 3%);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--verde);
  margin-top: 0;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--verde-claro);
}

.grid-2-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-span-2 {
  grid-column: span 2;
}

.campo-pregunta {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--borde);
}

.campo-pregunta:last-child {
  border-bottom: none;
  margin-bottom: 10px;
  padding-bottom: 0;
}

.label-pregunta {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 14px;
  line-height: 1.35;
}

.campo {
  margin-bottom: 20px;
}

.campo label {
  display: block;
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--texto);
}

.campo input[type="text"],
.campo input[type="email"],
.campo input[type="tel"],
.campo select,
.campo textarea {
  display: block;
  width: 100%;
  height: 58px;
  padding: 14px 20px;
  border: 2px solid var(--borde);
  border-radius: 14px;
  background: var(--campo);
  color: var(--texto);
  font: inherit;
  font-size: 18px;
  transition: all 0.2s ease;
}

.campo textarea {
  height: 110px;
  resize: vertical;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--verde);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(17, 162, 77, 0.12);
}

/* Opciones de respuesta */
.opciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.opcion-card {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border: 2px solid var(--borde);
  border-radius: 14px;
  background: var(--campo);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.opcion-card:hover {
  border-color: var(--verde);
  background: var(--verde-claro);
  transform: translateY(-2px);
}

.opcion-card.card-destacada {
  border-color: rgba(17, 162, 77, 0.3);
  background: #f4fbf6;
}

.opcion-card input[type="radio"],
.opcion-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.opcion-card .radio-custom {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.opcion-card input[type="checkbox"] + .radio-custom {
  border-radius: 6px;
}

.opcion-card input[type="checkbox"]:checked + .radio-custom {
  border-color: var(--verde);
  background: var(--verde);
}

.opcion-card input[type="radio"]:checked + .radio-custom {
  border-color: var(--verde);
  background: var(--verde);
}

.opcion-card input[type="radio"]:checked + .radio-custom::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

.opcion-card input[type="checkbox"]:checked + .radio-custom::after {
  content: "✓";
  color: #ffffff;
  font-weight: bold;
  font-size: 13px;
}

.opcion-card.selected {
  border-color: var(--verde);
  background: var(--verde-claro);
  box-shadow: 0 4px 12px rgb(17 162 77 / 15%);
}

.opcion-texto {
  font-size: 17px;
  font-weight: 600;
  color: var(--texto);
}

/* Casilla de Aviso de Privacidad */
.campo-privacidad {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 25px 0 10px;
  padding: 16px 20px;
  background: #f8fafc;
  border: 1.5px solid var(--borde);
  border-radius: 14px;
  cursor: pointer;
}

.campo-privacidad input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--verde);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.campo-privacidad span {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.45;
}

.campo-privacidad a {
  color: var(--verde);
  font-weight: 700;
  text-decoration: underline;
}

.campo-privacidad a:hover {
  color: var(--verde-hover);
}

.error-message {
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
  display: none;
}

.campo.error input,
.campo-pregunta.error .opcion-card,
.campo-privacidad.error {
  border-color: var(--error);
}

.campo.error .error-message,
.campo-pregunta.error .error-message,
.campo-privacidad.error + .error-message {
  display: block;
}

/* Botón principal */
.encuesta__boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  padding: 18px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--verde);
  color: var(--blanco);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgb(17 162 77 / 25%);
  transition: all 0.2s ease;
}

.encuesta__boton:hover {
  background: var(--verde-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgb(17 162 77 / 35%);
}

.encuesta__boton:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Pantalla Éxito */
.exito-container {
  text-align: center;
  padding: 40px 20px;
}

.exito-icono {
  width: 90px;
  height: 90px;
  background: var(--verde-claro);
  border: 3px solid var(--verde);
  color: var(--verde);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 24px;
}

@media (max-width: 768px) {
  body {
    padding: 20px 12px;
  }

  .header-banner {
    padding: 30px 20px 20px;
  }

  .encuesta__contenido {
    padding: 24px 20px 40px;
  }

  .form-section {
    padding: 20px 18px;
    border-radius: 18px;
  }

  .grid-2-cols {
    grid-template-columns: 1fr;
  }

  .grid-span-2 {
    grid-column: span 1;
  }

  .encuesta__titulo {
    font-size: 28px;
  }

  .encuesta__descripcion {
    font-size: 17px;
  }

  .label-pregunta {
    font-size: 18px;
  }

  .opciones-grid {
    grid-template-columns: 1fr;
  }

  .encuesta__boton {
    min-height: 56px;
    font-size: 18px;
  }
}

/* ==========================================================================
   WIDGET FLOTANTE WHATSAPP ESTILO LIVE CHAT (EMULANDO REFERENCIA)
   ========================================================================== */
.wa-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: inherit;
  pointer-events: auto;
}

/* VENTANA / TARJETA DEL CHAT */
.wa-card {
  width: 330px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 16px 45px -8px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transform-origin: bottom right;
  opacity: 1;
  visibility: visible;
  max-height: 520px;
  transform: translateY(0) scale(1);
  transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              visibility 0.3s ease,
              max-height 0.35s ease,
              margin 0.3s ease;
}

.wa-card.oculto {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  max-height: 0;
  margin-bottom: -12px;
  transform: translateY(18px) scale(0.92);
  border: none;
  box-shadow: none;
}

/* CABECERA VERDE */
.wa-card__header {
  background: #25d366;
  color: #ffffff;
  padding: 14px 16px 14px 16px;
  border-radius: 20px 20px 0 0;
}

.wa-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wa-card__tag {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.2px;
}

.wa-punto-online {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.wa-card__close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  transition: background 0.15s ease, transform 0.15s ease;
}

.wa-card__close:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

/* PERFIL CON AVATAR DEL GUSANITO */
.wa-card__profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-card__avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wa-card__info {
  display: flex;
  flex-direction: column;
}

.wa-card__title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wa-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.icono-verificado-header {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.wa-card__subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 2px;
  font-weight: 400;
}

/* CUERPO DEL CHAT */
.wa-card__body {
  background: #f0f2f5;
  background-image: radial-gradient(#d1d5db 0.8px, transparent 0.8px);
  background-size: 14px 14px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* BURBUJA DE MENSAJE */
.wa-msg-bubble {
  background: #ffffff;
  border-radius: 14px 14px 14px 4px;
  padding: 11px 13px 9px 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 90%;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.wa-msg-author {
  font-size: 11px;
  font-weight: 700;
  color: #11a24d;
  margin-bottom: 3px;
  display: block;
}

.wa-msg-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: #1f2937;
  margin: 0;
}

.wa-msg-time {
  font-size: 10px;
  color: #9ca3af;
  text-align: right;
  display: block;
  margin-top: 4px;
}

/* BOTÓN INICIAR CONVERSACIÓN */
.wa-btn-start {
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-btn-start:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.55);
}

.wa-btn-start:active {
  transform: scale(0.98);
}

.icono-wa-btn {
  flex-shrink: 0;
}

/* BOTÓN PÍLDORA INFERIOR: "Envíanos un mensaje" */
.wa-pill-btn {
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
}

.wa-pill-btn:hover {
  background: #20ba5a;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.55);
}

.wa-pill-btn:active {
  transform: scale(0.97);
}

.icono-wa-pill {
  flex-shrink: 0;
}

@keyframes waCardPop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .wa-widget {
    bottom: 16px;
    right: 16px;
  }
  .wa-card {
    width: calc(100vw - 32px);
  }
  .wa-pill-btn {
    padding: 11px 18px 11px 14px;
    font-size: 14px;
  }
}


