.chat-toggle-btn {
    position: fixed;
    bottom: 5%;
    right: 2%;
    z-index: 998;
    border-radius: 50%;
    height: 55px;
    width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    box-shadow: 0 0 0 0 #c4c5c7;
    -webkit-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
    -moz-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
    -ms-animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
    animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
}

.smat-lb-div {
    /* -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important; */
    animation: none !important;
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-50px);
    }

    60% {
        transform: translateY(-25px);
    }
}

.chat-toggle-btn span.read {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2ecc71;
    top: 2px;
    left: 40px;
}

.smat-lb-div:after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #000;
    top: 2px;
    left: 40px;
}

.chat-main .online {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    background: #1CD14F;
    bottom: 2px;
    left: 75%;
}

.chat-list,
.chat-screen {
    padding: 0px 15px 15px 15px;
}

.chat-header {
    position: sticky;
    top: 0;
    background: var(--secondary);
    z-index: 99;
    padding: 20px 0px 10px 0px;
    cursor: pointer;
}

.chat-search {
    margin-block: 20px;
}

.chat-header h5 {
    color: var(--text-primary);
    font-weight: var(--fw-lg);
    cursor: pointer;
}

#chat .offcanvas-body,
.chat-screen,
.chat-main {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-main .inpleftflex {
    width: 100%;
    display: grid;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    grid-template-columns: 10% 90%;
}

.chat-main .inpleftflex i {
    color: #B1B1B1;
    font-size: 12px;
    text-align: center;
}

.chat-main .inpleftflex:focus-within {
    border: 1px solid var(--main) !important;
}

.chat-main .inpleftflex:focus-within .form-control:focus {
    border: none !important;
}

.chat-user-card {
    cursor: pointer;
}

.chat-user.unseen h5,
.chat-user.unseen h6 {
    font-weight: var(--fw-lg);
}

.chat-user h4 {
    color: var(--text-secondary);
    font-weight: var(--fw-sm);
}

.chat-user h5 {
    color: var(--text-primary);
    font-weight: var(--fw-sm);
}

.empty-content h6,
.chat-user h6 {
    color: var(--text-secondary);
    font-weight: var(--fw-sm);
}

.chat-hr {
    border: 0.5px solid var(--input-border) !important;
}

.chat-long {
    width: 100%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.chat-card-grid {
    display: grid;
    grid-template-columns: 70% 30%;
    align-items: center;
    justify-content: space-between;
}

/* Messages */
.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    gap: 8px;
    position: relative;
}

.chat-messages::before {
    content: "";
    flex: 1 1 auto;
    min-height: 0;
}

.message {
    max-width: 70%;
    margin-bottom: 5px;
    position: relative;
    clear: both;
}

.message.incoming {
    display: flex;
    align-items: last baseline;
    justify-content: start;
    gap: 5px;
    background: none;
    padding: 0;
}

.message.incoming .message-content.nrml {
    background: var(--main) !important;
}

.message.incoming .message-content {
    background: var(--gray);
    padding: 8px 10px;
    border-radius: 12px;
    /* border-top-left-radius: 0; */
}

.message.outgoing {
    /* border-bottom-right-radius: 0; */
    align-self: flex-end;
    justify-content: end;
    display: flex;
    background: none;
    padding: 0;
    width: 100%;
}

.message.outgoing .message-content {
    background: var(--gray);
    padding: 8px 10px;
    border-radius: 12px;
}

.message.incoming h6,
.message.outgoing h6 {
    color: var(--text-primary);
    font-weight: var(--fw-md);
    word-break: break-all;
}

.message h6.small-h6 {
    color: var(--text-secondary);
    font-weight: var(--fw-sm);
}

.message .time {
    color: var(--text-secondary);
    font-size: 8px;
    display: block;
    margin-top: 5px;
}

#chatInput.form-control {
    background: var(--secondary);
    color: var(--text-primary);
    font-size: 12px !important;
    font-weight: var(--fw-sm);
    border: 1px solid var(--border);
    padding: 8px 10px;
}

#chatInput.form-control:focus {
    border: 1px solid var(--main);
    outline: none;
    box-shadow: none;
}

.chat-link {
    color: var(--blue);
    text-decoration: underline;
    word-break: break-word;
}

.chat-link:hover {
    text-decoration: none;
}

.unseen-count {
    background: var(--main);
    color: var(--text-primary) !important;
    font-size: 8px !important;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--fw-sm);
    z-index: 1;
}

.chat-screen h5 span.label {
    background: var(--main);
    color: var(--text-primary);
    font-weight: var(--fw-md);
    text-transform: capitalize;
    margin: auto;
}

.chat-screen h5 span.label {
    font-size: 10px !important;
    border-radius: 5px;
    padding: 2px 10px;
}

@media screen and (min-width: 1140px) {
    #chat.offcanvas {
        width: 450px;
    }

    .chat-header h5 {
        font-size: 16px;
    }

    .chat-user h4,
    .chat-user h5,
    .chat-messages h6,
    .empty-content h6 {
        font-size: 12px;
    }

    .message h6.small-h6,
    .chat-user h6 {
        font-size: 10px;
    }
}

@media screen and (min-width: 767px) and (max-width: 1140px) {
    #chat.offcanvas {
        width: 350px;
    }
}

@media screen and (max-width: 1140px) {
    .chat-header h5 {
        font-size: 14px;
    }

    .chat-user h4,
    .chat-user h5,
    .chat-messages h6,
    .empty-content h6 {
        font-size: 12px;
    }

    .message h6.small-h6,
    .chat-user h6 {
        font-size: 10px;
    }
}