@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: none;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
    }

#main-container {
    width: 100vw;
    height: 100vh;
}

#navbar {
    background: #009688;
}

.dropdown-toggle::after {
    display: none;
}

.chat-list-item {
    background: white;
    cursor: pointer;
}

    .chat-list-item:hover {
        background: hsl(0, 0%, 95%);
    }

    .chat-list-item:active {
        background: hsl(0, 0%, 85%);
    }

    .chat-list-item.active {
        background: hsl(0, 0%, 90%);
    }

    .chat-list-item .chat-details {
        width: 60%;
    }

    .chat-list-item.unread .name,
    .chat-list-item.unread .last-message {
        font-weight: bold;
    }

    .chat-list-item .last-message,
    #message-area #navbar #details {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

#message-area {
    border-left: 1px solid white;
}

    #message-area .overlay {
        background: hsl(0, 0%, 80%);
    }

#input-area {
    background: hsl(0, 0%, 95%);
    
}

    #input-area #input {
        outline: none;
        width:70%;
    }

.message-item {
    position: relative;
    max-width: 75%;
    min-width:35%;
    word-break: break-word;
    color:black !important;
}

    .message-item pre {
        font-size: 14px;
        font-family: inherit;
        text-wrap: wrap;
    }

    .message-item.self {
        background: #dcf8c6 !important;
    }

    .message-item .number {
        color: #1f7aec !important;
    }

    .message-item .options {
        position: absolute;
        top: 0;
        right: -3px;
        opacity: 0;
        transition: all .2s ease-in-out;
        -moz-transition: all .2s ease-in-out;
        -webkit-transition: all .2s ease-in-out;
    }

    .message-item:hover .options {
        opacity: 1;
        right: 0;
    }
    .message-item.from-me {
        align-self: flex-end;
        background-color: #dcf8c6;
        border: 1px solid #c8efa9;
    }
    .message-item.from-others {
        align-self: flex-start;
        /* background: linear-gradient(225deg, #fff 0%, #fff 50%, transparent 50%, transparent);*/
        background-color: #ffffff; /* White for messages from others */
    }

#messages {
    flex: 1 !important;
    background: #efeae2;
    background-image: linear-gradient(rgba(239, 234, 226, 0.6), rgba(239, 234, 226, 0.6)), url(/images/bg.png);
    background-size: auto;
    background-position: center;
    overflow: auto;
}


#profile-settings {
    position: absolute;
    top: 0;
    left: -110%;
    background: hsl(0, 0%, 95%);
    transition: all 0.2s ease-in;
    -moz-transition: all .2s ease-in-out;
    -webkit-transition: all .2s ease-in-out;
}

#profile-pic {
    cursor: pointer;
    position: relative;
    width: 200px;
}

.profile-input {
    border-bottom: 2px solid transparent !important;
    outline: none;
}

    .profile-input:focus {
        border-bottom-color: hsl(0, 0%, 50%) !important;
    }

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 99;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    justify-content: center;
/*    align-items: center;
    min-height: 100vh;*/
    background: #ccc;
    overflow: hidden;
}

.background-green {
    position: absolute;
    top: 0;
    width: 100%;
    height: 20%;
   /* background-color: #009688;*/
}

.main-container {
    position: relative;
    /*width: 1385px;*/
    max-width: 100%;
/*    height: calc(100vh - 5px);*/
    height: 100vh;
    background: #fff;
    display: flex;
/*    box-shadow: 0px 1px 1px 0 rgba(0,0,0,0.5), 0px 2px 5px 0 rgba(0,0,0,0.6);*/
}

    .main-container .left-container {
        position: relative;
        width: 30%;
        height: 100%;
        flex: 20%;
        background: #fff;
        border-right: 1px solid #d1d7db;
    }

    .main-container .right-container {
        position: relative;
        width: 72%;
        height: 100%;
        flex: 70%;
        background: #e5ddd5;
    }

#pre-select {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 100;
    background-color: #f3f9ff;
    padding: 8%
}

.middle-content img{
    margin-top: 10%;
    width: 440px;
}

.encrypted-div {
    font-size: 14px;
    color: #bbbbbb;
}

.header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    background: #ededed;
    padding: 0 15px;
}

#name {
    font-size: 1.2rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.user-img {
    position: relative;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid #b5b5b570;
}

.dp {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.nav-icons {
    display: flex;
    justify-content: flex-end;
}

    .nav-icons ul {
        list-style: none;
        display: flex;
        cursor: pointer;
        color: #51585c;
        margin-left: 22px;
        font-size: 18px;
        margin-bottom: 0;
    }

    .nav-icons button {
        list-style: none;
        display: flex;
        align-items: center;
        cursor: pointer;
        color: #51585c;
        padding-left: 2rem;
        margin-right: 1rem;
        font-size: 18px;
        margin-bottom: 0;
        z-index: 200;
    }

.notif-box {
    position: relative;
    display: flex;
    width: 100%;
    height: 70px;
    background: #76daff;
    align-items: center;
    font-size: 0.8em;
    text-decoration: none;
}

    .notif-box i {
        position: relative;
        left: 13px;
        background: #fff;
        padding: 10px;
        width: 42px;
        height: auto;
        font-size: 20px;
        border-radius: 55%;
        cursor: pointer;
        color: #76daff;
    }

    .notif-box .fa-xmark {
        position: absolute;
        left: 300px;
        text-align: center;
        background: #76daff;
        color: #fff;
    }

.notif-text {
    margin: 25px;
}

    .notif-text a {
        text-decoration: none;
        color: #333;
        font-size: 0.9em;
    }

.search-container {
    position: relative;
    width: 100%;
    height: 50px;
    /*    background: #f6f6f6;*/
    display: flex;
    /*   justify-content: center; */
    align-items: center;
    color: #54656f !important;
}

    .search-container .input input {
        width: 100%;
        outline: none;
        border: none;
        background: #f0f2f5;
        padding: 5px;
        height: 40px;
        border-radius: 6px;
        font-size: 15px;
        padding-left: 60px;
        margin: 10px
    }

    .search-container .input input::placeholder {
        color: #54656f;
    }

    .search-container .input i {
        position: absolute;
        left: 26px;
        top: 17px;
        color: #54656f;
        font-size: 1rem;
    }

.chat-list {
    position: relative;
    height: calc(100% - 110px);
    overflow-y: auto;
}

    .chat-list .chat-box {
        position: relative;
        width: 100%;
        display: flex;
        /*   justify-content: center; */
        align-items: center;
        cursor: pointer;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

        .chat-list .chat-box .img-box {
            position: relative;
            width: 55px;
            height: 45px;
            overflow: hidden;
            border-radius: 50%;
        }

        .chat-list .chat-box .chat-details {
            width: 100%;
            margin-left: 10px;
        }

            .chat-list .chat-box .chat-details .text-head {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 2px;
            }

                .chat-list .chat-box .chat-details .text-head h4 {
                    font-size: 1.1em;
                    font-weight: 600;
                    color: #000;
                }

                .chat-list .chat-box .chat-details .text-head .time {
                    font-size: 0.8em;
                    color: #aaa;
                }

            .chat-list .chat-box .chat-details .text-message {
                display: flex;
                justify-content: space-between;
                align-items: center;
                font-size:.85rem;
                margin-top:.3rem;
            }

                .chat-list .chat-box .chat-details .text-message p {
                    color: #aaa;
                    font-size: 0.9em;
                    overlay: hidden;
                }

img {
    width: 100%;
    object-fit: cover;
}

.chat-list .chat-box .chat-details .text-message b {
    background: #06e744;
    color: #fff;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    /*   text-align: center; */
    font-size: 0.8em;
    font-weight: 400;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-list .active {
    background: #ebebeb;
}

.chat-list .chat-box:hover {
    background: #f5f5f5;
}

.chat-list .chat-box .chat-details .text-head .unread {
    color: #06e744;
}


/* right-container */


.right-container .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
   

.chat-container {
    position: relative;
    width: 100%;
    height: calc(100% - 120px); /*60+60*/
    padding: 50px;
    overflow-y: auto;
}

.message-box {
    position: relative;
    display: flex;
    width: 100%;
    margin: 5px 0;
}

    .message-box p {
        position: relative;
        right: 0;
        text-align: right;
        max-width: 65%;
        padding: 12px;
        background: #dcf8c6;
        border-radius: 10px;
        font-size: 0.9em;
    }

    .message-box.my-message p::before {
        content: '';
        position: absolute;
        top: 0;
        right: -12px;
        width: 20px;
        height: 20px;
        background: linear-gradient(135deg, #dcf8c6 0%, #dcf8c6 50%, transparent 50%, transparent);
    }

    .message-box p span {
        display: block;
        margin-top: 5px;
        font-size: 0.8em;
        opacity: 0.5;
    }

.my-message {
    justify-content: flex-end;
}

.friend-message p {
    background: #fff;
}

.friend-message {
    justify-content: flex-start;
}

.chat-container .my-message i {
    color: yellow;
}

.message-box.friend-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -12px;
    width: 20px;
    height: 20px;
    background: linear-gradient(225deg, #fff 0%, #fff 50%, transparent 50%, transparent);
}

/*.chatbox-input {
    position: absolute;
    bottom: 0;
    width: 100%;
    min-height: 40px;*/ /* Minimum height */
    /*max-height: 200px;*/ /* Max height to prevent excessive growth */
    /*background: #f0f0f0;
    display: flex;
    align-items: flex-end;*/ /* Align input to the bottom */
    /*padding: 10px;
    overflow: hidden;
}

    .chatbox-input textarea {
        flex-grow: 1;
        width: 100%;
        min-height: 20px;*/ /* Single-line height */
        /*max-height: 160px;*/ /* Max height for 10 lines */
        /*line-height: 20px;
        border: none;
        outline: none;
        background: white;
        font-size: 1em;
        padding: 10px;
        overflow-y: hidden;*/ /* Hide scrollbar initially */
        /*resize: none;
        border-radius: 8px;
    }*/

.chatbox-input {
    position: absolute;
    bottom: 0;
    width: 100%;
    min-height: 40px;
    max-height: 240px;
    background: #f0f0f0;
    display: flex;
    align-items: flex-end;
    padding: 10px;
/*    border-radius: 8px;*/
/*    overflow: hidden;*/
}

    .chatbox-input textarea {
        flex-grow: 1;
        width: 100%;
        height: 45px;
        min-height: 20px; /* Single-line height */
        max-height: 200px; /* Max height for 10 lines */
        line-height: 25px;
        border: none;
        outline: none;
        background: white;
        font-size: 1em;
        padding: 10px;
        overflow-y: hidden;
        resize: none;
        word-wrap: break-word; /* Ensures long words wrap */
        white-space: pre-wrap; /* Keeps line breaks */
        border-radius: 8px;
    }


    .chatbox-input i {
        cursor: pointer;
        font-size: 1.6em;
        color: #515855;
    }

    .chatbox-input i:nth-child(1) {
        margin-bottom: 10px;
        margin-right: 15px;
        margin-left: 10px;
    }

   

.message-box.my-message {
    position: relative;
}

    .message-box.my-message i.fa-check-double {
        position: absolute;
        right: 10px; /* Adjust as needed */
        bottom: 10px; /* Adjust as needed */
        color: #007bff; /* Blue color for the tick */
        font-size: 14px; /* Adjust size as needed */
    }

    .message-box.my-message p span.time {
        position: relative;
        display: inline-block;
        margin-right: 20px; /* Ensure space for the blue tick */
    }

.dropdown-menu {
    padding: 0.5rem;
    box-shadow: 0 2px 5px 0 rgb(11, 20, 26, .16), 0 2px 10px 0 rgb(11, 20, 26, .16);
    border-radius: 14px;
    border: none;
}

    .dropdown-menu.show {
        transform: translate(6px, -52px) !important;
    }

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #435d7f;
    border-radius: 7px;
}

    .dropdown-item:hover {
        background-color: #e8ffe9;
        color: #435d7f;
    }

    .dropdown-item svg {
       margin-right: 0.7rem;
    }

#filePreviewContainer {
    display: none;
    background: #d6dde1d6;
    z-index: 1000;
    color: black;
    width: 100%;
    height: calc(100% - 60px);
    backdrop-filter: blur(4px);
    justify-content: space-between;
}

#discard-attachment {
    padding: 4px;
    display: flex;
    justify-content: end;
    color: #54656f;
    font-size: 1.5rem;
    margin-right: 1rem
}

#fileCaption {
    flex-grow: 1;
    width: 75%;
    height: 45px;
    min-height: 20px;
    max-height: 200px;
    border: none;
    outline: none;
    background: white;
    font-size: 1em;
    padding: 10px;
    overflow-y: hidden;
    resize: none;
    word-wrap: break-word; 
    white-space: pre-wrap;
    border-radius: 8px;
}

#fileCaption:focus {
   box-shadow: none;
}

.user-name {
    width: calc(100% - 70px);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.Btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition-duration: .3s;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.199);
    background-color: rgb(255, 65, 65);
    border: 2px solid #fff3f382;
}

.sign {
    width: 100%;
    transition-duration: .3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .sign svg {
        width: 17px;
    }

        .sign svg path {
            fill: white;
        }

.text {
    position: absolute;
    right: 0%;
    width: 0%;
    opacity: 0;
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    transition-duration: .3s;
}

.Btn:hover {
    width: 102px;
    border-radius: 40px;
    transition-duration: .3s;
}

    .Btn:hover .sign {
        width: 34%;
        transition-duration: .3s;
        padding-left: 8px;
    }

    .Btn:hover .text {
        opacity: 1;
        width: 70%;
        transition-duration: .3s;
        padding-right: 10px;
        font-size: 14px;
    }

.Btn:active {
    transform: translate(2px,2px);
}



.notification {
    max-height: 20rem;
    position: absolute;
    z-index: 200;
    right: 0.5rem;
    top: 3.5rem;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    overflow-y: auto;
    scrollbar-width: none;
    box-shadow: 0px 22px 68px -51px rgba(0, 0, 0, 0.4);
    animation: fadeInRight 0.3s linear;
}

    .notification::-webkit-scrollbar {
        display: none;
    }

.notification-bar {
    width: 22rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-radius: 0.8rem;
    background: #606c88;
    background: -webkit-linear-gradient(to right top, #2f3a53, #4163c3);
    background: linear-gradient(to right top, #2f3a53, #4163c3);
    padding: 1rem;
    color: rgb(107, 114, 128);
    box-shadow: 0px 87px 78px -39px rgba(0,0,0,0.4);
/*    animation: fadeInRight 0.3s linear;*/
}

    .notification-bar .icon {
        height: 2rem;
        width: 2rem;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.5rem;
        padding: 4px;
        border: 2px solid #abb8b8;
        position: relative;
    }

        .notification-bar .icon svg {
            height: 1.25rem;
            width: 1.25rem;
        }

    .notification-bar .unread {
        position: absolute;
        top: -10px;
        right: -10px;
        background-color: #0fbf0f;
        width: 20px;
        height: 20px;
        color: white;
        font-size: 13px;
        text-align: center;
        border-radius: 50%;
        padding: 2px;
        font-weight: 600;
    }

    .notification-bar .content {
        margin-left: 0.75rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        font-weight: 400;
    }

    .notification-bar .username {
        margin-bottom: 0.25rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        font-weight: 600;
        color: #b0ff97;
    }

    .notification-bar .number {
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        font-weight: 400;
        color: rgb(202, 200, 200);
    }

    .notification-bar .mgs-content {
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
        line-height: 1.25rem;
        font-weight: 400;
        color: #fff;
        max-height: 2.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .notification-bar .actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-gap: 0.5rem;
        gap: 0.5rem;
    }

    .notification-bar .reply {
        width: 100%;
        display: inline-flex;
        justify-content: center;
        border-radius: 0.5rem;
        padding: 0.375rem 1.5rem;
        text-align: center;
        font-size: 0.75rem;
        line-height: 1rem;
        color: rgb(255, 255, 255);
        outline: 2px solid transparent;
        border: 1px solid rgba(253, 253, 253, 0.363);
    }

    .notification-bar .reply {
        background-color: #2d9500;
        font-weight: 600;
    }

        .notification-bar .reply:hover {
            background-color: #153586;
        }

   

    .notification-bar .close {
        margin: -0.375rem -0.375rem -0.375rem auto;
        height: 2rem;
        width: 2rem;
        display: inline-flex;
        border-radius: 0.5rem;
        background-color: #606c88;
        padding: 0.375rem;
        color: rgba(255, 255, 255, 1);
        border: none;
    }

        .notification-bar .close svg {
            height: 1.25rem;
            width: 1.25rem;
        }

        .notification-bar .close:hover {
            background-color: rgb(58, 69, 83);
        }


#all-contact {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 0;
}

.all-contact-header {
    padding: 1.2rem 1.5rem 0.3rem 1.5rem;
    /*    border-bottom: 1px solid #eee;*/
    font-size: 1.5rem;
    font-weight: 600;
    color: #373f43;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1
    }
}


