
body {
    height: 100vh;
}

.chatroom {
    width: 100%;
    height: 100%;
    max-width: 700px;
    max-height: 500px;
    /* box-shadow: 0px 0px 10px #888888; */
    /* border: 1px solid  var(--text-color); */
    border-radius: 20px;
    position: fixed;
  

    top: calc(50% - 250px);
    left: calc(50% - 350px);
    display: none;
    overflow: hidden;
    padding: 2px;
    z-index: 999;
}

.chatroom .grab-point {
    position: absolute;
    /* top: calc(50% - 25px); */
    top: 10px;
    left: calc(50% - 10px);
    width: 20px;
    height: 20px;
    z-index: 1;
    cursor: grab;
    fill: var(--text-color);

}



.chatroom .border-right-top,
.chatroom .border-right-bottom,
.chatroom .border-left-top,
.chatroom .border-left-bottom {
    position: absolute;
    width: 0%;
    height: 0%;
    background: var(--text-color);
    z-index: -1;
}

@keyframes right-border-top {
    0% {
        width: 0%;
        height: 10%;
    }

    50% {
        width: 50%;
        height: 10%;
    }

    100% {
        width: 50%;
        height: 50%;

    }
}

@keyframes right-border-bottom {
    0% {
        width: 10%;
        height: 0%;
    }

    50% {
        width: 10%;
        height: 50%;
    }

    100% {
        width: 50%;
        height: 50%;

    }
}

@keyframes left-border-bottom {
    0% {
        width: 0%;
        height: 10%;
    }

    50% {
        width: 50%;
        height: 10%;
    }

    100% {
        width: 50%;
        height: 50%;

    }
}

@keyframes left-border-top {
    0% {
        width: 10%;
        height: 0%;
    }

    50% {
        width: 10%;
        height: 50%;
    }

    100% {
        width: 50%;
        height: 50%;

    }
}

@keyframes right-border-top-reverse {
    0% {
        width: 50%;
        height: 50%;
    }

    50% {
        width: 50%;
        height: 10%;
    }

    100% {
        width: 0%;
        height: 10%;
    }
}

@keyframes right-border-bottom-reverse {
    0% {
        width: 50%;
        height: 50%;
    }

    50% {
        width: 10%;
        height: 50%;
    }

    100% {
        width: 10%;
        height: 0%;
    }
}

@keyframes left-border-bottom-reverse {
    0% {
        width: 50%;
        height: 50%;
    }

    50% {
        width: 50%;
        height: 10%;
    }

    100% {
        width: 0%;
        height: 10%;
    }
}

@keyframes left-border-top-reverse {
    0% {
        width: 50%;
        height: 50%;
    }

    50% {
        width: 10%;
        height: 50%;
    }

    100% {
        width: 10%;
        height: 0%;
    }
}

.chatroom .border-right-bottom {
    left: 50%;
    top: 0;
    animation: right-border-top 0.15s linear forwards;
}

.chatroom .border-right-top {
    animation: right-border-bottom 0.15s linear forwards;
    animation-delay: 0.15s;
    right: 0;
    top: 50%;
}

.chatroom .border-left-bottom {
    animation: left-border-bottom 0.15s linear forwards;
    animation-delay: 0.3s;
    right: 50%;
    bottom: 0;
}

.chatroom .border-left-top {
    animation: left-border-top 0.15s linear forwards;
    animation-delay: 0.45s;
    left: 0;
    bottom: 50%;
}




.chatroom .border-right-top.reverse {
    animation: right-border-bottom-reverse 0.15s linear forwards;
    animation-delay: 0.30s;
    width: 50%;
    height: 50%;

}

.chatroom .border-right-bottom.reverse {

    animation: right-border-top-reverse 0.15s linear forwards;
    animation-delay: 0.45s;
    width: 50%;
    height: 50%;

}

.chatroom .border-left-bottom.reverse {
    animation: left-border-bottom-reverse 0.15s linear forwards;
    animation-delay: 0.15s;
    width: 50%;
    height: 50%;

}

.chatroom .border-left-top.reverse {
    animation: left-border-top-reverse 0.15s linear forwards;
    animation-delay: 0s;
    width: 50%;
    height: 50%;


}

.chatroom .chatroom-in {
    width: 100%;
    height: 100%;
    background: var(--base-color);
    border-radius: 20px;
    /* box-shadow: 0px 0px 10px #888888; */
    overflow: hidden;
}

.chatroom .chatroom-in .chat-close-btn {
    width: 15px;
    height: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 10px;
    right: 20px;
    background-color: transparent;
    cursor: pointer;
    color: var(--text-color);
    transition: 0.3s;
}

.chatroom .chatroom-in .chat-close-btn:hover {
    transform: scale(1.2);
}

.chatroom .chatroom-in .chat-logo {
    fill: var(--text-color);
    position: absolute;
    top: 10px;
    left: 20px;
    height: 15px;

}

.chatroom .chatroom-in .chat-main {
    width: 100%;
    height: 95%;
    margin-top: 5%;
    border-top: 1px solid var(--text-color);
    display: flex;

}

.chatroom .chatroom-in .chat-main .chat-friends {
    width: 30%;
    height: 100%;
    border-right: 1px solid var(--text-color);
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    align-items: center;


}

.chat-friends>h2 {
    padding: 10px;
    padding-right: 0;
    border-bottom: 1px solid var(--text-color);
    width: 100%;
}

.chat-friends .chat-friend {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--text-color);
    gap: 10px;
    padding-left: 20px;
    cursor: pointer;
}

.chat-friends .chat-friend:hover {
    /* background-color: var(--time-zone-color); */
    box-shadow: 0px 0px 10px #888888;
}

.chat-friends .chat-friend .friend-image {
    width: 50px;
    height: 50px;
    border: 1px solid var(--text-color);
    border-radius: 5%;
}

.chat-friends .chat-friend .friend-image img {
    width: 100%;
}

.chat-friends .chat-friend .friend-info {
    height: 50px;
}

.chat-friends .chat-friend .friend-info p {
    font-size: 0.7rem;
}

.chatroom .chatroom-in .chat-main .chat-messages {
    width: 70%;
    height: 100%;
    position: relative;

}
.chat-messages .friend-message-container{
    height: 100%;
    max-height: 100%;
    width: 100%;
    overflow-y: scroll;
    gap: 10px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding-top: 10px;
    padding-bottom: 50px;
    position: absolute;
    top: 0;
}
.chat-messages form{
    position: absolute;
    bottom:20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    min-height: 40px;
    border: 1px solid var(--text-color);
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.chat-messages form input{
    height: 100%;
    width: 90%;
    padding: 2%;
    box-sizing: border-box;
    border: none;
    background:none;    border-radius: 20px;
}
.chat-messages form button{
    height: 100%;
    width: 10%;
    border: none;
    background: none;
    cursor: pointer;
}
.chat-messages form button svg{
    width: 70%;
    height: 70%;
}
.chat-messages .friend-message {
    width: 80%;
    display: flex;
    margin-left: 20px;
    gap: 10px;

    margin-top: 20px;
}
.chat-messages .friend-message .friend-message-text{
    width: 90%;
} 
.chat-messages .friend-message h5{
    margin-bottom: 5px;
}
.chat-messages .friend-message p{
    border: 1px solid var(--text-color);
    display: inline-block;
    padding: 5px;
    font-size: 1.3rem;
    border-radius: 0 5px 5px 5px;
}
.chat-messages .friend-message .friend-message-porfolio {
    width: 40px;
    height: 40px;
    border-radius: 5%;
    border: 1px solid var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
}
.friend-message-porfolio img{
    width: 100%;
    height: 100%;
    object-fit: cover;

}
.chat-messages .user-message{
    width: 80%; 
    margin-right: 20px;
   align-self: flex-end;
   display: flex;
   justify-content: flex-end;
   
}
.user-message p{
    border: 1px solid var(--text-color);
    display: inline-block;
    padding: 5px;
    font-size: 1.3rem;
    border-radius: 5px 0 5px 5px; 
    text-align: right;

}
@keyframes start{
    0%{
       opacity: 0;
    }
    100%{
        opacity: 1;
    }
}
@keyframes end{
    0%{
       opacity: 1;
    }
    100%{
        opacity: 0;
    }
}
.chatroom-in *{
    animation: start 1s linear forwards;

    opacity: 0;
}