.ft-static-logo,
.ft-hover-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ft-hover-video {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
  filter: brightness(1.1) contrast(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ft-chat-btn:hover .ft-static-logo {
  opacity: 0;
  transform: scale(0.6);
}

.ft-chat-btn:hover .ft-hover-video {
  opacity: 1;
  transform: scale(2.5);
  border-radius: 50%;
  z-index: 1400;
  mix-blend-mode: multiply;
  filter: contrast(1.05) brightness(1.05);
}

.ft-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  /* mismo nivel que el botón */
  width: 340px;
  max-height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1200;
}

.ft-chat-panel.open {
  display: flex;
}

.ft-chat-header {
  background: linear-gradient(135deg, #c90000 0%, #ff4b4b 100%);
  /* tonos rojos más vibrantes */
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(201, 9, 9, 0.2);
  z-index: 10;
}

.ft-chat-header .title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.3px;
}

.ft-chat-header img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

.ft-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ft-chat-clear,
.ft-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
  opacity: 0.85;
}

.ft-chat-clear:hover,
.ft-chat-close:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
}

.ft-chat-messages {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  background: #f6f8fb;
}

.ft-msg {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ft-msg.me {
  margin-left: auto;
  justify-content: flex-end;
  align-items: flex-end;
}

.ft-msg .bubble {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  max-width: calc(100% - 48px);
  word-break: break-word;
}

.ft-msg.me .bubble {
  background: #fff;
  color: #222;
  border: 1px solid #e6e9ef;
  border-bottom-right-radius: 4px;
}

.ft-msg.bot .bubble {
  background: #c90000;
  color: #fff;
  border: none;
  border-bottom-left-radius: 4px;
  margin-left: 8px;
}

/* animación de entrada para mensajes del bot */
.ft-incoming {
  animation: fadeInUp .28s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* icon inside bubble */
.bubble i.bx.bx-bot {
  margin-right: 8px;
  font-size: 16px;
  vertical-align: middle;
}

.bubble .ft-text {
  vertical-align: middle;
}

/* estilos para indicador de escribiendo */
.ft-typing .bubble {
  opacity: 0.95;
}

.ft-typing-dots {
  display: inline-block;
  width: 36px;
  height: 12px;
}

.ft-typing-dots::before,
.ft-typing-dots::after,
.ft-typing-dots span {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 3px;
  background: #fff;
  border-radius: 50%;
  vertical-align: middle;
  animation: typingDots 1s infinite;
}

.ft-typing-dots::before {
  animation-delay: 0s;
}

.ft-typing-dots::after {
  animation-delay: .2s;
}

.ft-typing-dots span {
  animation-delay: .4s;
}

@keyframes typingDots {
  0% {
    transform: translateY(0);
    opacity: .2
  }

  50% {
    transform: translateY(-4px);
    opacity: 1
  }

  100% {
    transform: translateY(0);
    opacity: .2
  }
}

.ft-chat-input {
  padding: 10px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
  align-items: center;
}

.ft-chat-input textarea {
  resize: none;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e6e9ef;
  padding: 8px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.ft-chat-input .ft-send-btn {
  background: #c90000;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-chat-input .ft-send-btn svg {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  color: #fff;
}

.ft-chat-input .ft-send-btn:active {
  transform: translateY(1px);
}

.ft-chat-btn.hidden {
  display: none !important;
}

/* Mejor diseño del botón flotante */
.ft-chat-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  z-index: 1300;
  box-shadow: 0 10px 30px rgba(201, 9, 9, 0.22), inset 0 -6px 12px rgba(255, 255, 255, 0.06);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  padding: 0;
}

/* Permitir que el video se desborde solo en hover */
/* Permitir que el video se desborde solo en hover */
.ft-chat-btn:hover {
  overflow: visible;
  background-color: transparent;
  /* Ocultar el fondo blanco */
  border-color: transparent;
  /* Ocultar el borde rojo */
  box-shadow: none;
  /* Ocultar la sombra del botón */
  transform: translateY(-5px);
}

.ft-chat-btn i {
  font-size: 22px;
  color: #fff;
  display: inline-block;
}

/* Avatar icon dentro del círculo rojo */
/* avatar styles removed (not used) */


.ft-chat-btn:active {
  transform: translateY(-2px) scale(.995);
}

/* pulso sutil */
.ft-chat-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  left: 0;
  top: 0;
  box-shadow: 0 0 0 0 rgba(201, 9, 9, 0.12);
  animation: pulse 2.8s infinite;
  z-index: 1200;
  transition: opacity 0.3s;
}

.ft-chat-btn:hover::before {
  opacity: 0;
  /* Ocultar el pulso cuando estamos en hover para no distraer del video */
}

/* Efecto de resplandor trasero para el video */
.ft-chat-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(201, 9, 9, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease;
  z-index: -1;
  pointer-events: none;
}

.ft-chat-btn:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 9, 9, 0.12);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(201, 9, 9, 0.02);
  }

  100% {
    box-shadow: 0 0 0 12px rgba(201, 9, 9, 0);
  }
}

.ft-chat-small {
  font-size: 12px;
  color: #888;
}

/* small screens */
@media (max-width:480px) {
  .ft-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 84px;
  }

  .ft-chat-btn {
    right: 12px;
    bottom: 12px;
  }
}