/*!
 * chat-widget.css
 * 来源：resources/views/web/shared/_chat_one.blade.php 的内联 <style>
 * 说明：仅为把样式从 HTML 里挪出来（避免慢网速下的样式错位 / FOUC），CSS 内容与原内联一致。
 */

.chat-modal-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.chat-modal-header {
    padding: 15px;
    background: #409EFF;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat-username {
    font-size: 16px;
    font-weight: bold;
}

.chat-close {
    cursor: pointer;
    font-size: 18px;
}

.chat-messages-container {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f5f5;
}

.chat-message {
    display: flex;
    margin-bottom: 15px;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    align-self: flex-end;
}

.message-content {
    max-width: 70%;
    margin: 0 10px;
}

.message-text {
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.5;
    word-break: break-word;
}

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

.received .message-text {
    background: white;
    color: #333;
    border-top-left-radius: 0;
}

.sent {
    justify-content: flex-end;
}

.sent .message-text {
    background: #409EFF;
    color: white;
    border-top-right-radius: 0;
}

.chat-input-area {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    background: white;
}

.chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 10px 15px;
    resize: none;
    outline: none;
    height: 40px;
    max-height: 120px;
    line-height: 20px;
}

.chat-send-btn {
    margin-left: 10px;
    padding: 0 20px;
    background: #409EFF;
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    outline: none;
}

.chat-send-btn:hover {
    background: #66b1ff;
}
