/* helper class css */

:root {
    --chat-secondary: #b8b8b8;
    --chat-background: #61593d;
    --chat-dark-text: #141414;
    --chat-light-text: #ffffff;
}

.chat-hidden {
    display: none !important;
}

.chat-flex {
    display: flex !important;
}

.m-0 {
    margin: 0 !important;
}

/* helper class css ends */

.chat-parent-container {
    position: fixed;
    /* right: -20px; */
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: end;
    z-index: 10;
    pointer-events: none;
    align-items: end;
}
.chat-toggle-container, .chat-view-container {
    pointer-events: all;
}

/* chat box toggle button */
.chat-toggle-container {
    padding: 10px;
    padding-right: 20px;
    padding-bottom: 0;
}

.chat-toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(180deg, #A26EF7 0%, #763CD4 100%);
    box-shadow: 0px 24px 40px -10px rgba(118, 60, 212, 0.8);
    border-radius: 100%;
    cursor: pointer;
    margin-bottom: 20px;
}

.chat-unread-count {
    background: #c8191c;
    color: var(--chat-light-text) !important;
    border: 1px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px !important;
    width: 24px !important;
    position: absolute;
    right: 15px;
    top: 5px;
    font-size: 14px;
}

.chat-message-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    color:#fff !important;
}

/* chat box toggle button ends */

/* chat box container */

.chat-view-body {
    height: 50vh;
}

.chat-view-container {
    width: 90%;
    height: 100%;
    max-height: 600px;
    border-radius: 10px 10px 0 0;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #898989 !important;
    border-bottom: none;
    margin-right: 10px;
    background: var(--chat-light-text);
    box-shadow: 0px 10px 25px -2px rgba(20, 20, 20, 0.20);
    backdrop-filter: blur(12.5px);
}
.dark .chat-view-container{
    background-color: #383837;
}
input.chat-sidebar-topbar-input {
    background-color:unset !important;
    border-color: unset !important;
}
.chat-view-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid var(--chat-dark-text);
    background: #141414;
}

.chat-view-header-text {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.chat-view-body {
    display: flex;
}

.chat-view-sidebar {
    overflow-x: hidden;
    /* width: 225px; */
    background: #292929;
    scrollbar-color: var(--primary-color) transparent;
    position: relative;
    height: calc(100% - 30px);
    padding-bottom: 12px;
}

.chat-inbox-sidebar-toggle {
    display: none;
}

.chat-sidebar-img {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    transition: 0.1s all;
    max-width: unset;
}

.chat-sidebar-user {
    gap: 10px;
    padding: 12px 10px;
    color: var(--chat-light-text) !important;
    cursor: pointer;
}

/* .chat-sidebar-user-details {
    width: 100%;
} */

.chat-sidebar-user-name {
    color: var(--chat-light-text) !important;
}

.chat-view-inbox {
    flex-grow: 1;
}

.chat-inbox-header {
    display: flex;
    gap: 5px;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    background: var(--chat-secondary);
    height: 10%;
}

.chat-inbox-body {
    padding: 0 10px;
    height: calc(100% - 62px);
    overflow-y: auto;
    scrollbar-color: var(--primary-color) transparent;
    position: relative;
}

.chat-inbox-refreshing {
    overflow-y: hidden;
}

.chat-inbox-refreshing .chat-inbox-loader-overlay {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: all !important;
    cursor: wait;
}

.chat-inbox-loader-overlay {
    visibility: visible;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    height: 100%;
    left: 50%;
    top: 50%;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-inbox-footer {
    height: 52px;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    background: #F6F3F2;
    border: 1px solid #dfdfdf;
    position: relative;
    border-radius: 40px;
    margin: 0 20px;
}
.dark .chat-inbox-footer{
    background-color: #333332;
    border: 1px solid #474746;
}

.chat-inbox-input-group {
    display: block;
}

.chat-inbox-single-item {
    margin: 10px 0;
    display: flex;
    gap: 8px;
    /* align-items: end; */
}

.chat-inbox-input-group {
    display: flex;
    width: calc(100% - 65px);
    margin-left: 10px;
}

.chat-inbox-send-attachment-icon {
    fill: var(--primary-color);
    color: var(--chat-dark-text);
    max-height: 30px;
    max-width: 30px;
}

.chat-inbox-send-button {
    cursor: pointer;
    margin-top: 23px;
    position: absolute;
    right: -12px;
}

.chat-inbox-attachment-input {
    padding: 0 10px;
    position: relative;
    border-right: 1px solid #2c2c2c14;
    display: flex;
    align-items: center;
}

.chat-attachment {
    align-items: center;
}

span.attachment {
    overflow-wrap: anywhere;
}

.chat-inbox-text-input textarea {
    width: 100%;
    border: none;
    padding: 7px 5px;
    resize: none;
    background: #F6F3F2;
    color: #141414;
    font-size: 13px;
    line-height: 20px;
    overflow-wrap: anywhere;
}
.dark .chat-inbox-text-input textarea{
    color: white;
}
.dark .chat-inbox-text-input textarea{
    background-color: #333332;
}
.chat-inbox-text-input textarea::placeholder {
    color: #898989;
}
.chat-sidebar-user-text {
    color: var(--chat-secondary) !important;
    margin-top: -2px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 140px;
    float:left;
}

.chat-inbox-unread .chat-sidebar-user-text {
    color: var(--primary-color) !important;
}

.chat-inbox-text-input {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

li.chat-inbox-single-item.chat-inbox-sent {
    flex-direction: row-reverse;
}

.chat-inbox-message-list {
    padding: 0;
}

.chat-inbox-single-content {
    overflow: hidden;
    /* max-width: 300px; */
    background-color: #F6F3F2;
    color: var(--chat-dark-text);
    padding: 12px;
    border-radius: 8px;
    text-align: initial;
    font-size: 13px;
    font-weight: 500;
    overflow-wrap: anywhere;

}
.dark .chat-inbox-single-content{
    background-color: #474746;
    color: white;
}

.chat-inbox-single-content img {
    max-height: 100%;
    max-width: 100%;
    border-radius: 10px;
    object-fit: contain;
    cursor: pointer;
}

.chat-inbox-sent .chat-inbox-single-content {
    border-radius: 8px;
    background-color: #763CD4;
    color: white;
    font-size: 13px;
    /* word-wrap:break-word */

}

.chat-inbox-single-avatar img {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    object-fit: cover;
    max-width: unset;
}

.chat-sidebar-user:hover,
.chat-sidebar-user.chat-user-active {
    border-color: #898989;
    background-color: #474746;
}

.chat-inbox-single-message {
    display: flex;
    flex-direction: column;
    align-items: self-end;
}

.chat-inbox-header-button {
    display: flex;
    gap: 10px;
}

.chat-sidebar-topbar {
    padding: 10px;
    width: 100%;
}

.chat-sidebar-topbar-input:focus-visible,
input.chat-sidebar-topbar-input:active {
    outline: none;
    border-bottom-color: #2c2c2c14;
}

.chat-sidebar-topbar-input {
    height: 30px;
    border: none !important;
    border-bottom: 1px solid #2c2c2c14 !important;
    background: transparent;
    padding: 5px;
    color: white !important;
    width: 100%;
}

small.chat-chat-inbox-time {
    color: #a4a4a4 !important;
    margin-top: 3px;
    float: left;
}

.chat-attachment {
    display: flex;
    cursor: pointer;
}

.chat-inbox-single-content a {
    text-decoration: none;
    color: inherit;
}

.chat-attachment svg {
    fill: var(--chat-dark-text);
}

.secondary-chat-sidebar-toggle-button svg {
    padding: 10px;
    box-sizing: content-box;
}

.chat-parent-container * {
    box-sizing: border-box;
}

.chat-inbox-attachment-input input {
    display: none;
}

.chat-inbox-attachment-input label {
    margin: 0;
}

/* from old css code */
.no-message-svg {
    display: flex;
    gap: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-chat-message-design {
    display: flex;
    justify-content: center;
    align-items: center;
}

.no-msg-container {
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.no-msg-container .no-msg {
    font-family: DM Sans;
    font-style: normal;
    font-weight: bold;
    font-size: 16px;
    line-height: 21px;
    text-transform: uppercase;
    color: #2c2c2c;
}
.no-msg-container .new-conv {
    font-family: Roboto;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #b0b0b0;
}

.no-msg-style {
    display: flex;
    margin-left: 75px;
    margin-top: 7px;
}
.no-msg-style-icon {
    width: 36px;
    height: 36px;
    fill: #b0b0b0;
}

.msg-header-icon {
    width: 18px;
    height: 19px;
}

.chat-error-message {
    position: absolute;
    width: 100%;
    bottom: 0;
    padding: 10px;
    list-style: none;
    color: red;
    box-shadow: 0px -10px 10px -15px #000000;
    transition: 0.1s ease-out;
    opacity: 0;
    pointer-events: none;
    background: #f1f1f1;
    visibility: hidden;
    z-index: 0;
}

.chat-error-message li {
    list-style: none !important;
    color: red !important;
}

.chat-error-show {
    opacity: 1;
    bottom: 100%;
    visibility: visible;
    z-index: 10;
}

.chat-error-message.chat-error-show ul {
    font-size: 14px;
    padding: 0px 20px;
    list-style: disc;
}

.chat-inbox-refreshing .chat-inbox-sidebar-reload svg {
    animation: spinner 1.5s linear infinite;
}
/* from old css code */


.chat-inbox-single-content .item-footer a{
    background: var(--chat-background);
    color: white;
    padding: 5px;
    display: inline-block;
    margin: 10px 0 5px 0;
}
.chat-inbox-received{
    margin-right:28px
}
html[dir="rtl"] .chat-inbox-received{
    margin-left:28px;
    margin-right: unset !important;
}
/* chat box container ends */

/* media queries */

@media (max-width: 650px) {
    .chat-view-container {
        margin-right: -10px;
    }
    .chat-inbox-sidebar-toggle {
        display: block;
    }

    .chat-inbox-text-input textarea {
        padding: 7px 0px;
    }

    .chat-header-sidebar-mobile .chat-sidebar-user-details {
        display: none;
    }

    .chat-header-sidebar-mobile .chat-sidebar-topbar {
        display: none;
    }

    /* .chat-view-sidebar {
        width: 380px !important;
    } */

    /* .chat-header-sidebar-mobile {
        width: 124px !important;
    } */

    .chat-sidebar-img {
        height: 35px;
        width: 35px;
    }

    .chat-header-sidebar-mobile .chat-sidebar-img {
        height: 30px;
        width: 30px;
    }

    .chat-inbox-single-content {
        max-width: 200px !important;
    }

    .secondary-chat-sidebar-toggle-button {
        display: flex;
        flex-direction: row-reverse;
        width: auto;
    }
    .chat-inbox-received{
        margin-right:0px
    }
    html[dir="rtl"] .chat-inbox-received{
        margin-left:0px;
        margin-right: unset !important;
    }
    .chat-inbox-sent{
        margin-left:0px
    }
    .chat-inbox-footer {
       
        margin: 0 10px;
    }
}

/** Customize Scrollbar **/

.chat-inbox-body::-webkit-scrollbar {
    width: 3px;
    background: transparent;
}
.chat-inbox-body::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}
.chat-inbox-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #A26EF7 0%, #763CD4 100%);
    outline: 1px solid #763cd4;
}

/* loader */

.icon-spinner {
    width: 25px;
    height: 25px;
    display: block;
    padding: 0px;
    border-radius: 100%;
    border: 4px solid;
    border-top-color: #763cd4;
    border-bottom-color: rgba(255, 255, 255, 0.3);
    border-left-color: #763cd4;
    border-right-color: #763cd4;
    -webkit-animation: spinner 0.8s linear infinite;
    animation: spinner 0.8s linear infinite;
}

.message-state-loading .icon-spinner {
    display: block;
}

@keyframes spinner {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.message-state-loading .loader-container {
    display: block;
}

.message-state-loading .has-loader-effect {
    display: none;
}
.chat-inbox-refreshing .chat-view-sidebar {
    display: block;
}
.chat-list:hover a{
    display: block;
    transition: 0.4s;
}
.editable-title{
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-align: left;
    font-size: 13px;
    word-wrap: break-word;
}
.title-container input{
    /* display: inline-block; */
    border: none;
    outline: none;
    background-color: transparent;
    cursor: text;
    padding: 0;
    width: 100%;
    height: 20px;
    /* text-align: left; */
    font-size: 13px;
    word-wrap: break-word;
}
@media only screen and (max-width:768px){
    .title-container input{
        width: 45px;
        word-wrap: break-word;
    }
    
}

  .typing {
    align-items: center;
    display: flex;
    height: 17px;
  }
  .typing .dot {
    animation: mercuryTypingAnimation 1.8s infinite ease-in-out;
    background-color: #FF774B ;
    border-radius: 50%;
    height: 6px;
    margin-right: 4px;
    vertical-align: middle;
    width: 6px;
    display: inline-block;
  }
  .typing .dot:nth-child(1) {
    animation-delay: 200ms;
  }
  .typing .dot:nth-child(2) {
    animation-delay: 300ms;
  }
  .typing .dot:nth-child(3) {
    animation-delay: 400ms;
  }
  .typing .dot:last-child {
    margin-right: 0;
  }

  @keyframes mercuryTypingAnimation {
    0% {
      transform: translateY(0px);
      background-color:#FF774B;
    }
    28% {
      transform: translateY(-7px);
      background-color:#E22861;
    }
    44% {
      transform: translateY(0px);
      background-color: #763CD4;
    }
  }

/* rtl implementation */

html[dir="rtl"] .chat-parent-container {
    right: unset;
    left:0px;
    bottom: 0px;
}

html[dir="rtl"] .chat-unread-count {
    right: unset;
    left: 15px;
}
html[dir="rtl"] .chat-message-icon {
    margin-left: 10px;
    margin-right: unset;
}
html[dir="rtl"] .chat-view-container {
    margin-left: 10px;
    margin-right: unset;
}
html[dir="rtl"] .no-msg-style {
    margin-right: 75px;
    margin-left: unset;
}
html[dir="rtl"] .chat-inbox-single-content {
    border-radius: 10px 10px 0px 10px;
}
html[dir="rtl"] .chat-inbox-sent .chat-inbox-single-content {
    border-radius: 10px 10px 10px 0px;
}
html[dir="rtl"] .ml-2{
    margin-left: unset;
    margin-right: 8px;
}
html[dir="rtl"] .chat-bubble {
    float: right;
  }
html[dir="rtl"]   .typing .dot {
    margin-left: 4px;
    margin-right: unset;
  }
  html[dir="rtl"]  .typing .dot:last-child {
    margin-right: unset;
    margin-left: unset;
  }
  html[dir="rtl"] .chat-inbox-send-button {
    right: unset;
    left: -12px;
}
html[dir="rtl"] .chat-toggle-container {
    padding-right: unset;
    padding-left: 20px;
}
html[dir="rtl"] .chat-inbox-loader-overlay {
    right: 50%;
    left: unset;
}
html[dir="rtl"] .chat-inbox-input-group {
    margin-right: 10px;
    margin-left: unset;
}
html[dir="rtl"] .chat-inbox-attachment-input {
    border-left: 1px solid #2c2c2c14;
    border-right: unset;
}
html[dir="rtl"] .chat-sidebar-user-text {
    float:right;
}
html[dir="rtl"] small.chat-chat-inbox-time {
    float: right;
}
html[dir="rtl"] .editable-title{
    text-align: right;
}
html[dir="rtl"] .title-container input{
    text-align: right;
}
html[dir="rtl"] .ml-3{
    margin-left: unset;
    margin-right: 12px;
}
.wrap-anywhere{
    overflow-wrap: anywhere;
}
.chat-sidebar{
    width: 36%;
    transition: 0.3s ease;
}
.chat-content{
    width: 64%;
    transition: 0.3s ease;
}

.main-content_large {
    width: 100%;
    transition: 0.3s ease;
  }
  .sidebar_small {
    width: 0%;
    transition: 0.3s ease;
  }
  
  .line-clamp-single {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.chat-dropdown-content{
    max-height: calc(50vh - 60px);
    box-shadow: 0px 24px 40px -10px rgba(20, 20, 20, 0.15);
}
.message-content{
    max-height: calc(50vh - 165px);
}
