/* ==========================================================
   LOVEORE MESSENGER
========================================================== */

.chat-wrapper{
    display:grid;
    grid-template-columns:320px 1fr 320px;
    height:calc(100vh - 120px);
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 3px 15px rgba(0,0,0,.08);
}

.chat-sidebar{
    background:#fafafa;
    border-right:1px solid #e5e5e5;
    display:flex;
    flex-direction:column;
    overflow-y:auto;
    overflow-x:hidden;
    min-width:0;
}

.chat-search{

    padding:15px;

    border-bottom:1px solid #ececec;

}

.chat-search input{

    width:100%;

    padding:12px 15px;

    border:1px solid #ddd;

    border-radius:25px;

    outline:none;

    font-size:14px;

}

.chat-search input:focus{

    border-color:#ff4d73;

}

.chat-empty{

    padding:40px;

    color:#999;

    text-align:center;

}

/* ==========================================================
   USER
========================================================== */

.chat-user{

    display:flex;

    align-items:center;

    gap:15px;

    padding:15px;

    text-decoration:none;

    color:#333;

    border-bottom:1px solid #f0f0f0;

    transition:.2s;

    width:100%;

    box-sizing:border-box;

    overflow:hidden;

}

.chat-user:hover{

    background:#fff4f7;

}

.chat-user.active{

    background:#ffe5ec;

}

.avatar{

    position:relative;

    width:55px;

    height:55px;

    min-width:55px;

    border-radius:50%;

    overflow:hidden;

    background:#ddd;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:22px;

}

.avatar img{

    width:100%;

    height:100%;

    object-fit:cover;

}

.online{

    position:absolute;

    right:2px;

    bottom:2px;

    width:12px;

    height:12px;

    border-radius:50%;

    border:2px solid #fff;

}

.green{

    background:#2ecc71;

}

.gray{

    background:#bdc3c7;

}

.chat-info{

    flex:1;

    min-width:0;

    overflow:hidden;

}

.chat-top{

    display:flex;

    justify-content:space-between;

    align-items:center;

}

.chat-name{

    font-weight:700;

    font-size:15px;

}

.chat-time{

    color:#999;

    font-size:12px;

}

.chat-preview{

    margin-top:5px;

    color:#777;

    font-size:13px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

/* ==========================================================
   CHATBEREICH
========================================================== */

.chat-main{

    display:flex;

    flex-direction:column;

    background:#ffffff;

}

.chat-placeholder{

    flex:1;

    display:flex;

    align-items:center;

    justify-content:center;

    text-align:center;

    color:#888;

    font-size:18px;

}

.chat-header{

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:18px 25px;

    border-bottom:1px solid #ececec;

    background:#fff;

}

.chat-header-left{

    display:flex;

    align-items:center;

    gap:15px;

}

.avatar.big{

    width:60px;

    height:60px;

}

.chat-title{

    font-size:20px;

    font-weight:bold;

}

.chat-status{

    color:#666;

    font-size:13px;

    margin-top:4px;

}

/* ==========================================================
   NACHRICHTEN
========================================================== */

.chat-messages{

    flex:1;

    overflow-y:auto;

    padding:25px;

    background:#f7f7f7;

}

.msg{

    display:flex;

    margin-bottom:15px;

}

.msg.left{

    justify-content:flex-start;

}

.msg.right{

    justify-content:flex-end;

}

.msg-box{

    max-width:70%;

    padding:12px 16px;

    border-radius:18px;

    word-break:break-word;

    box-shadow:0 2px 6px rgba(0,0,0,.08);

}

.msg.left .msg-box{

    background:#ffffff;

}

.msg.right .msg-box{

    background:#ff4d73;

    color:#fff;

}

.msg-time{

    margin-top:8px;

    font-size:11px;

    opacity:.75;

    text-align:right;

}

/* ==========================================================
   EINGABE
========================================================== */

.chat-footer{

    border-top:1px solid #ececec;

    padding:15px;

    background:#fff;

}

#sendForm{

    display:flex;

    gap:12px;

    align-items:flex-end;

}

.chat-text{

    flex:1;

    min-height:70px;

    max-height:180px;

    resize:vertical;

    padding:12px;

    border:1px solid #ddd;

    border-radius:12px;

    outline:none;

    font-size:14px;

}

.chat-text:focus{

    border-color:#ff4d73;

}

.chat-send{

    background:#ff4d73;

    color:#fff;

    border:none;

    padding:14px 22px;

    border-radius:10px;

    cursor:pointer;

    font-size:14px;

    font-weight:bold;

    transition:.2s;

}

.chat-send:hover{

    background:#e53b63;

}

/* ==========================================================
   PROFILSPALTE
========================================================== */

.chat-profile{

    background:#fafafa;

    border-left:1px solid #ececec;

    padding:25px;

    overflow-y:auto;

}

.profile-header{

    text-align:center;

    margin-bottom:30px;

}

.profile-avatar{

    width:120px;

    height:120px;

    margin:0 auto 20px;

    border-radius:50%;

    overflow:hidden;

    background:#ddd;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:50px;

}

.profile-avatar img{

    width:100%;

    height:100%;

    object-fit:cover;

}

.profile-info{

    display:flex;

    flex-direction:column;

    gap:15px;

}

.info-row{

    background:#fff;

    border:1px solid #ececec;

    border-radius:10px;

    padding:12px 15px;

}

.info-row strong{

    display:block;

    color:#666;

    font-size:12px;

    margin-bottom:5px;

}

.info-row span{

    font-size:15px;

    font-weight:600;

}

.profile-buttons{

    margin-top:30px;

    display:flex;

    flex-direction:column;

    gap:10px;

}

.button.full{

    width:100%;

}

.profile-empty{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    height:100%;

    color:#888;

    text-align:center;

}

/* ==========================================================
   SCROLLBARS
========================================================== */

.chat-sidebar::-webkit-scrollbar,
.chat-profile::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar{

    width:8px;

}

.chat-sidebar::-webkit-scrollbar-thumb,
.chat-profile::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb{

    background:#d4d4d4;

    border-radius:10px;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:1400px){

    .chat-wrapper{

        grid-template-columns:280px 1fr 280px;

    }

}

@media(max-width:1100px){

    .chat-wrapper{

        grid-template-columns:260px 1fr;

    }

    .chat-profile{

        display:none;

    }

}

@media(max-width:768px){

    .chat-wrapper{

        display:block;

        height:auto;

    }

    .chat-sidebar{

        height:300px;

        overflow:auto;

    }

    .chat-main{

        height:calc(100vh - 420px);

    }

}