/**
Conversations Page Styles
***************************************************
http://www.bootstrapmb.com**/

.pvr_chat_wrapper {
    z-index: 999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    visibility: visible;
    opacity: 1;
    -webkit-transform: translateY(0px);
    transform: translateY(0px);
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.7);
    /* height: 100vh; */
    height: calc(var(--vh, 1vh) * 100);
    padding: 3px;
    box-sizing: border-box;
}

.pvr_chat_wrapper .pvr_chat_content {
    background-color: #fff;
    box-shadow: 0 2px 40px 0 rgba(43, 132, 210, 0.55);
    border-radius: 10px;
    width: 100%;
    height: 100%;
    max-height: 100%;
    position: relative;
    /* padding: 20px;*/
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
    
}

.conversation-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.conversation-header h1 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 auto;
}
/* 刷新按钮放在左侧 */
.conversation-header #refresh-btn {
    position: absolute;
    left: 10px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
}
.conversation-list {
    flex: 1;
    overflow-y: auto;
    /* padding: 1rem; */
    background: white;
    overflow-x: hidden;
}

.conversation-item {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 48px 1fr 60px;
    gap: 1rem;
    align-items: flex-end;
}

.conversation-item:last-child {
    border-bottom: none;
}

.conversation-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.conversation-item.active {
    background-color: #e8f0fe;
}

.conversation-item .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
}

.conversation-item .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.conversation-item .user-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.conversation-item .user-name {
    font-weight: 600;
    color: #2A4E7F;
    font-size: 14px;
    margin-bottom: 0.25rem;
}

.conversation-item .last-message {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #e2efff;
    padding: 8px 12px;
    border-radius: 5px 5px 5px 5px;
    max-width: 100%;
    display: inline-block;
    text-align: left;
}

.conversation-item .right-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.conversation-item .unread-count {
    background: #8f94fb;
    color: white;
    border-radius: 10px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.conversation-item .timestamp {
    color: #999;
    font-size: 0.8rem;
}

#chatFrameWrapper {
    position: fixed;
    z-index: 1000;
    display:none;
    width: 100%;
    height: 100%;
}

/* Chat Frame Styles */
#chatFrame {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);  
}

/* Desktop */
@media screen and (min-width: 768px) {
    #chatFrameWrapper {
        position: fixed;
        width: 50%;
        height: 100vh;
        right: 0;
        bottom: 0;
    }
    .pvr_chat_wrapper {    
        position: fixed;
        width:50%;
        height: 100vh;
   }
}

.last-message.unread {
    font-weight: bold;
}