/* Effectivo Chatbot Widget — Site Vitrine (commercial) */

.eff-chatbot-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFC400;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: transform 0.2s, box-shadow 0.2s;
}
.eff-chatbot-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.eff-chatbot-bubble svg {
  width: 26px;
  height: 26px;
  fill: #0B1F3B;
}
.eff-chatbot-bubble .eff-close-icon { display: none; }
.eff-chatbot-bubble.eff-open .eff-chat-icon { display: none; }
.eff-chatbot-bubble.eff-open .eff-close-icon { display: block; }

/* Window */
.eff-chatbot-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 440px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}
.eff-chatbot-window.eff-visible { display: flex; }

/* Header */
.eff-chatbot-header {
  background: #0B1F3B;
  padding: 10px 16px;
  color: #fff;
}
.eff-chatbot-header p { display: none; }
.eff-chatbot-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.eff-chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.eff-chatbot-header p {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.8;
}
.eff-chatbot-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}
.eff-chatbot-close:hover { background: rgba(255,255,255,0.15); }
.eff-chatbot-close svg { width: 18px; height: 18px; fill: #fff; }

/* Messages area */
.eff-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 400px;
  max-height: calc(100vh - 200px);
}

/* Message bubbles */
.eff-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}
.eff-msg-bot {
  background: #f3f4f6;
  color: #1f2937;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.eff-msg-user {
  background: #0B1F3B;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.eff-msg p { margin: 0 0 8px; }
.eff-msg p:last-child { margin-bottom: 0; }
.eff-msg ul { margin: 4px 0; padding-left: 16px; }
.eff-msg li { margin: 2px 0; }

/* Links in bot messages */
.eff-msg-link {
  display: inline-block;
  margin-top: 8px;
  color: #0B1F3B;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  background: #FFC400;
  border-radius: 8px;
  transition: background 0.2s;
}
.eff-msg-link:hover { background: #e6b000; }

/* Option buttons */
.eff-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.eff-option-btn {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #0B1F3B;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  font-family: inherit;
}
.eff-option-btn:hover {
  border-color: #FFC400;
  background: #fffdf5;
}

/* Input bar (bottom) */
.eff-chatbot-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f3f4f6;
  background: #fff;
}
.eff-chatbot-input input {
  flex: 1;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.eff-chatbot-input input:focus { border-color: #FFC400; }
#eff-send {
  background: #FFC400;
  border: none;
  border-radius: 10px;
  width: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
#eff-send:hover { background: #e6b000; }
#eff-send svg { width: 18px; height: 18px; fill: #0B1F3B; }

/* Responsive mobile */
@media (max-width: 480px) {
  .eff-chatbot-window {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }
  .eff-chatbot-messages {
    max-height: calc(95vh - 160px);
    min-height: 300px;
  }
  .eff-chatbot-bubble {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}

/* Plan table in chat */
.eff-plan-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
  margin: 8px 0;
}
.eff-plan-table th,
.eff-plan-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.eff-plan-table th {
  font-weight: 600;
  color: #0B1F3B;
  background: #f9fafb;
}
.eff-plan-table .eff-plan-highlight {
  background: #fffdf5;
  font-weight: 600;
}

/* Loading dots */
.eff-typing {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
}
.eff-typing-dot {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: eff-bounce 1.2s infinite;
}
.eff-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.eff-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes eff-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}
