.chatbot.container {
  max-width: 500px;
  margin: 0 auto;
  height: 80vh;
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-title h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.bot-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.controls {
  display: flex;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.25rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: var(--bot-message-bg);
}
/* ================= */
.chat-container {
  width: 370px;
  height: 550px;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: #8e0007;
  color: white;
  padding: 16px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-wrapper {
  display: flex;
  flex-direction: column;
  /* max-width: 75%; */
}

.bot-message {
  background-color: #f1f0f0;
  align-self: flex-start;
  border-radius: 18px;
  padding: 10px 15px;
  max-width: 80%;
}

.timestamp {
  font-size: 11px;
  color: #777;
  margin-top: 4px;
  text-align: right;
}

.chat-input {
  display: flex;
  padding: 10px;
  /* border-top: 1px solid #ddd; */
  background: #fafafa;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
  outline: none;
}

.chat-input button {
  margin-left: 10px;
  background: #8e0007;
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  padding: 8px 12px;
  background-color: #f1f0f0;
  color: #333;
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
/* ================ */

.message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: messageAppear 0.5s ease forwards;
}

@keyframes messageAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-right: 1rem;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.user-message .avatar {
  background: var(--secondary-gradient);
}

.message-bubble {
  max-width: 70%;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  line-height: 1.5;
  position: relative;
}

.bot-message .message-bubble {
  background-color: var(--bot-message-bg);
  border-top-left-radius: 0;
}

.user-message {
  flex-direction: row-reverse;
  background-color: #f1f0f0;
  align-self: flex-end;
  border-radius: 18px;
  padding: 10px 15px;
  max-width: 80%;
}

.user-message .avatar {
  margin-right: 0;
  margin-left: 1rem;
}

.user-message .message-bubble {
  background: var(--user-message-bg);
  color: white;
  border-top-right-radius: 0;
}

.typing-indicator {
  display: none;
  padding: 1rem 1.5rem;
  background-color: var(--bot-message-bg);
  border-radius: 1rem;
  width: fit-content;
  margin-left: 3.5rem;
  box-shadow: var(--shadow-sm);
}

.typing-dots {
  display: flex;
  gap: 0.4rem;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.input-container {
  padding: 1.5rem;
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.input-wrapper {
  display: flex;
  gap: 1rem;
  background-color: var(--chat-bg);
  border-radius: 1rem;
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.message-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 1rem;
}

.message-input:focus {
  outline: none;
}

.message-input::placeholder {
  color: var(--text-secondary);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
}

.action-button {
  background: none;
  border: none;
  padding: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.action-button:hover {
  background-color: var(--bot-message-bg);
  color: var(--text-primary);
}

.send-button {
  background: #f73508;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.send-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  /* .container {
    height: 100dvh;
  } */

  .header-title h1 {
    font-size: 1.25rem;
  }

  .chat-container {
    padding: 1rem;
  }

  .message-bubble {
    max-width: 85%;
  }

  .input-container {
    padding: 1rem;
  }
}
.chat-clear {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.clear-button {
  background: #8e0007;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 5px;
  /* font-weight: bold; */
}
