@keyframes tmChatTypingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}
.tm-chat-widget {
  /* ---- Root variables ---- */
  --chat--color-primary: var(--tm-chat-primary-color, #1875df);
  --chat--color-secondary: var(--tm-chat-secondary-color, #0a2681);
  --chat--color-background: var(--tm-chat-background-color, #ffffff);
  --chat--color-font: var(--tm-chat-font-color, #333333);
  font-family: "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* ---- Container ---- */
  /* ---- Header ---- */
  /* Text fallback if no wordmark image is provided */
  /* Wordmark image - height matches Figma spec of 16px */
  /* ---- Messages ---- */
  /* ---- Typing indicator ---- */
  /* ---- Welcome message heading ---- */
  /* ---- Input area ---- */
  /* ---- Toggle button (launcher) ---- */
  /* ---- Timed launcher prompt bubble ---- */
  /* ---- Lead capture banner ---- */
  /* Footer hidden - "Powered by" is in the header subtitle */
  /* ---- Mobile responsive ---- */
}
.tm-chat-widget .chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: none;
  width: 380px;
  height: 600px;
  background: var(--chat--color-background);
  border-radius: 16px 16px 37px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.tm-chat-widget .chat-container.open {
  display: flex;
  flex-direction: column;
}
.tm-chat-widget .brand-header {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}
.tm-chat-widget .brand-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #d1d3d9;
}
.tm-chat-widget .brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tm-chat-widget .brand-icon {
  width: 26px;
  height: 26px;
  color: var(--chat--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-chat-widget .brand-icon svg {
  width: 26px;
  height: 26px;
}
.tm-chat-widget .brand-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}
.tm-chat-widget .brand-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--chat--color-secondary);
  letter-spacing: -0.3px;
}
.tm-chat-widget .brand-wordmark {
  height: 16px;
  width: auto;
  display: block;
}
.tm-chat-widget .brand-subtitle {
  font-size: 11px;
  color: #999;
  padding: 8px 16px 10px;
}
.tm-chat-widget .brand-subtitle a {
  color: #999;
  text-decoration: underline;
}
.tm-chat-widget .close-button {
  background: #f0f8ff;
  border: none;
  color: var(--chat--color-primary);
  cursor: pointer;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.tm-chat-widget .close-button:hover {
  background: #dbeafe;
}
.tm-chat-widget .chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
}
.tm-chat-widget .bot-message-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.tm-chat-widget .bot-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tm-chat-widget .bot-avatar svg {
  width: 16px;
  height: 16px;
}
.tm-chat-widget .bot-avatar img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
}
.tm-chat-widget .chat-message {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 82%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.5;
}
.tm-chat-widget .chat-message.user {
  background: var(--chat--color-secondary);
  color: white;
  align-self: flex-end;
  border-radius: 8px;
  margin-left: auto;
}
.tm-chat-widget .chat-message.bot {
  background: #ffffff;
  color: var(--chat--color-font);
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
.tm-chat-widget .chat-message.bot.welcome-message {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  max-width: 100%;
  padding: 0;
}
.tm-chat-widget .chat-message.bot a {
  color: var(--chat--color-primary);
  text-decoration: underline;
}
.tm-chat-widget .chat-message img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}
.tm-chat-widget .typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 11px 18px;
  background: var(--chat--color-primary);
  border-radius: 5px;
  border: none;
}
.tm-chat-widget .typing-dots span {
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  animation: tmChatTypingBounce 1.2s infinite ease-in-out;
}
.tm-chat-widget .typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.tm-chat-widget .typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
.tm-chat-widget .welcome-hello {
  font-weight: 700;
  font-size: 22px;
  color: var(--chat--color-secondary);
}
.tm-chat-widget .welcome-name {
  font-weight: 700;
  font-size: 22px;
  color: var(--chat--color-primary);
}
.tm-chat-widget .chat-input {
  padding: 12px 20px 20px;
  background: var(--chat--color-background);
  display: flex;
  gap: 8px;
  align-items: center;
}
.tm-chat-widget .chat-input textarea {
  flex: 1;
  height: 51px;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 5px;
  background: var(--chat--color-background);
  color: var(--chat--color-font);
  resize: none;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  line-height: 21px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
.tm-chat-widget .chat-input textarea:focus {
  border-color: var(--chat--color-primary);
}
.tm-chat-widget .chat-input button {
  background: var(--chat--color-primary);
  color: white;
  border: none;
  border-radius: 5px;
  width: 89px;
  height: 51px;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  transition: opacity 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-chat-widget .chat-input button:hover {
  opacity: 0.85;
}
.tm-chat-widget .chat-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tm-chat-widget .chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 72px;
  height: 72px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  z-index: 9999;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-chat-widget .chat-toggle:hover {
  transform: scale(1.05);
}
.tm-chat-widget .chat-toggle img,
.tm-chat-widget .chat-toggle svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}
.tm-chat-widget .lead-complete-banner {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: white;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}
.tm-chat-widget .chat-footer {
  display: none;
}
@media (max-width: 480px) {
  .tm-chat-widget .chat-container {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
}
