/* 自定义样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 消息气泡 */
.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-start;
}

.message.agent {
    align-items: flex-end;
}

.agent-label {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
    padding: 0 5px;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: #fff;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 4px;
}

.message.agent .message-bubble {
    background: #0d6efd;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
}

.message.agent .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* 会话列表项 */
.session-item {
    cursor: pointer;
    transition: background 0.2s;
}

.session-item:hover {
    background: #f8f9fa;
}

.session-item.active {
    background: #e7f3ff;
    border-left: 3px solid #0d6efd;
}

/* 快捷回复卡片 */
.quick-reply-card {
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-card:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 系统消息 */
.system-message {
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    margin: 10px 0;
}

/* 图片消息 */
.message-image {
    max-width: 300px;
    border-radius: 8px;
    cursor: pointer;
}

.message-image:hover {
    opacity: 0.9;
}

/* 状态指示器 */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-online {
    background: #198754;
}

.status-busy {
    background: #ffc107;
}

.status-offline {
    background: #6c757d;
}

/* 输入气泡 */
.typing-bubble {
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    padding: 12px 16px !important;
    min-width: 60px;
    animation: fadeIn 0.3s ease;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 20px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typingDot 0.8s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.typing-preview {
    margin-top: 8px;
    color: #666;
    font-size: 13px;
    font-style: italic;
    max-width: 200px;
    word-break: break-word;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

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