
.chat-float-button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 132, 255, 0.4);
}

.chat-float-button.opening {
  animation: buttonPulse 0.6s ease-out;
}

.chat-float-button.closing {
  animation: buttonBounce 0.5s ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes buttonPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1); }
}

@keyframes buttonBounce {
  0% { transform: scale(1); }
  25% { transform: scale(0.8); }
  50% { transform: scale(1.1); }
  75% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.float-avatar {
  position: relative;
}

.float-avatar i {
  font-size: 24px;
  color: white;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff3040;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  border: 2px solid white;
}

/* === MENÚ DESPLEGABLE DE BOTONES INTELIGENTES === */
.smart-menu-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smart-menu-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.smart-menu {
  position: relative;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 400px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
  animation: smartMenuSlideIn 0.3s ease-out;
}

@keyframes smartMenuSlideIn {
  from {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.smart-menu-header {
  background: linear-gradient(135deg, var(--messenger-primary), var(--messenger-secondary));
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.smart-menu-header h6 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.smart-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s;
}

.smart-menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.smart-menu-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.smart-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: #6c757d;
  font-size: 12px;
}

.smart-tab.active {
  background: white;
  color: var(--messenger-primary);
  border-bottom: 2px solid var(--messenger-primary);
}

.smart-tab i {
  font-size: 18px;
}

.smart-menu-content {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.smart-tab-content {
  display: none;
}

.smart-tab-content.active {
  display: block;
}

.smart-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.smart-btn {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: #495057;
}

.smart-btn:hover {
  border-color: var(--messenger-primary);
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 132, 255, 0.15);
}

.smart-btn i {
  font-size: 24px;
  color: var(--messenger-primary);
}

.smart-btn span {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

.smart-btn.nav-btn:hover i {
  color: #28a745;
}

.smart-btn.question-btn:hover i {
  color: #ffc107;
}

.smart-btn.action-btn:hover i {
  color: #dc3545;
}

.smart-btn.ai-btn:hover i {
  color: #9c27b0;
}

/* === ESTILOS PARA BÚSQUEDA INTELIGENTE === */
.smart-search-bar {
  background: #f8f9fa;
  border-radius: 12px;
  margin: 10px;
  padding: 15px;
  border: 1px solid #e9ecef;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 25px;
  padding: 8px 15px;
  border: 1px solid #dee2e6;
}

.search-icon {
  color: #6c757d;
  margin-right: 10px;
  font-size: 18px;
}

.smart-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #495057;
}

.search-close-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.2s;
}

.search-close-btn:hover {
  background: #f8f9fa;
  color: #dc3545;
}

.search-results {
  margin-top: 15px;
  max-height: 200px;
  overflow-y: auto;
}

.search-result-item {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e9ecef;
  background: white;
}

.search-result-item:hover {
  background: #f8f9ff;
  border-color: var(--messenger-primary);
}

.search-suggestions {
  margin-top: 15px;
}

.suggestion-category h6 {
  color: #6c757d;
  font-size: 12px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.context-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-suggestion {
  background: var(--messenger-primary);
  color: white;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.context-suggestion:hover {
  background: var(--messenger-secondary);
  transform: translateY(-1px);
}

/* === ESTILOS PARA IA AVANZADA === */
.ai-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  padding: 10px;
  background: linear-gradient(135deg, #185FA5 0%, #378ADD 100%);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  font-weight: 500;
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  margin-right: 8px;
  animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ai-learning-section {
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 12px;
  color: white;
}

.ai-learning-section h6 {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}

.learning-stats {
  display: flex;
  justify-content: space-between;
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 11px;
  opacity: 0.9;
  margin-bottom: 2px;
}

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .messenger-chat-container {
    width: calc(100vw - 20px);
    height: calc(100vh - 40px);
    bottom: 10px;
    right: 10px;
  }
  
  .chat-float-button {
    bottom: 90px;
    right: 10px;
  }
  
  .smart-menu {
    width: 95vw;
    margin: 10px;
  }
  
  .smart-buttons-grid {
    grid-template-columns: 1fr;
  }
  
  .smart-tab {
    font-size: 11px;
  }
  
  .smart-tab i {
    font-size: 16px;
  }
}

.is-hidden {
  display: none;
}
