﻿
.dx-button.dx-button-has-icon:not(.dx-button-has-text):not(.dx-shape-standard) {
    border-radius: 4px !important;
}

.chat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #dcdcdc;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
}

.resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    z-index: 1001;
}

    .resize-handle:hover, .resize-handle.active {
        background: rgba(0,120,215,0.2);
    }

/* 左侧菜单 */
.chat-header {
    padding: 3px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dcdcdc;
}

    .chat-header h6 {
        margin: 0px;
        padding: 0px;
    }

.chat-container {
    display: flex;
    height: 100%;
    flex: 1;
    overflow: hidden;
}

.chat-queue {
    width: 25%;
    min-width: 100px;
    border-right: 1px solid #dcdcdc;
    display: flex;
    flex-direction: column;
}

.session-header {
    padding: 4px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}

    .session-header .iconfont {
        font-size: 14px !important;
        align-items: self-end;
        margin-right: 4px !important;
    }

    .session-header .dx-button-content {
        padding: 6px 8px !important;
    }

.session-scroll-wrapper {
    flex: 1;
    overflow-y: auto;
}

.fixed-function-list {
    border-top: 1px solid #dcdcdc;
    padding: 5px 0;
}


.function-title {
    font-size: 12px;
    color: #8c8c8c;
    padding: 0 14px 8px;
}

.function-item {
    padding: 4px 16px;
    cursor: pointer;
    font-size: 13px;
}

    .function-item:hover, .function-item.active {
        background: #e6f7ff;
        color: #1890ff;
    }

.session-item {
    display: flex;
    align-items: center;
    padding: 6px 17px;
    cursor: pointer;
}

    .session-item.active {
        background: #e6f7ff;
        color: #1890ff;
    }

    .session-item:hover {
        background: #f5f5f5;
    }

.session-checkbox {
    margin: 0 9px 0 -3px !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    transform: scale(1);
    cursor: pointer;
    box-sizing: border-box;
}

.session-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.session-delete-btn {
    opacity: 0;
    color: red;
    background: none;
    border: none;
}

.session-item:hover .session-delete-btn {
    opacity: 1;
}

.session-badge {
    font-size: 12px;
    margin-right: 4px;
}

/* 右侧聊天 */
.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f7f9fa;
}

#queueInfo {
    font-size: 12px;
    text-align: center;
}

.message-item {
    display: flex;
    margin-bottom: 12px;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
}

.avatar-inner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f0f0;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.user-message .avatar-inner {
    background: #1890ff;
    color: #fff;
}

.message-content {
    max-width: 70%;
    margin: 0 8px;
}

.message-sender {
    font-size: 12px;
    color: #8c8c8c;
    margin-bottom: 4px;
}

.message-text {
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.5;
    font-size: 14px;
    background: #fff;
    border: 1px solid #eee;
}

.user-message .message-text {
    background: #1890ff;
    color: #fff;
    border: none;
}
/* 系统消息：实现换行+滚动条 */
.system-message-text {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}
/* 输入区域 */
.chat-input-wrapper {
    border-top: 1px solid #dcdcdc;
    padding: 12px;
    background: #fff;
}

.chat-input-container {
    border: 1px solid #e0e5eb;
    border-radius: 20px;
    padding: 8px;
    background: #f7f9fa;
}

.dx-icon.iconfont.icon-fasong {
    margin-right: 8px;
    align-items: center;
    font-size: 12px;
}

.native-textarea {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    min-height: 60px;
    max-height: 120px;
}

    .native-textarea::placeholder {
        color: #999 !important;
        font-size: 14px !important;
        opacity: 1 !important;
    }

/* 输入区域的工具栏 */
.chat-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.tool-icons-group {
    display: flex;
    gap: 0px;
}

    .tool-icons-group .dx-icon {
        color: #7c7c7c;
    }

.chat-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.2);
    z-index: 88;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: #d1d9e6;
    border-radius: 3px;
}


/* 上传文件列表 */
.file-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.upload-box, .pinned-box {
    flex: 1;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .upload-box h3, .pinned-box h3 {
        font-size: 18px;
        margin-bottom: 12px;
        color: #333;
    }

.drop-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

    .drop-area.active {
        border-color: #409eff;
        background: #ecf5ff;
    }

.pinned-list {
    min-height: 180px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.file-item {
    padding: 8px 12px;
    background: #f5f7fa;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pin-btn {
    padding: 4px 8px;
    background: #409eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

    .pin-btn:hover {
        background: #337ecc;
    }

.uploaded-files-container {
    margin-top: 16px;
}

    .uploaded-files-container h4 {
        font-size: 14px;
        margin-bottom: 8px;
        color: #333;
    }

.uploaded-files-list {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 12px;
}

.uploaded-file-item {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 4px;
}

    .uploaded-file-item:hover {
        background: #f5f7fa;
    }

.uploaded-item-checkbox {
    width: 14px;
    height: 14px;
}

.empty-tip {
    color: #999;
    text-align: center;
    padding: 10px 0;
    font-size: 13px;
}

.action-row {
    text-align: right;
}

.confirm-btn {
    padding: 6px 12px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

    .confirm-btn:hover {
        background: #337ecc;
    }
/* 固定按钮容器 */
.fixed-session-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
}

.agent-btn-left-align {
    width: 100% !important;
    text-align: left !important;
    /* padding-left: 4px !important; */
}

    .agent-btn-left-align .dx-button-content {
        justify-content: flex-start !important;
        width: 100% !important;
        padding: 6px 12px !important;
    }



/* 动态会话列表 */
.dynamic-session-list {
    flex: 1;
    overflow-y: auto;
}

/* 拖拽样式 */
#chatDrawer {
    will-change: width;
    backface-visibility: hidden;
    transform: translateZ(0);
}

#resizeHandle {
    user-select: none;
}

body.resizing {
    user-select: none;
    pointer-events: none;
}

    body.resizing * {
        pointer-events: none !important;
    }

.agent-btn-left-align.active {
    background: #e6f7ff !important;
    color: #1890ff !important;
}
/* 添加到首页弹框样式  开始 */
.layoutFrom .dx-field {
    margin: 0 0 10px 0;
}

.custom-item {
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
}

    /* 下拉列表里的图标项 */
    .custom-item > img {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 22px;
        height: 22px;
        padding: 4px;
        background-color: #204fb6;
        border-radius: 6px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    }

/* 输入框里显示的选中项 */
.dx-dropdowneditor-input-wrapper .custom-item > img {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    padding: 3px;
    background-color: #204fb6;
    border-radius: 4px;
    box-shadow: none;
}

.custom-item .product-name {
    display: inline-block;
    padding-left: 44px;
    line-height: 36px;
    font-size: 14px;
    width: 100%;
    color: #333;
}
/* 添加到首页弹框样式  结束 */


/* 智能体按钮选中高亮 */
.agent-button.active {
    background: #e6f7ff !important;
    color: #1890ff !important;
    border-radius: 4px;
}


/* 给标记项加单独样式 */
.menu-item-highlight {
    background-color: #e33234;
    color: #ffffff;
}

.menu-item-hint {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.chat-file-uploader .dx-button {
    background: transparent;
    border: none;
    padding: 0;
    width: 20px;
    height: 25px;
}

    .chat-file-uploader .dx-button .dx-icon {
        font-size: 16px;
        color: inherit;
    }

.chat-file-uploader .dx-fileuploader-button {
    background: transparent;
    border: none;
}
