/* SejaFit Typebot - vanilla design system (WhatsApp-like) */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: #FFFAFA;
  color: #202020;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

.progress-bar-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgb(241, 241, 241);
  z-index: 100;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #e0edff;
  transition: width 0.5s ease;
}

.chat-container {
  max-width: 800px;
  margin: 0 auto;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 20px 50vh 20px;
  scroll-behavior: smooth;
}
.chat-container::-webkit-scrollbar { width: 6px; }
.chat-container::-webkit-scrollbar-track { background: transparent; }
.chat-container::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bot-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: fadeInUp 0.35s ease both;
  margin-top: 12px;
}
.bot-row.same-bot { margin-top: 2px; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #ddd;
  object-fit: cover;
}
.avatar.hidden { visibility: hidden; }

.bot-bubble {
  background: rgb(247, 248, 255);
  padding: 8px 16px;
  border-radius: 6px;
  width: fit-content;
  max-width: 80%;
  word-wrap: break-word;
}
.bot-bubble img {
  display: block;
  max-width: 240px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 4px 0;
}
/* depoimento-4 sempre grande — print "antes/depois" perde força em mini.
   Aplica em TODOS os funis (flow.js, flow-club*, etc). */
.bot-bubble img[src*="depoimento-4"] {
  max-width: 100%;
}
.bot-bubble b, .bot-bubble strong { font-weight: 600; }

.guest-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  animation: fadeInUp 0.3s ease both;
}
.guest-bubble {
  background: #303235;
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: 6px;
  max-width: 80%;
  word-wrap: break-word;
}

.typing-bubble {
  background: rgb(247, 248, 255);
  padding: 12px 16px;
  border-radius: 6px;
  display: inline-flex;
  gap: 4px;
  width: fit-content;
}
.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
  animation: typingPulse 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.choices-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  align-items: flex-end;
  animation: fadeIn 0.3s ease both;
}
.choices-container.removing {
  animation: fadeOut 0.25s ease both;
}

.choice-btn {
  background: #303235;
  color: #FFFFFF;
  border: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  width: fit-content;
  max-width: 100%;
  animation: fadeInBtn 0.4s ease both;
  transition: transform 0.1s ease;
}
.choice-btn:hover { transform: translateY(-1px); }
.choice-btn:active { transform: translateY(0); }

.choice-link {
  background: #303235;
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
  display: inline-block;
  animation: fadeInBtn 0.4s ease both;
  transition: transform 0.1s ease, background 0.15s ease;
}
.choice-link:hover {
  transform: translateY(-1px);
  background: #1a1c1f;
}
.choice-link.cta-primary {
  background: linear-gradient(135deg, #ff5b94, #c8385b);
  color: #fff;
  font-weight: 600;
  padding: 14px 22px;
}

.number-input-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
  animation: fadeIn 0.3s ease both;
}
.number-input-row .number-input {
  max-width: 240px;
}
.number-input {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.number-input:focus {
  outline: none;
  border-color: #303235;
}
.number-input.shake {
  animation: shake 0.4s ease;
  border-color: #dc2626;
}
.send-btn {
  background: #303235;
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-6px); }
}
@keyframes fadeInBtn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@media (max-width: 640px) {
  .chat-container {
    padding: 24px 12px 50vh 12px;
  }
  .bot-bubble,
  .guest-bubble {
    max-width: 85%;
    font-size: 15px;
  }
}
