/* qoobot-chat.css: Estilos para el chat flotante profesional */
/* Borde y fondo llamativo temporal para depuración visual */
#qoobot-chat-launcher {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 72px;
  height: 72px;
  z-index: 2147483647;
  background: #fffbe7 !important;
  border-radius: 18px;
  box-shadow: 0 4px 24px 0 rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: none;
  border: none;
  outline: none;
  outline-offset: 0;
}

/* Fin de depuración: eliminar cuando se confirme visibilidad */
}
#qoobot-chat-launcher:hover {
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.22);
  transform: scale(1.06);
}
#qoobot-chat-launcher img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: auto;
  animation: qoobot-bounce 1.2s infinite alternate cubic-bezier(.68,-0.55,.27,1.55);
}

@keyframes qoobot-bounce {
  0% { transform: scale(1) translateY(0); }
  60% { transform: scale(1.08) translateY(-6px); }
  100% { transform: scale(1.04) translateY(-2px); }
}
@keyframes qoobot-pop {
  0% { transform: scale(0.7); opacity: 0; }
  80% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

#qoobot-chat-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(10,10,30,0.32);
  z-index: 2147483648;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
#qoobot-chat-modal {
  width: 370px;
  max-width: 98vw;
  height: 520px;
  max-height: 92vh;
  background: #fff;
  border-radius: 18px 18px 12px 12px;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 24px 24px 0;
  animation: qoobot-modal-in 0.25s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes qoobot-modal-in {
  0% { transform: translateY(60px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
#qoobot-chat-header {
  background: #0a0a1e;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px 18px;
  border-bottom: 1px solid #e0e0e0;
}
#qoobot-chat-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}
#qoobot-chat-header .qoobot-title {
  font-size: 1.18em;
  font-weight: 700;
  letter-spacing: 0.5px;
}
#qoobot-chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6em;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
#qoobot-chat-close:hover {
  opacity: 1;
}
#qoobot-chat-messages {
  flex: 1 1 auto;
  padding: 18px 16px 12px 16px;
  overflow-y: auto;
  background: #f7f8fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qoobot-msg {
  max-width: 82%;
  padding: 10px 16px;
  border-radius: 16px 16px 16px 6px;
  background: #e6f7ff;
  color: #0a0a1e;
  align-self: flex-start;
  font-size: 1em;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
  word-break: break-word;
}
.qoobot-msg.user {
  background: #ff3c7e;
  color: #fff;
  align-self: flex-end;
  border-radius: 16px 16px 6px 16px;
}
#qoobot-chat-input-row {
  display: flex;
  align-items: center;
  padding: 12px 16px 14px 16px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  gap: 8px;
}
#qoobot-chat-input {
  flex: 1 1 auto;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 1em;
  outline: none;
  transition: border 0.2s;
}
#qoobot-chat-input:focus {
  border: 1.5px solid #0a0a1e;
}
#qoobot-chat-send {
  background: #0a0a1e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
#qoobot-chat-send:hover {
  background: #ff3c7e;
}
@media (max-width: 600px) {
  #qoobot-chat-modal {
    width: 99vw;
    height: 98vh;
    margin: 0 0 0 0;
    border-radius: 0 0 0 0;
  }
  #qoobot-chat-launcher {
    right: 12px;
    bottom: 12px;
    width: 62px;
    height: 62px;
    z-index: 2147483647;
  }
  #qoobot-chat-launcher img {
    width: 44px;
    height: 44px;
    display: block;
    margin: auto;
  }
}
