/* 消息页面样式 */
.messages-container {
    display: flex;
    height: calc(100vh - 120px);
    padding: 10px;
}

.contacts-list {
    width: 300px;
    background-color: #fff;
    border-radius: 8px;
    margin-right: 10px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.contacts-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.contacts-header h2 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.contact-item {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-item:hover {
    background-color: #fafafa;
}

.contact-item.active {
    background-color: #fff5f0;
}

.contact-avatar {
    margin-right: 15px;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.contact-last-message {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.contact-time {
    font-size: 12px;
    color: #999;
    align-self: flex-start;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.chat-partner {
    display: flex;
    align-items: center;
}

.partner-avatar {
    margin-right: 15px;
}

.partner-avatar .avatar-placeholder {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.partner-name {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.partner-status {
    font-size: 12px;
    color: #19be6b;
}

.btn-order {
    padding: 8px 15px;
    background-color: #ff5000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fafafa;
}

.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    max-width: 70%;
}

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

.message.sent {
    align-items: flex-end;
    margin-left: auto;
}

.message-content {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.message.received .message-content {
    background-color: #fff;
    border: 1px solid #eee;
    border-top-left-radius: 0;
}

.message.sent .message-content {
    background-color: #ff5000;
    color: white;
    border-top-right-radius: 0;
}

.message-image {
    margin-bottom: 20px;
}

.message-image.received {
    align-items: flex-start;
}

.image-placeholder {
    width: 200px;
    height: 150px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.message.received .message-time {
    align-self: flex-start;
}

.message.sent .message-time {
    align-self: flex-end;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.input-tools {
    margin-right: 10px;
}

.tool-btn {
    width: 36px;
    height: 36px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.input-area {
    flex: 1;
}

.input-area input {
    width: 100%;
    height: 36px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 18px;
    outline: none;
}

.send-actions {
    margin-left: 10px;
}

.btn-send {
    height: 36px;
    padding: 0 20px;
    background-color: #ff5000;
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
}

@media (max-width: 768px) {
    .messages-container {
        height: calc(100vh - 100px);
    }
    
    .contacts-list {
        width: 100px;
    }
    
    .contact-info {
        display: none;
    }
    
    .contact-time {
        display: none;
    }
    
    .contact-avatar {
        margin-right: 0;
    }
    
    .avatar-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .contacts-header h2 {
        font-size: 14px;
    }
}