/* 主容器 */
.mi-private-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.el-dialog.mi-private-dialog-wrap{
    width: 600px;

}
/* 弹窗主容器 - 总宽度600px (200px + 400px) */
.mi-private-dialog {
    width: 600px;
    height: 550px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    overflow: hidden;
    position: relative;
}

/* 左侧边栏 - 宽度200px，背景改为白色 */
.mi-private-sidebar {
    width: 220px;
    background: #ffffff;
    /* 改为白色背景 */
    border-right: 1px solid rgba(228, 231, 236, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* 搜索框 */
.mi-private-search {
    padding: 15px 10px 10px;
    border-bottom: 1px solid rgba(228, 231, 236, 0.6);
    background: #ffffff;
}

.mi-private-search .el-input__inner {
    border-radius: 8px;

    background: #f8fafc;
    padding-left: 35px;
    font-size: 12px;
    height: 32px;
    transition: all 0.3s ease;
}

.mi-private-search .el-input__prefix {
    left: 8px;
    color: #909399;
}

/* 垂直折叠面板容器 */
.mi-private-collapse-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 10px 8px;
}
.mi-private-collapse-container .el-collapse-item__content{
    padding-bottom: 0;
}
/* 折叠面板样式定制 */
.mi-private-collapse {
    border: none;
}

.mi-private-collapse-item {
    margin-bottom: 6px;
    border-radius: 8px !important;
    border: 1px solid rgba(228, 231, 236, 0.5) !important;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 去除展开后的蓝色边框 */
.mi-private-collapse-item.is-active {
    border-color: rgba(228, 231, 236, 0.5) !important;
    box-shadow: none;
}
.mi-private-collapse-item .el-collapse-item__wrap{
    max-height: 300px;
    overflow: scroll;
}
.mi-private-user-avatar-container .mi-ranking-vip-badge{
    bottom: -1px;
}
/* 折叠面板头部背景改为白色 */
.mi-private-collapse-header {
    padding: 8px 10px !important;
    background: #ffffff !important;
    /* 改为白色背景 */
    font-weight: 600;
    font-size: 12px;
    color: #303133;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mi-private-collapse-header i {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.mi-private-collapse-item.is-active .mi-private-collapse-header i {
    transform: rotate(90deg);
}

.mi-private-collapse-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: rgba(64, 158, 255, 0.1);
    color: #409eff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    margin-left: 4px;
}

/* 折叠面板内容背景改为白色 */
.mi-private-collapse-content {
    padding: 0 !important;
    background: #ffffff !important;
    /* 改为白色背景 */
}

/* 用户列表 - 去除固定高度 */
.mi-private-list {
    max-height: 445px;
    overflow-y: auto;
}

.mi-private-list::-webkit-scrollbar {
    width: 3px;
}

.mi-private-list::-webkit-scrollbar-track {
    background: transparent;
}

.mi-private-list::-webkit-scrollbar-thumb {
    background: rgba(64, 158, 255, 0.2);
    border-radius: 1.5px;
}

/* 私信用户项 */
.mi-private-user-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(228, 231, 236, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mi-private-user-item.active {
    background: linear-gradient(90deg, rgba(64, 158, 255, 0.1) 0%, transparent 100%);
}

.mi-private-user-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
}

/* 头像容器 - 添加相对定位以便放置会员标识 */
.mi-private-user-avatar-container {
    position: relative;
    width: 36px;
    height: 36px;
    margin-right: 8px;
}

/* 头像圆角5px */
.mi-private-user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 5px !important;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.mi-private-user-item:hover .mi-private-user-avatar {
    transform: scale(1.05);
}

/* 会员标识 - 头像右下角 */
.mi-private-vip-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.mi-private-vip-badge i {
    color: white;
    font-size: 8px;
}

.mi-private-user-info {
    flex: 1;
    min-width: 0;
}

.mi-private-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.mi-private-user-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mi-private-user-time {
    font-size: 10px;
    color: #909399;
    font-weight: 400;
}

.mi-private-user-lastmsg {
    font-size: 11px;
    color: #606266;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 未读消息标记 */
.mi-private-user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    background: #ff4d4f;
    color: white;
    font-size: 9px;
    font-weight: 600;
    border-radius: 7px;
    margin-left: 4px;
}

/* 右侧聊天区域 - 宽度400px */
.mi-private-chat {
    width: 400px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    position: relative;
    margin: 0 10px;
}

/* 聊天头部 */
.mi-private-chat-header {
    padding: 12px 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    position: relative;
    z-index: 1;
}

.mi-private-chat-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(64, 158, 255, 0.2), transparent);
}

.mi-private-chat-title {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.mi-private-chat-title .mi-real-level{
    margin-left: 5px;
    margin-right: 10px;

}
.mi-private-chat-title i {
    color: #409eff;
    font-size: 14px;
}

.mi-private-chat-status {
    font-size: 11px;
    color: #909399;
    font-weight: 400;
}

/* Ta的空间按钮样式 */
.mi-private-space-button {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #8a734c;
    background-color: #f5e8c7;
}

/* 消息列表容器 */
.mi-private-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-image: inherit; 
    position: relative;
}

.mi-private-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(64, 158, 255, 0.1), transparent);
}
/* 消息项 */
.mi-private-message {
    margin-bottom: 15px;
    display: flex;
    animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mi-private-message.receiver {
    justify-content: flex-start;
}

.mi-private-message.sender {
    justify-content: flex-end;
}

.mi-private-message-content {
    position: relative;
    display: flex;
    align-items: flex-start;
}

/* 接收方消息头像 */
.mi-private-message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-right: 8px;
    flex-shrink: 0;
}

.mi-private-message.sender .mi-private-message-avatar {
    order: 2;
    margin-left: 8px;
    margin-right: 0;
}

/* 接收方消息气泡 */
.mi-private-message.receiver .mi-private-message-bubble {
    background: white;
    border: 1px solid rgba(228, 231, 236, 0.8);
    color: #1a1a1a;
    padding: 8px 12px;
    border-radius: 3px 8px 4px 3px;
    font-size: 12px;
    line-height: 1.4;
    position: relative;
}

.mi-private-message.receiver .mi-private-message-bubble::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 6px 5px 0;
    border-color: transparent white transparent transparent;
}

.mi-private-message.receiver .mi-private-message-bubble::after {
    content: '';
    position: absolute;
    left: -7px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 6px 5px 0;
    border-color: transparent rgba(228, 231, 236, 0.8) transparent transparent;
}

/* 发送方消息气泡 */
.mi-private-message.sender .mi-private-message-bubble {
    background: #fff;
    color: #1a1a1a;
    padding: 8px 12px;
    border-radius: 3px 8px 4px 3px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.mi-private-message.sender .mi-private-message-bubble::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 6px;
    border-color: transparent transparent transparent #fff;
}

/* 消息时间 */
.mi-private-message-time {
    font-size: 10px;
    color: #fff;
    margin-top: 3px;
    padding: 0 6px;
}

.mi-private-message.sender .mi-private-message-time {
    text-align: right;
}

.mi-private-message.receiver .mi-private-message-time {
    text-align: left;
}

/* 已读未读标识 */
.mi-private-message-status {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.mi-private-message.sender .mi-private-message-status {
    justify-content: flex-end;
}

.mi-private-message.receiver .mi-private-message-status {
    justify-content: flex-start;
}

.mi-private-read-status {
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.mi-private-read-status.read {
    color: #67c23a;
    background: rgba(103, 194, 58, 0.1);
}

.mi-private-read-status.unread {
    color: #e6a23c;
    background: rgba(230, 162, 60, 0.1);
}

/* 输入区域 */
.mi-private-input-area {
    padding: 10px 0px 20px;
    background-color: #fff;
    position: relative;
}

.mi-private-input-area::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(64, 158, 255, 0.2), transparent);
}

/* 输入框 */
.mi-private-input-area .el-textarea__inner {
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
    resize: none;
    transition: all 0.3s ease;
}

/* 底部操作栏 - 图片和表情按钮移动到发送按钮同一行 */
.mi-private-input-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* 左侧按钮组 */
.mi-private-input-buttons {
    display: flex;
    gap: 10px;
}
.mi-private-popover{
    min-width: 100px;
    padding: 5px
}
.mi-private-input-buttons span{
    font-size: 14px;
}
.mi-private-input-buttons i{
    font-size: 21px;
}

.mi-private-input-buttons  button{
    color: #60626691;
}
/* 去除输入框图片的浮动效果 */
.mi-private-input-buttons .el-button {
    padding: 5px 0px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: none;
}
/* 发送按钮 */
.mi-private-send-button .el-button {
    padding: 8px 18px;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
    letter-spacing: 2.5px;
}
/* 附件菜单 - 去除浮现效果 */
.mi-private-attach-menu {
    padding: 6px 0;
    background-color: white;
    border-radius: 10px;
}

/* 去除图片弹窗中的浮现效果 */
.mi-private-attach-item {
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #606266;
    font-size: 12px;
    transition: all 0.2s ease;
}

/* 去除图片弹窗中的浮现效果 */
.mi-private-attach-item:hover {
    /* 移除background: rgba(64, 158, 255, 0.08)和color: #409eff */
}

.mi-private-attach-item i {
    width: 16px;
    text-align: center;
}

/* 无选中用户时的提示 */
.mi-private-no-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #909399;
    text-align: center;
}

.mi-private-no-chat i {
    font-size: 40px;
    margin-bottom: 12px;
    color: rgba(64, 158, 255, 0.2);
}

.mi-private-no-chat h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #606266;
}

.mi-private-no-chat p {
    font-size: 12px;
    color: #909399;
    max-width: 200px;
    line-height: 1.5;
}

.mi-private-empty-list {
    text-align: center;
    padding: 15px 10px;
    color: #909399;
    font-size: 11px;
}
.mi-private-user-lastmsg {
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mi-private-message-bubble img {
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: contain;
    border-radius: 4px;
    margin: 3px 3px;
    cursor: zoom-in;
}

.mi-private-left-img {
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain;
    border-radius: 2px;
    vertical-align: middle;
    margin: 0 2px;
    cursor: default;
}
.mi-private-message-avatar, .mi-private-user-avatar {
    cursor: default !important;
}
.mi-private-error-tip {
    color: #F56C6C;
    font-size: 12px;
    margin: 5px 0;
    padding-left: 5px;
  }
  .mi-input-wrapper {
    position: relative;
    width: 100%;
  }
  /* 字数统计：输入框内部右下角 */
  .mi-private-word-count {
    position: absolute;
    right: 10px;
    bottom: 62px;
    font-size: 12px;
    color: #909399;
    pointer-events: none;
    z-index: 1;
  }
  .mi-private-input-area {
    position: relative;
    width: 100%;
  }
  /* ========== TAB 内容区域：单独滚动 ========== */
  .mi-user-profile-dialog{
    width: 700px;
  }
  .mi-user-profile-upload-tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding: 4px 20px;
    margin: 0;
    border-radius: 0;
}
.el-dialog.mi-user-profile-dialog .el-tabs__content {
    flex: 1;
    overflow: hidden;
    /* 取消整体滚动，由子容器控制 */
}

/* 图库容器整体布局：图片滚动 + 分页固定 */
.mi-privateimg-dialog .mi-library-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0px 20px;
}

/* 图库图片区域：单独滚动 */
.mi-library-images {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* 图库分页固定在底部 */
.mi-user-profile-image-pagination {
    margin-top: 0;
    text-align: left;
    clear: both;
    padding-top: 10px;
    border-top: 1px solid var(--tab-border-color);
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 5;
}


/* 上传区域样式 */
.mi-user-profile-upload-area {
    padding: 20px;
    border: 1px dashed var(--tab-border-color);
    border-radius: 8px;
    text-align: left;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.mi-user-profile-upload-area:hover {
    border-color: var(--tab-primary-color);
}

/* 图片预览样式 */
.mi-user-profile-avatar-preview,
.mi-user-profile-cover-preview {
    margin-top: 15px;
    text-align: center;
}

.mi-user-profile-preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.mi-user-profile-preview-img:hover {
    transform: scale(1.02);
}

.mi-user-profile-upload-tip {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* 图库容器样式 */
.mi-user-profile-image-library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 430px;
}

/* 图库图片项 */
.mi-user-profile-image-item {
    height: 100px;
    float: left;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 选中状态 */
.mi-user-profile-image-item.selected {
    border-color: var(--tab-primary-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.mi-user-profile-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 图库图片遮罩 */
.mi-user-profile-image-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 4px;
}

.mi-user-profile-image-item:hover .mi-user-profile-image-mask {
    display: flex;
}
.mi-user-profile-image-check {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
/* 聊天图片预览容器 */
.mi-chat-image-preview {
    display: flex;
    gap: 8px;
    padding: 0px 0;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* 聊天图片预览项（固定100px长宽） */
.mi-chat-image-item {
    position: relative;
    width: 50px;
    height: 50px;
    border: 1px solid #ebeef5;
    border-radius: 4px;
}


/* 图片删除按钮（右上角） */
.mi-chat-image-delete {
    position: absolute;
    top: -14px;
    right: -22px;
    border-radius: 50%;
    color: #606266;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: none;
    background: none;
}
.mi-chat-image-delete i{
    background-color: #67c23a;
    border-radius: 50%;
    padding: 2px;
    color: #fff;
}
/* 表情包下拉面板 */
.mi-emoji-dropdown {
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
}
.mi-emoji-dropdown-panel{
    width: 216px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 10px;
}
/* 表情包项 */
.mi-emoji-item {
    font-size: 12px;
    cursor: pointer;
    display: inline-block;
    padding: 4px 8px;
    line-height: 0;
}
/* 隐藏本地文件输入框 */
.mi-local-file-input-hidden {
    display: none;
}

/* 图片预览容器（输入框上方） */
.mi-chat-image-preview {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
  
  
  /* 兼容禁用状态下的拖动样式（禁用时不可拉动） */
  .mi-resizable-textarea.is-disabled .el-textarea__inner {
    resize: none; /* 禁用状态下不允许拖动 */
    cursor: not-allowed;
  }
.mi-chat-image-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 权限禁用样式 */
.mi-button-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.mi-private-input-buttons .el-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
