/* CSS样式 */
.dialog {
    position: fixed;
    right: 0;
    top: 0;
    width: 70vw; /* 可根据需要调整 */
    height: 100%;
    background-color: #f9f9f9; /* 可根据需要调整 */
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    border: 1px solid #ccc; /* 添加边框 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); /* 添加阴影 */
}

.dialog.open {
    transform: translateX(0);
}

.dialog-title {
    color:#000; /* 可根据需要调整 */
}

.dialog-title-text {
    position: relative;
    float:left;
    font-size: 1.5em; /* 可根据需要调整 */
    margin: 0 0 0 20px;
    padding: 10px 10px 0 0;
    border-bottom: 4px solid #e6d5b0; /* 添加底部边框 */
}

/* CSS样式 */
.dialog-input {
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100% - 20px); /* 减去左右的padding */
    height:auto;
    min-height: 200px; /* 设置最小高度 */
    max-height: 344px; /* 设置最大高度 */
    background-color: #fff; /* 可根据需要调整 */
    padding: 0 10px 10px 10px;
}

.dialog-input textarea {
    width: 100%;
    min-height: 100%;
    border: none;
    padding: 10px;
    box-sizing: border-box;
    resize: none; /* 禁止手动调整大小 */
    background-color: #f7f3e3; /* 添加背景色 */
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.15); /* 添加阴影 */
    outline: none; /* 移除选中时的轮廓 */
}
.close-button {
    position: relative;
    top: 15px; /* 调整这个值 */
    left: 15px; /* 调整这个值 */
    width: 20px;
    height: 20px;
    border: none;
    background-color: transparent; /* 透明背景 */
    cursor: pointer;
    text-align: center;
    font-size: 20px;
    color: #000; /* 可根据需要调整 */
    float: left;
}

.header-close-button {
    position: absolute;
    top: 15px; /* 调整这个值 */
    right: 15px; /* 调整这个值 */
    width: 20px;
    height: 20px;
    border: none;
    background-color: transparent; /* 透明背景 */
    cursor: pointer;
    text-align: center;
    font-size: 20px;
    color: #000; /* 可根据需要调整 */
}

.close-button:hover {
    color: #f44336; /* 可根据需要调整 */
}

.button-container{
    position: fixed;
    right: 10px;
    bottom: 10px;
    display: none;
}
.send-button {
    padding: 5px 10px;
    margin: 0 2px;
    border: none;
    background-color: #4CAF50; /* 可根据需要调整 */
    color: #fff; /* 可根据需要调整 */
    cursor: pointer;
}

.send-button:hover {
    background-color: #45a049; /* 可根据需要调整 */
}

.dialog-history {
    position: absolute;
    top: 50px; /* 调整这个值 */
    left: 0;
    width: calc(100% - 20px);
    height: calc(100% - 354px); /* 减去输入框的高度和一些额外的空间 */
    padding: 10px;
    overflow-y: auto; /* 允许滚动 */
}

.scrollbar-container {
    /* 其他样式保持不变 */
    padding-bottom: 20px; /* 添加底部内边距，确保滚动条可以滚动到最底部 */
}

.message {
    display: flex;
    flex-direction: column; /* 使内容在上，发言人在下 */
    align-items: flex-start; /* 默认靠左 */
    margin-bottom: 20px;
    min-height: 10px;
    height: auto; 
    padding: 0px; 
    margin: 0px; 
    background: transparent; 
    width: 100%; 
    min-height: 10px;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
}

.message .content {
    display: flex;
    width: 100%;
}

.message.assistant .content {
    align-items: flex-start; /* assistant的内容靠左 */
    flex-direction: row; /* 使发言人和内容在同一行 */
}

.message.assistant .editor-preview, .editor-preview-side  {
    background: #f9f9f9; 
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
}

.editor-preview pre, .editor-preview-side pre{
    margin-bottom:10px;
    background-color: inherit;
}

.message.user .content {
    align-items: flex-end; /* assistant的内容靠左 */
    flex-direction: row-reverse; /* 使发言人和内容在同一行 */
}

.message.user .editor-preview, .editor-preview-side  {
    background: linear-gradient(165deg, #fff, #e6d5b0); /* 添加渐变背景，从白色渐变到与边框颜色相同 */
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
}

.dialog-input .editor-toolbar::before{
    margin-bottom: 0px;
}

.dialog-input .editor-toolbar::after{
    margin-top: 0px;
}

.dialog-input .CodeMirror {
    min-height: 200px;
    height: 200px;
}

.dialog-input .CodeMirror-scroll {
    min-height: 200px;
}

.toolbar-using {
    color: blue;
}

.message .sender {
    font-weight: bold; /* 发言人字体加粗 */
}

.message .text {
    max-width: 70%; /* 限制最大宽度，避免内容过长 */
    word-wrap: break-word; /* 如果内容过长，允许换行 */
    margin: 0 10px; /* 调整内容和发言人之间的距离 */
    border: 1px solid #e6d5b0; /* 添加边框，颜色更柔和 */
    border-radius: 5px; /* 边框弧度为5px */
    box-shadow:  5px 5px 10px #e6d5b0; /* 添加立体阴影，颜色与边框相同 */
    background: linear-gradient(165deg, #fff, #e6d5b0); /* 添加渐变背景，从白色渐变到与边框颜色相同 */
    padding: 10px; /* 添加内边距，使文本不会贴着边框 */
}

.message .time {
    font-size: 0.7em; /* 调整字体大小 */
    color: #888; /* 可根据需要调整 */
}