/* ===== ASISTENTE ULTRA LEZ (VERSIÓN CORREGIDA FINAL) ===== */

/* Animación bounce leve */
@keyframes lezBounce {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}

/* Botón burbuja */
#chat-bubble{
  position:fixed;
  bottom:20px;
  right:20px;
  background:#003da5;
  color:#fff;
  padding:17px;
  border-radius:50%;
  font-size:22px;
  cursor:pointer;
  z-index:9999;
  animation: lezBounce 0.35s ease-out;
  box-shadow:0 4px 16px rgba(0,0,0,.35);
  transition:transform .25s;
}
#chat-bubble:hover{ transform:scale(1.08); }

/* Ventana del chat */
#chat-window{
  display:none;          /* 🔥 SOLO ESTO — SE ABRE CON JS */
  position:fixed;
  bottom:80px;
  right:20px;
  width:360px;
  height:530px;
  max-height:80vh;
  background:#ffffff;
  border-radius:14px;
  overflow:hidden;
  z-index:9999;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  flex-direction:column;
  font-family: Arial, sans-serif;
}

/* Header */
#chat-header{
  background:#003da5;
  padding:12px;
  color:white;
  display:flex;
  align-items:center;
  gap:10px;
}

#chat-header img{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid white;
}

/* Mensajes */
#chat-messages{
  flex:1;
  padding:12px;
  overflow-y:auto;
  background:#f5f6fa;
}

.msg{ margin-bottom:10px; }
.msg.you{ text-align:right; }
.msg.lez{ text-align:left; }

.bubble{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  max-width:80%;
  font-size:14px;
  line-height:1.3;
}

.msg.you .bubble{
  background:#dbe6ff;
  color:#003da5;
  border-bottom-right-radius:4px;
}

.msg.lez .bubble{
  background:white;
  color:#333;
  border-bottom-left-radius:4px;
  box-shadow:0 2px 5px rgba(0,0,0,.15);
}

/* Chips */
.tag-row{ margin:4px 0; }
.chip{
  display:inline-block;
  padding:5px 9px;
  background:#e6edff;
  border:1px solid #bcd0ff;
  color:#003da5;
  border-radius:50px;
  font-size:12px;
  cursor:pointer;
  margin-right:5px;
}

/* Formulario inicial */
#lead-form{
  padding:12px;
  background:white;
  border-radius:12px;
  box-shadow:0 1px 5px rgba(0,0,0,.15);
  margin-bottom:12px;
}

#lead-form input,
#lead-form select,
#lead-form textarea{
  width:100%;
  padding:8px;
  margin-bottom:8px;
  font-size:13px;
  border:1px solid #ccd4e0;
  border-radius:8px;
}

#lead-form button{
  width:100%;
  padding:10px;
  background:#003da5;
  color:white;
  border:none;
  border-radius:8px;
  font-weight:bold;
  cursor:pointer;
}

/* Input inferior */
#chat-input{
  display:flex;
  border-top:1px solid #ddd;
}

#chat-input input{
  flex:1;
  padding:12px;
  border:none;
  background:#f0f2f7;
}

#chat-input button{
  background:#003da5;
  color:white;
  border:none;
  padding:10px 18px;
  font-weight:bold;
}

/* OCULTAR BOTÓN DUPLICADO DEL TEMA */
#chat-fab,
.chat-fab,
.chat-fab img,
.chat-fab button {
    display:none !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
}

/* ===== AVATAR DEL ASISTENTE LEZ ===== */
.msg.lez {
    display:flex;
    align-items:flex-start;
    gap:8px;
}

/* Icono antes de cada mensaje del asistente */
.msg.lez::before {
    content:"";
    width:42px;
    height:42px;
    min-width:42px;
    background:url('/wp-content/themes/lezsifinal20/assets/img/lez-robot.png');
    background-size:cover;
    background-position:center;
    border-radius:50%;
}

/* Ajustar la burbuja a la derecha del avatar */
.msg.lez .bubble {
    margin-left:0;
}
/* ===== BOTÓN PERSONALIZADO LEZ ROBOT ===== */

#chat-bubble{
    position:fixed;
    bottom:20px;
    right:20px;
    background:#003da5;
    color:#fff;
    padding:8px 14px;
    border-radius:50px;
    font-size:14px;
    cursor:pointer;
    z-index:9999;
    animation: lezBounce 0.35s ease-out;
    box-shadow:0 4px 16px rgba(0,0,0,.35);
    display:flex;
    align-items:center;
    gap:10px;
    transition:transform .25s, box-shadow .25s;
}

#chat-bubble:hover{
    transform:scale(1.06);
    box-shadow:0 6px 18px rgba(0,0,0,.45);
}

/* Robot dentro del botón */
#lez-bubble-icon{
    width:38px;
    height:38px;
    border-radius:50%;
    background:#fff;
    padding:4px;
    object-fit:cover;
}

/* Texto “LEZrobot Asistente” */
#lez-bubble-text{
    font-weight:bold;
    font-size:13px;
    color:#fff;
    letter-spacing:0.3px;
}
/* ===== BOTÓN CATÁLOGO PRO ===== */
.lez-btn-cat {
    background: #003da5;
    color: #fff !important;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0,0,0,0.10);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.20s ease-in-out;
    line-height: 1 !important;
    height: auto !important;
}

.lez-btn-cat:hover {
    background: #004fcc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transform: translateY(-2px);
}

.lez-btn-cat-icon {
    font-size: 16px;
    margin-right: 3px;
}
