/* ==== AEROVISION CHAT BUTTON STYLES ==== */

/* DEBUG: Forzar visibilidad del botón */
#aerovision-chat-btn {
  display: flex !important;
  visibility: visible !important;
  opacity: 0.95 !important;
  position: fixed !important;
  z-index: 999999 !important;
}

/* Variables */
:root {
  --av-chat-primary: #ff6b35;
  --av-chat-secondary: #2196f3;
  --av-chat-dark: #0a0a0a;
  --av-chat-gray: #2a2a2a;
  --av-chat-white: #ffffff;
  --av-chat-gradient: linear-gradient(135deg, #ff6b35, #ff8a65);
  --av-chat-gradient-hover: linear-gradient(135deg, #e55a2b, #ff6b35);
  --av-chat-shadow: 0 15px 35px rgba(255, 107, 53, 0.3);
  --av-chat-shadow-hover: 0 20px 45px rgba(255, 107, 53, 0.4);
}

/* Botón principal de chat - Estilo flotante */
#aerovision-chat-btn {
  position: fixed !important;
  left: 30px; /* Posición a la izquierda para no interferir con WhatsApp */
  bottom: 30px;
  z-index: 247483647 !important;
  width: auto;
  min-width: 200px;
  height: 60px;
  border-radius: 30px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  cursor: pointer;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 30%, #ff6b35 70%, #ff8a65 100%);
  color: var(--av-chat-white);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3), 
    0 4px 16px rgba(255, 107, 53, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  opacity: 0.95 !important;
  padding: 0 20px;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  backdrop-filter: blur(10px);
  /* Asegurar que el botón sea visible inmediatamente */
  visibility: visible !important;
  /* Remover cualquier animación inicial que pueda ocultar el botón */
  animation: none !important;
}

#aerovision-chat-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.15), 
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.15),
    transparent);
  transition: 0.8s;
  border-radius: 30px;
}

#aerovision-chat-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(255, 107, 53, 0.1) 0%, 
    transparent 50%, 
    rgba(255, 107, 53, 0.1) 100%);
  border-radius: 30px;
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

#aerovision-chat-btn:hover::before {
  left: 100%;
}

#aerovision-chat-btn:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.4), 
    0 8px 24px rgba(255, 107, 53, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 30%, #ff8a65 70%, #ff6b35 100%);
  opacity: 1;
  border-color: rgba(255, 107, 53, 0.6);
}

#aerovision-chat-btn:active {
  transform: scale(0.95);
}

.chat-btn-icon {
  font-size: 20px;
  transition: all 0.3s ease;
  z-index: 3;
  position: relative;
  flex-shrink: 0;
}

.chat-btn-text {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 3;
  position: relative;
  font-family: 'Montserrat', sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#aerovision-chat-btn:hover .chat-btn-icon {
  transform: scale(1.1);
  animation: chatBounce 0.6s ease-in-out;
}

#aerovision-chat-btn:hover .chat-btn-text {
  transform: translateX(2px);
}

/* Efecto pulse adaptado para botón rectangular */
.chat-btn-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.3), rgba(255, 107, 53, 0.3));
  animation: chatPulseFloating 3s infinite;
  opacity: 0.6;
}

@keyframes chatPulseFloating {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
}

@keyframes chatPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

@keyframes chatBounce {
  0%, 100% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
}

/* Tooltip deshabilitado - texto ahora visible en el botón */
.chat-btn-tooltip {
  display: none;
}

/* Modal backdrop */
.aerovision-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2147483640;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.aerovision-chat-backdrop.show {
  opacity: 1;
}

/* Chat container */
.aerovision-chat-wrap {
  position: fixed;
  left: 40px;
  bottom: 120px;
  width: 420px;
  height: 700px;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 20px;
  overflow: hidden;
  background: var(--av-chat-white);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--av-chat-primary);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
}

.aerovision-chat-wrap.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Chat header */
.aerovision-chat-header {
  background: var(--av-chat-gradient);
  color: var(--av-chat-white);
  padding: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
}

.aerovision-chat-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.aerovision-chat-header p {
  margin: 5px 0 0 0;
  font-size: 14px;
  opacity: 0.9;
  font-family: 'Montserrat', sans-serif;
}

.aerovision-chat-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: var(--av-chat-white);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.aerovision-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Chat iframe */
.aerovision-chat-frame {
  width: 100%;
  height: calc(100% - 80px);
  border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  #aerovision-chat-btn {
    min-width: 160px;
    height: 50px;
    left: 20px;
    bottom: 20px;
    font-size: 12px;
    padding: 0 16px;
    gap: 8px;
  }
  
  .chat-btn-icon {
    font-size: 18px;
  }
  
  .chat-btn-text {
    font-size: 12px;
  }
  
  .chat-btn-tooltip {
    display: none;
  }
  
  .aerovision-chat-wrap {
    width: 90vw;
    height: 85vh;
    left: 5vw;
    bottom: 5vh;
    border-radius: 15px;
  }
  
  .aerovision-chat-header {
    padding: 15px;
  }
  
  .aerovision-chat-header h3 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  #aerovision-chat-btn {
    min-width: 140px;
    height: 45px;
    font-size: 11px;
    padding: 0 12px;
  }
  
  .chat-btn-icon {
    font-size: 16px;
  }
  
  .chat-btn-text {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  #aerovision-chat-btn {
    min-width: 120px;
    height: 40px;
    font-size: 10px;
    padding: 0 10px;
    gap: 6px;
  }
  
  .chat-btn-icon {
    font-size: 14px;
  }
  
  .chat-btn-text {
    font-size: 10px;
  }
}

/* Animaciones de entrada - TEMPORALMENTE DESHABILITADAS PARA DEBUG */
/*
@keyframes slideInFromLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 0.95;
  }
}

#aerovision-chat-btn {
  animation: slideInFromLeft 0.6s ease-out 0.2s both;
}
*/

/* Estado activo del botón cuando el chat está abierto */
#aerovision-chat-btn.chat-active {
  background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 30%, #ff8a65 70%, #ff6b35 100%);
  transform: translateY(-2px);
}

#aerovision-chat-btn.chat-active .chat-btn-pulse {
  animation: none;
}