#tts-chatbot-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#tts-chatbot-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a1a2e;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

#tts-chatbot-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

#tts-chatbot-btn svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

#tts-chatbot-window {
  display: none;
  flex-direction: column;
  width: 360px;
  height: 500px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
}

#tts-chatbot-window.open {
  display: flex;
}

#tts-chatbot-header {
  background: #1a1a2e;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#tts-chatbot-header .tts-title {
  font-weight: 600;
  font-size: 15px;
}

#tts-chatbot-header .tts-subtitle {
  font-size: 11px;
  opacity: 0.7;
}

#tts-chatbot-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
}

#tts-chatbot-close:hover { opacity: 1; }

#tts-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f7f8;
}

.tts-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.tts-msg.bot {
  background: #fff;
  border: 1px solid #e5e5e5;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.tts-msg.user {
  background: #1a1a2e;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.tts-msg.typing {
  opacity: 0.6;
  font-style: italic;
}

.tts-msg.bot a {
  color: #1a1a2e;
  text-decoration: underline;
  word-break: break-all;
}

#tts-chatbot-footer {
  padding: 12px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  gap: 8px;
  background: #fff;
}

#tts-chatbot-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
}

#tts-chatbot-input:focus { border-color: #1a1a2e; }

#tts-chatbot-send {
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

#tts-chatbot-send:hover { opacity: 0.85; }

#tts-chatbot-send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}
