/*
 * T&A Consulting Chatbot – Final fixed version
 * Scrollable chat column + static quick buttons + input bar
 */

#ta-chatbot-root {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Floating bubble */
.ta-chatbot-toggle {
  width: 56px;
  height: 56px;
  background: #c91616;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.ta-chatbot-toggle:hover { transform: scale(1.05); }

/* Chat window container */
.ta-chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 360px;
  height: 520px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.ta-chatbot-header {
  background: #c91616;
  color: #fff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ta-chatbot-header select {
  border: none;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 13px;
}
.ta-chatbot-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* Scrollable chat area */
.ta-chatbot-messages {
  flex: 1;
  background: #f5f5f5;
  overflow-y: auto;
  padding: 12px;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

/* Greeting placeholder */
.ta-chatbot-placeholder {
  color: #555;
  font-size: 14px;
  text-align: center;
  margin: auto 0;
  opacity: 0.9;
}

/* Message bubbles */
.ta-chatbot-message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 14px;
  max-width: 80%;
  line-height: 1.4;
  word-wrap: break-word;
}
.ta-chatbot-message.user {
  background: #d2f8c6;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  text-align: right;
}
.ta-chatbot-message.bot {
  background: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  text-align: left;
}

/* Typing indicator */
.ta-chatbot-typing {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin: 4px 10px 8px;
}

/* Bottom section (fixed at bottom of container) */
.ta-chatbot-bottom {
  flex-shrink: 0;
  border-top: 1px solid #ddd;
  background: #fff;
}

/* Quick buttons */
.ta-chatbot-quick {
  border-bottom: 1px solid #eee;
  padding: 6px 8px;
  background: #fafafa;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}
.ta-chatbot-quick button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ta-chatbot-quick button:hover { background: #f1f1f1; }

/* Input bar */
.ta-chatbot-input-area {
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
}
.ta-chatbot-input-area input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
}
.ta-chatbot-input-area button {
  background: #c91616;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ta-chatbot-input-area button:hover {
  background: #a81212;
}

/* Scrollbar */
.ta-chatbot-messages::-webkit-scrollbar {
  width: 6px;
}
.ta-chatbot-messages::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.25);
  border-radius: 3px;
}

/* Mobile */
@media (max-width: 480px) {
  .ta-chatbot-container {
    width: 90vw;
    right: 5vw;
    height: 75vh;
  }
}