#chatbot-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: inherit;
}

#chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFE4C6;
  color: #000;
  border: none;
  font-size: 1.3rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background 0.2s ease;
}

#chatbot-toggle:hover {
  background: #FFD32C;
}

#chatbot-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 340px;
  max-width: calc(100vw - 40px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

#chatbot-header {
  background: #FFE4C6;
  color: #000;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

#chatbot-close {
  background: none;
  border: none;
  color: #000;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

#chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatbot-msg {
  max-width: 85%;
  padding: 8px 12px;
  font-size: 0.9rem;
  line-height: 1.35;
  border-radius: 4px;
  white-space: pre-wrap;
}

.chatbot-msg-user {
  align-self: flex-end;
  background: #FFD32C;
  color: #000;
}

.chatbot-msg-model {
  align-self: flex-start;
  background: #f1f1f1;
  color: #000;
}

.chatbot-msg-model a {
  color: #E49B0F;
  text-decoration: underline;
  font-weight: 600;
}

.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
}

.chatbot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  animation: chatbot-bounce 1.2s infinite ease-in-out;
}

.chatbot-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chatbot-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chatbot-bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.chatbot-msg-error {
  align-self: flex-start;
  background: #fdecea;
  color: #611a15;
}

#chatbot-form {
  display: flex;
  border-top: 1px solid #eee;
}

#chatbot-input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 0.9rem;
  outline: none;
}

#chatbot-form button[type="submit"] {
  border: none;
  background: #fff;
  padding: 0 14px;
  cursor: pointer;
  color: #000;
}
