/* 模态框样式 */

/* 模态框容器 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

/* 模态框激活状态 */
.modal.active {
    display: flex;
}

/* 模态框内容 */
.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.4s ease;
}

/* 模态框头部 */
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
}

/* 模态框标题 */
.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 关闭按钮 */
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

/* 模态框主体 */
.modal-body {
    padding: 20px;
}

/* 聊天机器人样式 */
.chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    min-height: 300px;
    max-height: 300px;
}

/* 聊天消息 */
.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
    display: flex;
    flex-direction: column;
}

/* 用户消息 */
.chat-message.user {
    margin-left: auto;
    align-items: flex-end;
}

/* 机器人消息 */
.chat-message.bot {
    margin-right: auto;
    align-items: flex-start;
}

/* 消息内容 */
.chat-message-content {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    max-width: 100%;
}

/* 用户消息内容 */
.chat-message.user .chat-message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

/* 机器人消息内容 */
.chat-message.bot .chat-message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

/* 聊天输入容器 */
.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* 聊天输入框 */
.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    background: #f9f9f9;
    resize: none;
    min-height: 50px;
    max-height: 100px;
    overflow-y: auto;
}

/* 发送按钮 */
.chat-send {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow-button);
}

/* 动画效果 */
@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 模态框滚动条样式 */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 聊天消息滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
