/* ── Quiza – Bot de opciones (encima del bot Penelope) ───────────────────
   Prefijo de IDs/clases: qz-  · No comparte estilos con el bot Penelope. */

#qz-btn {
  position: fixed;
  bottom: 88px;          /* justo encima del botón de Penelope (bottom:28px, alto 50px) */
  right: 28px;
  height: 50px;
  border-radius: 50px;
  background: #ff0080;
  border: none;
  cursor: pointer;
  z-index: 9100;
  box-shadow: 0 4px 20px rgba(255, 0, 128, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px 0 14px;
  transition: transform .2s, box-shadow .2s;
}
#qz-btn-label {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
#qz-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(255, 0, 128, 0.7);
}
#qz-btn i, #qz-btn svg { display: block; pointer-events: none; }

/* ── Panel ────────────────────────────────────────────────────────────── */

#qz-panel {
  position: fixed;
  bottom: 150px;         /* abre por encima, para no solapar con el de Penelope */
  right: 24px;
  width: 340px;
  max-height: 520px;
  background: #efeae2;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  z-index: 9101;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), opacity .15s ease;
}
#qz-panel.qz-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ── Header ───────────────────────────────────────────────────────────── */

#qz-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #b3005a;
  flex-shrink: 0;
}
#qz-head-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ff0080;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#qz-head-name {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
#qz-head-name span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.75);
}
#qz-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-size: 20px;
  transition: color .15s;
}
#qz-close:hover { color: #fff; }

/* ── Mensajes ─────────────────────────────────────────────────────────── */

#qz-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-behavior: smooth;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9b99a' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
#qz-msgs::-webkit-scrollbar { width: 4px; }
#qz-msgs::-webkit-scrollbar-track { background: transparent; }
#qz-msgs::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 2px; }

.qz-msg {
  max-width: 82%;
  padding: 7px 10px 8px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.qz-msg.qz-bot {
  background: #fff;
  color: #111;
  border-top-left-radius: 2px;
  align-self: flex-start;
}
.qz-msg.qz-user {
  background: #ffe0f0;
  color: #111;
  border-top-right-radius: 2px;
  align-self: flex-end;
}

.qz-link {
  color: #b3005a;
  text-decoration: underline;
  word-break: break-all;
}
.qz-link:hover { color: #ff0080; }

/* ── Botones de opciones ──────────────────────────────────────────────── */

.qz-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: stretch;
  margin: 2px 0 4px;
}
.qz-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  color: #111;
  border: 1px solid rgba(255,0,128,.35);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.qz-opt:hover { background: #ff0080; color: #fff; border-color: #ff0080; }
.qz-opt:active { transform: scale(.98); }
.qz-opt.qz-opt-back {
  background: #ff0080;
  color: #fff;
  border-color: #ff0080;
}
.qz-opt.qz-opt-back:hover { background: #b3005a; border-color: #b3005a; color: #fff; }

/* Botones dentro de las respuestas (WhatsApp / Eventos) */
.qz-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #25d366;
  color: #fff !important;
  text-decoration: none !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  box-shadow: 0 2px 8px rgba(37,211,102,.35);
  transition: background .15s, box-shadow .15s;
  word-break: normal;
}
.qz-wa-btn:hover { background: #1ebe5d; box-shadow: 0 3px 12px rgba(37,211,102,.5); }
.qz-wa-btn i { font-size: 16px; }

.qz-ev-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #111;
  color: #fff !important;
  text-decoration: none !important;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  border: 1px solid rgba(255,0,128,.45);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: background .15s, border-color .15s;
  word-break: normal;
}
.qz-ev-btn:hover { background: #ff0080; border-color: #ff0080; }
.qz-ev-btn i { font-size: 14px; color: #ff0080; transition: color .15s; }
.qz-ev-btn:hover i { color: #fff; }

/* ── Móvil ────────────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  #qz-panel { right: 8px; left: 8px; width: auto; bottom: 150px; }
  #qz-btn   { right: 16px; bottom: 78px; }
}
