
/*区分聊天*/
.content{
	width: 100%;
    padding-left: 0px;
}

.me{
    display: block;
    clear: both;
    overflow: hidden;
    margin-bottom: 20px;
}

.me .user-img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background-color: #155EEF;
}

.me .user-img img {
    width: 26px;
    height: 26px;
}

.me p { 
    float: right;
}

.me span{
    float: right;
    background: #E1EFFD;
    padding: 14px;
    border-radius:4px;
    margin-right: 12px;
    max-width: 485px;
    position: relative;
    font-size: 14px;
    line-height: 20px;
}

/*master*/
.master{
    /* width: 570px; */
    display: block;
    clear: both;
    overflow: hidden;
    /*float:left;*/
    margin-bottom: 20px;
    position: relative;
}

.master img {
    float: left;
    background-color: #FEEAD5;
    border-radius: 4px;
    width: 42px;
    height: 42px;
}

.master p {
    margin: 0;
    float: left;
    position: absolute;
    left: 54px;
    font-size: 14px;
    font-weight: 500;
}

.master span{
    background: #F3F3F5;
    padding: 14px;
    border-radius: 4px;
    float: left;
    margin: 23px 0 0 12px;
    max-width: 485px;
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 20px;
}

/* 流式输出样式 */
.streaming-content::after {
    content: '▋';
    animation: blink 1s infinite;
    color: #155EEF;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/*other*/
.other{
    display: block;
    clear: both;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.other img {
    float: left;
    background-color: #FEEAD5;
    border-radius: 4px;
    width: 42px;
    height: 42px;
    padding: 6px;
}

.other p {
    margin: 0;
    float: left;
    position: absolute;
    left: 54px;
    font-size: 14px;
    font-weight: 500;
}

.other span{
    background: #F3F3F5;
    padding: 14px;
    border-radius: 4px;
    float: left;
    margin: 23px 0 0 12px;
    width: 480px;
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 20px;
}

.other span p {
    margin: 0;
    float: left;
    position: absolute;
    left: 54px;
    font-size: 14px;
    font-weight: 500;
}

.other span section{
    color: #155EEF;
}

#agent_log_close_id {
    background-color: transparent;
    border: none;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

/* 消息评价功能样式 */
/* 消息评价状态样式 - 替代原有的评价按钮样式 */

/* 好评消息样式 - 自然绿色 */
.master.message-rating-good {
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.3) 0%, transparent 100%);
    border-left: 3px solid #22c55e;
    padding-left: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.master.message-rating-good:hover {
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.5) 0%, transparent 100%);
    border-left-color: #16a34a;
}

.master.message-rating-good span {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* 差评消息样式 - 自然红色 */
.master.message-rating-bad {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.3) 0%, transparent 100%);
    border-left: 3px solid #ef4444;
    padding-left: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.master.message-rating-bad:hover {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.5) 0%, transparent 100%);
    border-left-color: #dc2626;
}

.master.message-rating-bad span {
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 消息评价指示器样式 */
.message-rating-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    margin-left: 8px;
    animation: fadeIn 0.3s ease;
    vertical-align: middle;
}

.message-rating-indicator.good {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.message-rating-indicator.bad {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* 消息评价按钮容器样式 */
.message-rating-container {
    margin-top: 4px;
    margin-left: 54px;
    clear: both;
    position: relative;
}

.message-rating-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.message-rating-actions:hover {
    opacity: 1;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #5f6368;
}

.btn-icon:hover:not(:disabled) {
    background-color: #f1f3f4;
    color: #202124;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 激活状态（点赞/点踩后） */
.btn-icon.active svg {
    fill: currentColor;
    animation: icon-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-icon.active.like,
.btn-icon.active.dislike {
    color: #155EEF;
}

@keyframes icon-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* 移除旧的反馈文字样式 */
.rating-feedback {
    display: none !important;
}
.feedback-panel {
    display: none;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 485px;
    overflow: hidden;
    font-family: inherit;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
    float: left;
    clear: both;
}

/* Reset styles */
.feedback-panel span {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    max-width: none !important;
    position: static !important;
    display: inline !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    border-radius: 0 !important;
}

.feedback-header {
    padding: 16px 20px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.feedback-header span {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.feedback-close {
    cursor: pointer;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s;
    background: transparent;
}

.feedback-close:hover {
    color: #4b5563;
}

/* 第一行：包含选项标签和（可能的）提交按钮 */
.feedback-row-1 {
    padding: 0 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.feedback-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1; /* 占据剩余空间 */
}

.feedback-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px; /* 移除垂直 padding，靠 height 和 align-items 居中 */
    height: 36px; /* 与提交按钮高度保持一致 */
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px; /* 统一圆角 */
    font-size: 13px; /* 略微调大字体与按钮一致 */
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.feedback-option:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.feedback-option.selected {
    background-color: #eff6ff;
    border-color: #155EEF;
    color: #155EEF;
    font-weight: 500;
}

/* 第二行：输入框区域（仅在选中“其他”时显示） */
.feedback-row-2 {
    display: none;
    padding: 0 20px 16px;
    align-items: center;
    gap: 12px;
}

/* 输入框栏：灰色背景长条 */
.feedback-input-wrapper {
    flex: 1;
    display: flex;
    background-color: #f3f4f6;
    border-radius: 6px; /* 统一圆角 */
    padding: 4px 12px;
    align-items: center;
}

.feedback-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
    color: #1f2937;
    height: 32px;
    font-family: inherit;
}

.feedback-input::placeholder {
    color: #9ca3af;
}

/* 提交按钮：位置动态变化 */
.feedback-submit-btn {
    display: none; /* 默认隐藏，选中任意项后显示 */
    background-color: #155EEF;
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 6px; /* 统一圆角 */
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    height: 36px; /* 略高于输入框 */
    white-space: nowrap;
    flex-shrink: 0;
}

.feedback-submit-btn:hover {
    background-color: #104ab5;
    box-shadow: 0 2px 4px rgba(21, 94, 239, 0.2);
}



/* 评价反馈提示样式 */
.rating-feedback {
    position: absolute;
    bottom: -35px;
    left: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    animation: fadeInUp 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rating-feedback.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.rating-feedback.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .master.message-rating-good,
    .master.message-rating-bad {
        margin-left: 0;
        padding-left: 6px;
        border-left-width: 2px;
    }

    .message-rating-indicator {
        width: 18px;
        height: 18px;
        font-size: 11px;
        margin-left: 6px;
    }

    .message-rating-container {
        margin-left: 20px;
    }

    .btn-icon {
        padding: 4px;
    }

    .rating-comment {
        flex-basis: 100%;
        min-width: 100%;
    }

    .rating-feedback {
        font-size: 10px;
        bottom: -30px;
        left: 10px;
        right: 10px;
    }
}
