// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

.ai-bot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.ai-bot-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #1890ff;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.ai-bot-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ai-bot-icon.active {
  background-color: #f5222d;
}

/* 机器人图标样式 */
.robot-icon {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.robot-icon svg {
  width: 100%;
  height: 100%;
  fill: white; /* 确保SVG是白色 */
}

/* 关闭图标样式 */
.close-icon {
  font-weight: bold;
  font-size: 18px;
}

.ai-bot-chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  height: 450px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #1890ff;
  color: white;
}

.chat-title {
  font-weight: 500;
  display: flex;
  align-items: center;
}

.close-btn {
  cursor: pointer;
  font-weight: bold;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #f5f5f5;
}

.message {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
}

.user-message {
  align-self: flex-end;
  background-color: #1890ff;
  color: white;
}

.bot-message {
  align-self: flex-start;
  background-color: white;
  color: #333;
  border: 1px solid #e8e8e8;
}

.message-content {
  word-break: break-word;
  white-space: pre-wrap;
}

.message-time {
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.7;
  text-align: right;
}

.loading-message {
  padding: 8px;
  text-align: center;
}

.chat-input {
  display: flex;
  padding: 12px;
  border-top: 1px solid #e8e8e8;
}

.chat-input input {
  flex: 1;
  margin-right: 8px;
}
