/* 站内信页面：只作用在 message.shtml，避免影响个人中心其他模块 */
.messagePage .userInfo_left {
    height: 700px;
}

.messagePage a.page_list_item {
    text-decoration: none;
    color: #383838;
}

.messagePage a.page_list_item.active {
    color: #ec6449;
    background: #fff7f4;
}

.messagePage .page_list_item.message i {
    width: 28px;
    height: 22px;
    margin-right: 17px;
    border: 2px solid #999;
    border-radius: 3px;
    position: relative;
    flex: 0 0 auto;
    transition: border-color .2s;
}

.messagePage .page_list_item.message i::after {
    content: '';
    position: absolute;
    left: 1px;
    right: 1px;
    top: 1px;
    height: 9px;
    border-bottom: 2px solid #999;
    clip-path: polygon(0 0, 50% 100%, 100% 0);
}

.messagePage .page_list_item.message:hover i,
.messagePage .page_list_item.message.active i {
    border-color: #ec6449;
}

.messagePage .msg_right {
    min-height: 700px;
    padding-bottom: 30px;
}

.msg_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0 14px;
    border-bottom: 1px solid #f0f0f0;
}

.msg_header_actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.msg_header h1 {
    margin: 0 0 6px;
    font-size: 28px;
    color: #222;
}

.msg_header p {
    margin: 0;
    font-size: 14px;
    color: #999;
}

.msg_service {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin: 16px 0;
    background: #fff7f4;
    border: 1px solid #fde2da;
    border-radius: 8px;
    font-size: 16px;
    color: #8a4b3c;
}

.msg_service a {
    color: #ec6449;
    font-weight: 700;
    text-decoration: none;
}

.msg_btn {
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #555;
    font-size: 15px;
    padding: 9px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity .2s, background .2s;
}

.msg_btn:hover {
    opacity: .9;
}

.msg_btn.primary {
    background: #ec6449;
    border-color: #ec6449;
    color: #fff;
}

.msg_btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.msg_body {
    display: flex;
    gap: 16px;
    height: 526px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.msg_list {
    width: 288px;
    flex: 0 0 288px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    background: #fcfcfc;
}

.msg_list_head {
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.msg_list_head em {
    font-style: normal;
    font-size: 13px;
    color: #ec6449;
    font-weight: 400;
}

.msg_list_items {
    flex: 1;
    overflow-y: auto;
}

.conv_item {
    padding: 14px 16px;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
    transition: background .15s;
}

.conv_item:hover {
    background: #fff8f5;
}

.conv_item.active {
    background: #fff1ec;
    box-shadow: inset 3px 0 0 #ec6449;
}

.conv_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.conv_subject {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv_time {
    font-size: 12px;
    color: #aaa;
    flex: 0 0 auto;
}

.conv_preview {
    margin-top: 7px;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    max-height: 39px;
    overflow: hidden;
}

.conv_unread {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ec6449;
    color: #fff;
    font-size: 12px;
    text-align: center;
    margin-left: 6px;
}

.msg_list_empty {
    padding: 50px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
    line-height: 1.8;
}

.msg_chat {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.msg_chat_empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 16px;
}

#chatContent {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.msg_chat_head {
    height: 52px;
    flex: 0 0 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.msg_chat_head h2 {
    margin: 0;
    font-size: 17px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg_chat_head span {
    font-size: 13px;
    color: #999;
}

.msg_messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: #fafafa;
}

/* 留言记录：统一左对齐，以条目形式展示，避免即时聊天气泡感 */
.msg_row {
    margin-bottom: 14px;
}

.msg_entry {
    padding: 12px 14px;
    border: 1px solid #eee;
    border-left: 4px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.msg_row.mine .msg_entry {
    border-left-color: #ec6449;
}

.msg_row.them .msg_entry {
    border-left-color: #69a7d9;
    background: #fbfdff;
}

.msg_entry_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.msg_role {
    font-size: 13px;
    font-weight: 700;
    color: #555;
}

.msg_row.mine .msg_role {
    color: #ec6449;
}

.msg_row.them .msg_role {
    color: #3f83bd;
}

.msg_bubble {
    font-size: 15px;
    line-height: 1.65;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

.msg_meta {
    font-size: 12px;
    color: #aaa;
}

.msg_reply {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

.msg_reply textarea {
    width: 100%;
    height: 78px;
    resize: none;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.msg_reply textarea:focus {
    outline: none;
    border-color: #ec6449;
}

.msg_reply_bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.msg_reply_bar span {
    font-size: 13px;
    color: #999;
}

.msg_mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.msg_dialog {
    width: 520px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
}

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

.msg_dialog_head h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.msg_close {
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
}

.msg_dialog_body {
    padding: 18px 20px;
}

.msg_dialog_body label {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    color: #555;
    font-weight: 700;
}

.msg_dialog_body input,
.msg_dialog_body textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    margin-bottom: 16px;
}

.msg_dialog_body textarea {
    height: 130px;
    resize: none;
    margin-bottom: 0;
}

.msg_dialog_body input:focus,
.msg_dialog_body textarea:focus {
    outline: none;
    border-color: #ec6449;
}

.msg_dialog_foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
    font-size: 14px;
    color: #8a4b3c;
}

.msg_dialog_foot a {
    color: #ec6449;
    font-weight: 700;
    text-decoration: none;
}

.msg_chat_empty {
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    text-align: center;
}

.msg_empty_title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.msg_empty_tip {
    margin: 0;
    font-size: 13px;
    color: #aaa;
}

.msg_quick_bar {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.msg_quick_bar > span {
    flex: 0 0 auto;
    line-height: 28px;
    font-size: 13px;
    color: #999;
}

.msg_quick_items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.msg_quick_item {
    border: 1px solid #f3c9bd;
    background: #fff7f4;
    color: #8a4b3c;
    font-size: 13px;
    line-height: 18px;
    padding: 5px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.msg_quick_item:hover {
    background: #ec6449;
    border-color: #ec6449;
    color: #fff;
}

.msg_quick_dialog {
    margin-top: 14px;
}

.msg_quick_dialog label {
    margin-bottom: 8px;
}

.msg_quick_empty {
    font-size: 13px;
    color: #aaa;
}

.msg_toast {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translateX(-50%);
    z-index: 4000;
    max-width: 80vw;
    padding: 10px 18px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 1240px) {
    .messagePage .com {
        transform: scale(.95);
        transform-origin: top center;
    }
}
