@mixin lwTransition($time: 0.3s, $property: all) {
    -webkit-transition: $property $time ease-in-out;
    -moz-transition: $property $time ease-in-out;
    -ms-transition: $property $time ease-in-out;
    -o-transition: $property $time ease-in-out;
    transition: $property $time ease-in-out;
}

#messengerDialog {
    .modal-body {
        padding: 0;
        background-color: rgba(0, 0, 0, 0.66);
        overflow: hidden;
    }
}

.lw-messenger {
    background-color: #f5f5f5;
    color: #2d2d2d;
    overflow: hidden;
    height: 80vh;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.04);
    /*     font-family: "proxima-nova", "Source Sans Pro", sans-serif;
    font-size: 1em;
    letter-spacing: 0.1px;
    text-rendering: optimizeLegibility;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
    -webkit-font-smoothing: antialiased; */

    .lw-messenger-user-menu {
        position: relative;
        right: auto;
        top: auto;
        // display: inline-block;
        float: right;
        margin-left: 4px;

        [dir="rtl"] & {
            right: auto;
            left: 0;

            .dropdown-menu.dropdown-menu-right.show {
                transform: translate3d(35px, 38px, 0px) !important;
                padding: 0;
            }
        }
    }
    .btn.rounded-circle {
        height: 30px;
        width: 30px;
        display: inline-block;
        i{
            margin-top: 7px;
        }
    }
    .btn.rounded-circle.lw-button-width{
        width: 35px !important;
        height: 35px !important;
        .lw-fa-ellipsis-v{
            margin-top: 2px !important;
        }
        i{
            margin-top: 8px !important;
        }
    }

    @media (max-width: 767px) {
        .lw-messenger-user-menu {
            /*  position: relative;
            right: auto;
            top: auto;
            // display: inline-block;
            float: right;
            margin-left: 4px; */
        }
        // height: 100vh;
        .lw-messenger-sidebar {
            position: absolute;
            z-index: 1;
            left: -100%;
            height: 90%;
            margin-left: -3rem;
            width: 70%;
        }
        &.lw-messenger-sidebar-opened {
            .lw-messenger-sidebar {
                left: 27px;
            }

            .lw-messenger-chat-window {
                opacity: 0.6;
                filter: blur(0.6px) grayscale(0.4);
                -webkit-filter: blur(0.6px) grayscale(0.4);
                overflow: hidden;
                overflow-y: hidden;
                pointer-events: none;
            }
        }
    }

    .lw-messenger-header {
        padding: 12px;
        position: absolute;
        width: 100%;
        z-index: 1;
        color: white;
        background-color: #353535;
        height: 90px;
        margin-left: -4px;
        @media (max-width: 768px) {
            height: 122px;
            align-items: center;
        }
        &-meta {
            margin-top: 10px;
            margin-left: 10px;
            display: inline-block;
            max-width: 80%;
            text-align: left;
        }

        [dir="rtl"] & {
            padding: 10px 20px;
            // line-height: 50px;
        }
    }

    img.lw-profile-picture {
        height: 60px;
        width: 60px;
        object-fit: cover;
        border-radius: 50%;
        float: left;
        // margin-right: 4px;
        margin-right: 0;

        .lw-messenger-chat-recipient {
            .img.lw-profile-picture {
                margin-right: 0;
            }
        }

        padding: 1px;
        &.lw-online {
            border: 2px solid #2ecc71;
        }
        &.lw-away {
            border: 2px solid #f1c40f;
        }
        &.lw-offline {
            border: 2px solid #95a5a6;
        }
        &.lw-busy {
            border: 2px solid #e74c3c;
        }
    }

    .lw-profile-name {
        font-size: 0.95em;
        // color: white;
        margin-top: 18px;
        padding-left: 10px;
        overflow: hidden;
        max-height: 50px;
    }

    .lw-messenger-sidebar {
        box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.4);
        background-color: #363636;

        @include lwTransition();

        .lw-messenger-contact-search {
            .form-control {
                border-radius: 0;
                background-color: #cacaca;
            }
        }

        .lw-messenger-contact-list {
            margin-top: 90px;
            // padding-top: 120px;

            .list-group {
                padding-bottom: 100px;
            }

            img.lw-profile-picture {
                height: 40px;
                width: 40px;
                border: 1px;
            }

            .list-group {
                height: calc(100vh - 205px);
                overflow-y: auto;
            }

            .list-group-item.list-group-item-action {
                // background-color: transparent;
                display: flex;
                align-items: center;
                gap: 10px;
                &:not(.active):hover {
                    background-color: #353535;
                }
            }

            span.lw-contact-status {
                position: absolute;
                left: 16px;
                width: 10px;
                height: 10px;
                border-radius: 50%;
                border: 1px solid #2c3e50;
                background: #95a5a6;
                top: 16px;

                &.lw-online {
                    background-color: #2ecc71;
                }
                &.lw-away {
                    background-color: #f1c40f;
                }
                &.lw-offline {
                    background-color: #95a5a6;
                }
                &.lw-busy {
                    background-color: #e74c3c;
                }
            }
        }
    }

    .lw-messenger-image-loading {
        height: 200px;
        display: block;
        text-align: center;
        width: 100%;
        background: url(./../../imgs/heart-loading.svg) no-repeat center;
        padding-top: 155px;
    }

    @keyframes bounce {
        0% {
            transform: translateY(0);
        }
        30% {
            transform: translateY(-70px);
        }
        50% {
            transform: translateY(5px);
        }
        70% {
            transform: translateY(-25px);
        }
        80% {
            transform: translateY(2px);
        }
        90% {
            transform: translateY(-15px);
        }
        100% {
            transform: translateY(0);
        }
    }

    .lw-messenger-content {
        padding: 0;
        height: 80vh;
        .lw-messenger-chat-window {
            display: block;
            // align-content: flex-end;
            height: 80vh;
            @-moz-document url-prefix() {
                height: 68vh;
            }
            overflow-y: auto;
            padding: 100px 10px 100px 40px;

            [dir="rtl"] & {
                padding: 100px 40px 100px 0;
            }

            .lw-messenger-chat-message {
                padding: 0;
                margin: 0;
            }

            .lw-messenger-chat-item {
                &.lw-messenger-new-message {
                    -webkit-animation: bounce 1s;
                    animation: bounce 1s;
                }
                background-color: #c5c5c5;
                border-radius: 4px;
                padding: 10px 12px 4px 11px;
                margin-top: 18px;
                // margin-right: 20px;
                border-radius: 0.4em;
                position: relative;
                font-weight: 200;
                font-size: 0.95em;
                min-height: 50px;
                width: calc(86% - 42px);
                word-break: break-word;

                [dir="rtl"] & {
                    width: calc(78% - 42px);
                }

                .lw-single-message-delete {
                    top: 1px;
                    position: absolute;
                    right: 2px;

                    [dir="rtl"] & {
                        right: auto;
                        left: 2px;
                    }
                }

                [dir="rtl"] & {
                    .lw-single-message-delete {
                        float: left !important;
                    }
                }

                img {
                    max-height: 150px;
                    width: 100%;
                    object-fit: contain;
                    // cursor: pointer;
                    display: inline-block;
                }

                img.emojioneemoji,
                .emojioneemoji,
                .emojionearea .emojionearea-editor [class*="emojione-"] {
                    font-size: inherit;
                    height: 2ex;
                    width: 2.1ex;
                    min-height: 20px;
                    min-width: 20px;
                    display: inline-block;
                    margin: -0.2ex 0.15em 0.2ex;
                    line-height: normal;
                    vertical-align: middle;
                    max-width: 100%;
                    top: 0;
                    float: none;
                    width: auto;
                    cursor: default;
                }

                .lw-messenger-chat-meta {
                    font-size: 0.8em;
                    width: 100%;
                    display: block;
                    margin-top: 6px;
                    border-top: 1px solid #cecece;
                    padding: 8px 0;
                    color: #ffffff;
                    font-style: italic;
                }
            }
            .lw-messenger-chat-recipient .lw-messenger-chat-item {
                margin-left: 26px;

                [dir="rtl"] & {
                    margin-right: 26px;
                }

                &:after {
                    content: "";
                    position: absolute;
                    left: 0;
                    top: 50%;
                    width: 0;
                    height: 0;
                    border: 30px solid transparent;
                    border-right-color: #c5c5c5;
                    border-left: 0;
                    border-bottom: 0;
                    margin-top: -15px;
                    margin-left: -30px;

                    [dir="rtl"] & {
                        right: 0;
                        border: 20px solid transparent;
                        border-left-color: #c5c5c5;
                        border-right: 0;
                        border-bottom: 0;
                        margin-top: -10px;
                        margin-right: -20px;
                        margin-left: 28px;
                    }
                }
            }

            .lw-messenger-chat-sender {
                .lw-messenger-chat-item {
                    background-color: #f35a96;
                    color: white;
                    margin-left: 0;
                    margin-right: 24px;

                    [dir="rtl"] & {
                        margin-left: 34px;
                    }

                    .lw-messenger-chat-meta {
                        border-top: 1px solid #fd8ab7;
                        color: #ffffff;
                    }

                    &:after {
                        content: "";
                        position: absolute;
                        right: 0;
                        top: 50%;
                        width: 0;
                        height: 0;
                        border: 20px solid transparent;
                        border-left-color: #f35a96;
                        border-right: 0;
                        border-bottom: 0;
                        margin-top: -10px;
                        margin-right: -20px;
                        margin-left: 28px;

                        [dir="rtl"] & {
                            left: 0;
                            right: auto;
                            border: 30px solid transparent;
                            border-right-color: #f35a96;
                            border-left: 0;
                            border-bottom: 0;
                            margin-top: -15px;
                            margin-left: -30px;
                        }
                    }
                }
                img {
                    // float: right;
                }
            }

            img.lw-profile-picture {
                margin-top: 22px;
                height: 40px;
                width: 40px;
                border: 1px;
                align-self: center;
                border: 2px solid #ddd;
            }
        }
    }

    .lw-messenger-footer {
        background-color: #171717;
        padding: 16px 0;
        padding-right: 10px;
        position: absolute;
        bottom: 0;
        width: 100%;
        z-index: 3;
        @media (max-width: 768px) {
            padding: 10px; 
        }   
    }

    .lw-messenger-bottom-sheet {
        height: 79vh;
        display: block;
        width: 98%;
        position: absolute;
        // padding: 20px;
        z-index: 2;
        bottom: -79vh;
        left: 0;
        @include lwTransition(0.3s);
        .lw-heading {
            // display: flex;
            width: 100%;
            z-index: 2;
            position: absolute;
            padding: 20px 0px 5px 20px;
            border-bottom: 1px solid;
            background-color: #dadada;
            .lw-gif-search-input {
                width: 50%;
                margin-right: 20px;
                bottom: 5px;
                float: right;
                [dir="rtl"] & {
                    float: left;
                }
                &.input-group .form-control {
                    color: #ffffff!important;
                }
            }

            h5 {
                float: left;
                [dir="rtl"] & {
                    float: right;
                    padding-right: 10px;
                }
            }
        }
        .lw-content {
            z-index: 1;
            position: absolute;
            overflow-y: auto;
            background-color: white;
            height: 100%;
            width: 100%;
            padding: 60px 8px 8px 8px;

            #lwStickerImagesContainer,
            #lwGifImagesContainer {
                background-color: transparent;
                /* margin-top: 0; */
                // padding-top: 14px;
                padding-bottom: 70px;
                margin: 12px 18px;
                position: absolute;

                .lw-gif-image {
                    margin-right: 4px;
                    margin-bottom: 4px;
                    object-fit: cover;
                    height: 75px;
                    cursor: pointer;
                    // width: 75px;
                }
            }

            #lwGifImagesContainer {
                // margin-top: -56px;
            }
        }

        .lw-messenger-image-loading {
            filter: invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg)
                brightness(104%) contrast(97%);
        }

        .lw-overlay {
            // display: none;
            visibility: hidden;
            opacity: 0;
            width: 100%;
            margin-left: -30px;
            top: 0;
            position: fixed;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            @include lwTransition(0.3s);
        }
        &.lw-open {
            overflow: hidden;
            bottom: 8px;
            .lw-overlay {
                //   display: block;
                visibility: visible;
                opacity: 1;
            }
        }
    }

    .lw-messenger-file-upload {
        margin-left: 30px;
        .filepond--root {
            height: 0px !important;
            top: -26px;
        }
        .filepond--list {
            display: none;
        }
        .filepond--drop-label {
            width: 15px;
        }
        .filepond--panel {
            display: none;
        }
        .filepond--assistant {
            display: none;
        }
        label {
            i {
                margin-right: 17px;
                margin-bottom: 13px !important;
            }
        }
    }
    .emojionearea.emojionearea-inline {
        height: 44px;
        border-top-left-radius: 0.35rem;
        border-bottom-left-radius: 0.35rem;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
        border: 1px solid #3d3b48;
    
        [dir="rtl"] & {
            border-radius: 0;
            border-top-right-radius: 0.35rem;
            border-bottom-right-radius: 0.35rem;
        }

        & > .emojionearea-editor {
            padding: 10px 0;
        }
    }
}
.lw-disable-link {
    user-select: none;
    pointer-events: none;
}

.emojionearea {
    .emojionearea-picker.emojionearea-picker-position-top {
        right: 0;
        left: 0;
        [dir="rtl"] & {
            right: 10px;
        }
    }
}

.emojionearea.emojionearea-inline > .emojionearea-button {
    top: 7px;
}

.lw-audio-video-btns {
    display: none;
}
.fa-sticky-note{
    margin-top: 5px !important;
}

// @media (max-width: 768px) {
//     .lw-float-right-button {
//         padding-top: 0.5rem !important;
//     }
// }