/* 侧边栏核心样式 */
.friend-box {
    position: fixed;
    top: 0;
    right: -275px;
    z-index: 999999;
    width: 275px;
    height: 100%;
    color: #ababab;
    background: #1b1b1b;
    overflow-x: hidden;
    overflow-y: auto;
    transition: all .2s ease;
    scrollbar-width: none;
}

/* 侧边栏显示状态 */
.friend-box-a {
    right: 0;
}

/* 侧边栏关闭按钮 */
.friend-box-close {
    position: absolute;
    left: 0;
    top: 0;
    color: #a2a2a2;
    padding: 1px 10px 5px 10px;
    font-size: 21px;
    border: 2px solid #4c4c4c;
    margin: 10px;
    line-height: 21px;
    border-radius: 5px;
    cursor: pointer;
}

/* 用户信息区域 */
.friend-info-box {
    padding: 32px 12px 12px;
    text-align: center;
}

.friend-info-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-info-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.friend-info-box .username {
    line-height: 1.5;
    font-size: 1.25rem;
    font-weight: 500;
    color: #fff;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* 通用徽章样式 */
.badge-purple {
    color: #fff;
    background: #3c3c3c;
    margin-bottom: 8px;
}

.friend-info-box a {
    font-size: .875rem;
    color: #fff;
    outline: 0;
    margin: 0 8px;
}

/* 好友列表容器 */
.friend-div-box {
    padding: 12px 0;
    display: flex;
}

/* 搜索框 */
.friend-text {
    width: 100%;
    height: 20px;
    line-height: 1.3;
    font-size: 14px;
    color: #fff;
    border: none;
    border-radius: 4px;
    background: #3c3c3c;
    transition: all .2s ease;
    margin: 0 12px;
    padding: 6px 12px;
    display: block;
}

.friend-text:focus {
    color: #000;
    background: #FFF;
    outline: 0;
}

/* 列表标题 */
.friend-title {
    font-size: 14px;
    color: #ababab;
    text-transform: uppercase;
    border-bottom: 1px solid #4c4c4c;
    background: #3c3c3c;
    padding: 8px 12px;
    cursor: pointer;
}

/* 好友列表 */
.friend-ul {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.friend-ul li a {
    font-size: 14px;
    color: #a2a2a2;
    outline: 0;
    transition: all .4s ease;
    overflow: hidden; /* 替代清除浮动 */
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.friend-ul a:hover {
    background: #2f2f2f;
}

.friend-ul li a img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.friend-ul li a .chat-detail {
    overflow: hidden;
    margin-left: 12px;
    flex: 1 1;
}

.friend-ul li a .chat-detail .chat-name {
    font-size: 16px;
    color: #fff;
}

.friend-ul li a .chat-detail .chat-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-ul li a .chat-status {
    display: flex;
    align-items: center;
}

.friend-ul li a .chat-alert {
    margin-right: 6px;
}

/* 在线/离线状态标识 */
.friend-zx,
.friend-lx {
    width: 0;
    height: 0;
    border-radius: 50%;
}

.friend-zx {
    border: 6px solid #09ce32; /* 在线状态 */
}

.friend-lx {
    border: 6px solid #e36159; /* 离线状态 */
}

/* 显示/隐藏控制 */
.friend-hide {
    display: none !important;
}

.friend-show {
    min-width: 12px;
    height: 16px;
    font-size: 12px;
    font-weight: normal;
    border-radius: 16px;
    margin: 0;
    padding: 0 3px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.friend-div-box-hide {
    display: none;
}

/* 遮罩层 */
.friend-v {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 99;
    transition: all .2s;
    visibility: hidden;
    opacity: 0;
}

/* 侧边栏显示时同步显示遮罩 */
.friend-box-a + .friend-v {
    visibility: visible;
    opacity: 1;
}

/* 聊天窗口样式 */
.lt-dlg-box {
    position: fixed;
    z-index: 102;
    background-color: #FFF;
    border-radius: 8px;
    outline: 0;
    box-shadow: 0 10px 20px 5px rgba(0,0,0,0.15);
    overflow: hidden;
}

/* 聊天窗口标题栏 */
.lt-title {
    padding: 12px 16px;
    user-select: none;
}

.lt-title .main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
}

.lt-title .main img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 99rem;
}
.lt-title .lt-info {
    flex: 1 1;
    margin-left: 12px;
}

.lt-title .main .lt-name {
    font-size: 16px;
}

.lt-title .main .lt-ps {
    max-width: 280px;
    font-size: 14px;
    color: #9a9a9a;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* 关闭按钮 */
.lt-close {
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all .2s ease;
}

.lt-close:hover {
    color: red;
}

/* 消息内容区域 */
.lt-content {
    position: absolute;
    top: 64px;
    right: 0;
    bottom: 54px;
    left: 0;
    background: #f7f8f9;
    overflow-y: auto;
    padding: 12px 12px 0;
    scrollbar-width: none;
}

.lt-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lt-content ul li {
    padding: 6px 0 18px;
    width: 100%;
    overflow: hidden; /* 替代清除浮动 */
}

/* 消息头像 */
.lt-content ul li .avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 99rem;
    user-select: none;
}

.lt-content ul li.left .avatar {
    float: left;
}

.lt-content ul li.right .avatar {
    float: right;
}

/* 消息气泡 */
.lt-content ul li .chat-body {
    position: relative;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    max-width: calc(16px * 18 - 24px);
}

.lt-content ul li.left .chat-body {
    margin-left: 12px;
    background-color: #33cdaa90;
    float: left;
}

.lt-content ul li.right .chat-body {
    margin-right: 12px;
    background-color: #fff;
    float: right;
}

/* 消息内容样式 */
.lt-content ul li .chat-body .header {
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.lt-content ul li .chat-body p {
    font-size: 14px;
    word-break: break-all;
}
.lt-content ul li.left .chat-body span {
    position: absolute;
    left: 0;
    bottom: -16px;
    color: #a9a9a9;
    display: inline-block;
    user-select: none;
}
.lt-content ul li.right .chat-body span {
    position: absolute;
    right: 0;
    bottom: -16px;
    color: #a9a9a9;
    display: inline-block;
    user-select: none;
}

/* 输入区域 */
.lt-footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 12px 16px;
    background-color: #f7f8f9;
}

.lt-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.lt-text {
    position: relative;
    z-index: 2;
    float: left;
    line-height: 1.2;
    color: #333;
    background: #fff;
    border: none;
    border-radius: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1 1;
    outline: 0;
    margin: 0;
    padding: 8px 10px;
}

.lt-text:disabled {
    background: #e4e4e4;
}

.lt-input-group-btn {
    position: relative;
    white-space: nowrap;
}

.lt-send-btn {
    position: relative;
    line-height: 1.2;
    font-weight: normal;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    background: #33cdaa;
    box-shadow: none;
    border: none;
    border-radius: 4px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 8px 10px;
    display: inline-block;
    margin-bottom: 0;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
