/* SMARTON WEB CHATBOT WIDGET */
:root {
  --chat-brand: #4ade80;
  --chat-bg: #0b0f19;
  --chat-card-bg: #151c2c;
  --chat-border: rgba(255, 255, 255, 0.08);
  --chat-text: #f3f4f6;
  --chat-text-dim: #9ca3af;
  --chat-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Burbuja Flotante */
#smarton-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--chat-brand);
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#smarton-chat-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(74, 222, 128, 0.6);
}

#smarton-chat-bubble svg {
  width: 28px;
  height: 28px;
  fill: #000;
  transition: transform 0.3s ease;
}

#smarton-chat-bubble:hover svg {
  transform: rotate(10deg);
}

/* Contenedor del Chat */
#smarton-chat-container {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 500px;
  background: var(--chat-bg);
  border: 1px solid var(--chat-border);
  border-radius: 16px;
  box-shadow: var(--chat-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.3s ease;
}

/* Animación al mostrar */
#smarton-chat-container.active {
  display: flex;
  animation: chatFadeUp 0.3s ease forwards;
}

@keyframes chatFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Cabecera */
.chat-header {
  padding: 16px;
  background: var(--chat-card-bg);
  border-bottom: 1px solid var(--chat-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.chat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--chat-text);
  margin: 0;
}

.chat-subtitle {
  font-size: 11px;
  color: var(--chat-brand);
  margin: 2px 0 0 0;
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--chat-text-dim);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.chat-close-btn:hover {
  color: #fff;
}

/* Área de Mensajes */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.1);
}

.chat-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message.bot {
  background: var(--chat-card-bg);
  color: var(--chat-text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--chat-border);
}

.chat-message.user {
  background: var(--chat-brand);
  color: #000;
  font-weight: 500;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Caja de Entrada */
.chat-input-area {
  padding: 12px;
  background: var(--chat-card-bg);
  border-top: 1px solid var(--chat-border);
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input-area input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--chat-border);
  padding: 10px 14px;
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input-area input:focus {
  border-color: var(--chat-brand);
}

.chat-send-btn {
  background: var(--chat-brand);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.chat-send-btn:hover {
  opacity: 0.9;
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
  fill: #000;
}

/* Responsividad para móviles */
@media (max-width: 480px) {
  #smarton-chat-container {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
  }
  #smarton-chat-bubble {
    bottom: 16px;
    right: 16px;
  }
}
