
/*######################
chatbox
########################*/

@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
* {
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.username_avatar {
    height: 5rem;
    width: 5rem;
    border-radius: 50%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    margin-left: 3px;
    margin-bottom: 3px
}

#floating-chatbox {
    position: relative;
    bottom: 0px;
    /* right: 65px; */
    width: 100%;
    max-width: 390px;
    min-width: 390px;
    /* height: 550px; */
    /* background-color: white; */
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

#toggle-chat-open {
    position: fixed;
    bottom: -10px;
    /* right: 20px; */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* background-color: #6C5472; */
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001; /* Ensure it floats above other content */
    transition: all 0.3s ease-in-out;
}

#chatbox {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#chatbox.show {
    max-height: 90vh; /* Adjust based on your desired max height */
    opacity: 1;
}

/* Styling the main container */

.chat-box-container{
    border: none;
    background: none;
}

.container {
    width: 80%;
    margin: auto;
    margin-top: 2rem;
    letter-spacing: 0.5px;
    height: 80%;
}


/* Styling the msg-header container */
.chat-header {
    /* border: 1px solid #ccc; */
    width: 100%;
    height: 10%;
    /* border-bottom: none; */
    border:none;
    display: inline-block;
    background-color: #6C5472;
    margin: 0;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
}
/* Styling the profile picture */
.msgimg {
    margin-left: 2%;
    float: left;
    padding: 5px;
}

.container1 {
    width: 270px;
    height: auto; 
    float: left;
    margin: 0;
}

/* styling user-name */
.active {
    width: 150px;
    float: left;
    color: rgb(255, 255, 255)!important;
    font-weight: bold;
    font-size: 20px;
    margin: 0 0 0 5px;
    height: 10%;
    padding-top: 15px;
 
}
/* Styling the inbox */
.chat-page {
    padding: 0 0 0 0 !important;
}

.msg-inbox {
    /* border: 1px solid #ccc; */
    
    overflow: hidden;
    /* border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px; */
    /* overflow-y: auto; */
    /* height: calc(100% - 120px); */
}


.chats {
    padding: 0px 0px 0 25px;
    height: 500px;
    background-color: #fff
}

.msg-page {
    max-height: 500px;
    overflow-y: auto;
}

/* Styling the msg-bottom container */
 .msg-bottom {
        /* border-top: 1px solid #ccc; */
        position: relative;
        height: 11%;
        background-color: var(--bg-color-lighter);
        padding-bottom: 66px;
        /* border-bottom-left-radius: 20px; */
        /* border-bottom-right-radius: 20px; */
    }
/* Styling the input field */
    .input-group {
        float: right;
        margin-top: 13px;
        margin-right: 20px;
        outline: none !important;
        border-radius: 20px;
        width: 90% !important;
        background-color: #fff;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }
    
    .input-group>.form-control {
        position: relative;
        flex: 1 1 auto;
        width: 1%;
        margin-bottom: 0;
    }
    
    .form-control {
        border: none !important;
        border-radius: 20px !important;
        display: block;
        height: calc(2.25rem + 2px);
        padding: 0.375rem 0.75rem;
        font-size: 1rem;
        line-height: 1.5;
        color: #495057;
        background-color: #fff;
        background-clip: padding-box;
        transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    }
    
    .input-group-text {
        background: transparent !important;
        border: none !important;
        display: flex;
        align-items: center;
        padding: 0.375rem 0.75rem;
        margin-bottom: 0;
        font-size: 1.5rem;
        font-weight: b;
        line-height: 1.5;
        color: #495057;
        text-align: center;
        white-space: nowrap;
        background-color: #e9ecef;
        border: 1px solid #ced4da;
        border-radius: 0.25rem;
        font-weight: bold !important;
        cursor: pointer;
    }
    
    input:focus {
        outline: none;
        border: none !important;
        box-shadow: none !important;
    }
    
    .send-icon {
        font-weight: bold !important;
        margin-right: 10px;
    }

/* Styling the avatar  */
received-chats-img {
    display: inline-block;
    width: 50px;
    float: left;
}

.received-msg {
    display: inline-block;
    padding: 0 0 0 10px;
    vertical-align: top;
    width: 92%;
}
.received-msg-inbox {
    width: 57%;
}

.received-msg-inbox p {
    background: #efefef none repeat scroll 0 0;
    border-radius: 10px;
    color: #646464;
    font-size: 14px;
    margin-left: 1rem;
    padding: 1rem;
    width: 100%;
    /* box-shadow: rgb(0 0 0 / 25%) 0px 5px 5px 2px; */
}
    p {
    overflow-wrap: break-word;
}

/* Styling the msg-sent time  */
.time {
    color: #777;
    display: block;
    font-size: 12px;
    margin: 8px 0 0;
}
.outgoing-chats {
    overflow: hidden;
    margin: 26px 20px;
}

.outgoing-chats-msg p {
    background-color: #6C5472;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    color: #fff;
    padding: 5px 10px 5px 12px;
    width: 100%;
    padding: 1rem;
    /* box-shadow: rgb(0 0 0 / 25%) 0px 2px 5px 2px; */
}
.outgoing-chats-msg {
        float: right;
        width: 46%;
    }

/* Styling the avatar */
.outgoing-chats-img {
    display: inline-block;
    width: 50px;
    float: right;
    margin-right: 1rem;
}
@media only screen and (max-device-width: 850px) {
    *,
    .time {
        font-size: 28px;
    }
    img {
        width: 65px;
    }
    .msg-header {
        height: 5%;
    }
    .msg-page {
        max-height: none;
    }
    .received-msg-inbox p {
        font-size: 28px;
    }
    .outgoing-chats-msg p {
        font-size: 28px;
    }
}

@media only screen and (max-device-width: 450px) {
    *,
    .time {
        font-size: 28px;
    }
    img {
        width: 65px;
    }
    .msg-header {
        height: 5%;
    }
    .msg-page {
        max-height: none;
    }
    .received-msg-inbox p {
        font-size: 28px;
    }
    .outgoing-chats-msg p {
        font-size: 28px;
    }
}
