.chat-container {
    display: flex;
    max-width: 1299px;
    height: 600px;
    margin: 40px auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    background-color: #fff;
}

    /* Left user list */
    .user-list {
        width: 380px;
        border-right: 1px solid #eee;
        background: #fafafa;
        overflow-y: auto;
        padding: 10px;
    }

    .user-list .user {
        padding: 10px 15px;
        border-radius: 8px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .user-list .user:hover {
        background-color: #e8f0fe;
    }

    .chat-area {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .message-list {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        background: #f7f7f7;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .message {
        max-width: 70%;
        padding: 12px 15px;
        border-radius: 12px;
        position: relative;
        font-size: 15px;
        line-height: 1.4;
    }

    .sent {
        align-self: flex-end;
        background: #d1e7ff;
        border-bottom-right-radius: 0;
    }

    .received {
        align-self: flex-start;
        background: #e2e2e2;
        border-bottom-left-radius: 0;
    }

    .message .time {
        font-size: 11px;
        color: #666;
        margin-top: 5px;
        text-align: right;
    }

    .reply-section {
        padding: 15px;
        border-top: 1px solid #ddd;
        background: #fff;
        display: flex;
        gap: 10px;
    }

    .reply-section textarea {
        flex: 1;
        resize: none;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 14px;
        outline: none;
        transition: border-color 0.2s;
    }

    .reply-section textarea:focus {
        border-color: #3399ff;
    }

    .reply-section button {
        background: #3399ff;
        color: white;
        border: none;
        padding: 10px 18px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.3s;
    }

    .reply-section button:hover {
        background: #007bff;
    }

    .user {
        position: relative;
        padding: 12px 16px;
        cursor: pointer;
        transition: background 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .user:hover {
        background-color: #f5f7fa;
    }

    .user.active {
        background-color: #E8F0FE;
    }

    /* The badge container */
    .user .new-indicator {
        position: relative;
        display: inline-block;
        min-width: 18px;
        height: 18px;
        padding: 0 6px;
        background-color: #ff3b30;
        /* modern red */
        color: white;
        font-size: 12px;
        font-weight: 600;
        border-radius: 12px;
        text-align: center;
        line-height: 18px;
        box-shadow: 0 0 6px rgba(255, 59, 48, 0.7);
        opacity: 0;
        transform: scale(0.8);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Show the badge */
    .user.show-indicator .new-indicator {
        opacity: 1;
        transform: scale(1);
        animation: pulse 1.5s infinite;
    }

    /* Pulse animation */
    @keyframes pulse {
        0% {
            box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
        }

        70% {
            box-shadow: 0 0 0 8px rgba(255, 59, 48, 0);
        }

        100% {
            box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
        }
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        background: transparent;
        color: white;
        border-radius: 50%;
        font-weight: bold;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
    }

.chat-wrapper {
    width: 100%;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-family: 'Inter Display';
}

    .chat-header {
        background-color: #f5f6f8;
        padding: 15px;
        border-bottom: 1px solid #ddd;
        font-size: 16px;
        font-weight: bold;
    }

    .message-list {
        padding: 15px;
        max-height: 460px;
        overflow-y: auto;
        background-color: #fff;
    }

    .message {
        margin-bottom: 12px;
        max-width: 70%;
        padding: 10px 14px;
        border-radius: 20px;
        position: relative;
        font-size: 15px;
        line-height: 1.4;
    }

    .message.sent {
        background-color: transparent;
        align-self: flex-end;
        margin-left: auto;
        border-bottom-right-radius: 4px;
    }

    .message.received {
        align-self: flex-start;
        margin-right: auto;
        border-bottom-left-radius: 4px;
        background-color: transparent;
        text-align: left;
        font-family: 'Inter Display';
    }

    .message .time {
        font-size: 11px;
        color: #666;
        margin-top: 6px;
        text-align: right;
    }

    .reply-section {
        padding: 10px 15px;
        background-color: #fafafa;
        border-top: 1px solid #e0e0e0;
        display: flex;
        gap: 10px;
    }

.reply-section textarea {
    flex: 1;
    resize: none;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
    min-height: 60px !important;
}

.reply-section button {
    background-color: rgba(0, 184, 179, 1);
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Inter Display';
    width: 15%;
    height: 40px;
    font-size: 16px;
    margin: auto;
    position: relative;
}
.reply-section button {
    position: relative;
}

.reply-section button:before {
    position: absolute;
    content: "\f1d8";
    width: 100%;
    height: 100%;
    top: 9px;
    right: -35px;
    font-family: 'FontAwesome';
    font-size: 14px;
}
    .reply-section button:hover {
        background-color: rgba(0, 184, 179, 0.8);
    }
    .reply-section .textarea {
    width: 85%;
}
.message-list div {
    position: relative;
    color: #fff;
    font-size: 14px;
}
.message-list .message.message--self:before {
    display: block;
    clear: both;
    content: '';
    position: absolute;
    bottom: -3px;
    right: -7px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 12px 15px 12px;
    border-color: transparent transparent #00B8B3 transparent;
    -webkit-transform: rotate(37deg);
    -ms-transform: rotate(37deg);
    transform: rotate(37deg);
}
.message-list .message.message--other:after {
    display: block;
    clear: both;
    content: '';
    position: absolute;
    bottom: -3px;
    right: -7px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 12px 15px 12px;
    border-color: transparent transparent #7B67E9 transparent;
    -webkit-transform: rotate(37deg);
    -ms-transform: rotate(37deg);
    transform: rotate(37deg);
}
.vp-post-header-top img.avatar {
    width: 50px;
}

/* Modal css */
.vp__send__message.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.7);
    opacity: 0;
}
.vp__send__message.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}
#chatMessage {
    height: 150px;
    resize: vertical;
    width: 100%;
    padding: 8px;
}
#sendMessage {
    margin-top: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
#sendMessage:hover {
    background-color: #0056b3;
}
.vp-btn-message {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.vp-btn-message:hover {
    background-color: #0056b3;
}

/* === Chat Box Style 2 === */
.vp_chatbox_wrap_2.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.7);
    opacity: 0;
}
.vp_chatbox_wrap_2.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}
.container_chat_2 {
    display: flex;
    height: 650px;
    margin: 0 auto;
    overflow-y: auto;
    gap: 28px;
    /* background-color: #ffffff; */
    overflow-x: hidden;
}
        
.vp_chatbox_wrap_2 .modal-content {
    background: #FAF7F8;
}

.vp_chat_2_sidebar {
    width: 35%;
    background: #ffffff;
    border-radius: 10px;
    padding: 28px;
    max-height: 650px;
    overflow-y: hidden;
}

.chat_2_area {
    background: #fff;
    width: 65%;
    max-height: 650px;
    overflow-x: hidden;
}

.vp_chat_search_wrap h4 {
    color: #1D1F2C;
    font-size: 24px;
    font-weight: 600;
    text-align: left;
    margin-bottom: 25px;
}

.vp_chat_search {
    position: relative;
}

.vp_chat_search input {
    background-color: #FAF7F8;
    border: none;
    border-radius: 20px;
    padding-left: 40px;
}

.vp_chat_search input::placeholder {
    font-size: 14px;
    padding-left: 20px;
}

.vp_chat_search img {
    position: absolute;
    left: 9px;
    top: 15px;
}
.vp_chatbox_wrap_2 .modal-dialog.modal-lg {
    --bs-modal-width: 1200px;
}
/* Sidebar */
.vp_chat_2_list_item ul {
    list-style: none;
    padding: 0;
}

.vp_chat_2_list_item li {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e1e8ed;
    cursor: pointer;
    padding-left: 10px !important;
}

.vp_chat_2_list_item li img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.vp_chat_2_middle p {
    margin: 0;
    font-size: 14px;
    color: #374151;
    text-align: left;
    font-family: 'Inter Display';
}

.vp_chat_2_middle p strong {
    color: #111827;
    margin-right: 5px;
}

.vp_chat_2_middle .ellipsis {
    color: #666;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px; /* Adjust as needed */
}

.chat__2_list_message {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Adjust as needed */
}

.chat_message_right {
    text-align: right;
    margin-left: auto;
}

.message_active_time {
    margin: 0 0 5px;
    font-size: 12px;
    color: #6B7280;
    font-family: 'Inter Display';
}

.chat_message_count {
    margin: 0;
    font-size: 12px;
    color: #fff;
    background-color: #00B8B3;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Header */
.vp_chat_2_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e1e8ed;
    background-color: #fff;
}

.vp_chat_2_head_left {
    display: flex;
    align-items: center;
    text-align: left;
}

.chat_2-head_thumb img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat_2_head_info h6 {
    margin: 0;
    font-size: 16px;
    color: #111827;
    font-weight: 600;
}

.chat_2_head_info p {
    margin: 0;
    font-size: 14px;
    color: #6B7280;
}

.vp_hat_2_head_right img {
    width: 20px;
    height: 20px;
    cursor: pointer;
}
/* ==== */
.message {
    display: flex;
    margin: 10px 0;
    align-items: flex-start;
}

.vp_message_received_thumb img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.vp_message_recived_content {
    max-width: 90%;
}

.received_time {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.received_text {
    background-color: #FAF7F8;
    padding: 10px;
    border-radius: 10px 10px 10px 0px;
    margin: 0;
}

.message.sent {
    flex-direction: row-reverse;
}

.vp_message_sent_content {
    max-width: 90%;
    text-align: right;
}

.sent_time {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.sent_text {
    background-color: #00B8B3;
    color: #fff;
    padding: 10px;
    border-radius: 10px 10px 0px 10px;
    margin: 0;
}
/* Typing */
.vp_chat_2_message_typing {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.vp_typing_thumb img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.vp_typing_content {
    display: flex;
    align-items: center;
}

.vp_typing_content p {
    margin: 0;
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

.vp_typing_content .typing-dots {
    display: flex;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 2px;
    display: inline-block;
    animation: typing 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
    100% { opacity: 0.3; transform: translateY(0); }
}
/* Message */
.vp_chat_2_type_here {
    display: flex;
    padding: 10px;
    background-color: transparent;
    height: 135px;
    width: 100%;
    position: relative;
}

.vp_chat_2_type_here textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #e1e8ed !important;
    border-radius: 4px 0 0 4px;
    margin-right: -1px; /* Border overlap fix */
    font-size: 14px;
    color: #5E6C84 !important;
    width: 61%;
}

.vp_chat_2_type_here textarea::placeholder {
    color: #5E6C84;
    opacity: 1;
}

.vp_chat_2_type_here button {
    padding: 10px 15px;
    background: linear-gradient(90deg, #0031B8 0%, #00B8B3 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    width: 44px;
    height: 44px;
    position: absolute;
    right: 20px;
    bottom: 5px;
    border: 2px solid #000000;
}

.vp_chat_2_type_here button:hover {
    background: linear-gradient(90deg, #002d9e 0%, #00a39e 100%); /* Slightly darker on hover */
}

.vp_chat_2_type_here button i {
    color: #fff;
    font-size: 16px;
}
.vp_chat_2_today {
    text-align: center;
    position: relative;
    margin-top: 30px;
}

.vp_chat_2_today:before {
    position: absolute;
    content: "";
    left: 0;
    top: 50%;
    width: 45%;
    background: #DFE1E6;
    height: 1px;
}

.vp_chat_2_today:after {
    position: absolute;
    content: "";
    top: 50%;
    right: 0;
    width: 45%;
    height: 1px;
    background: #DFE1E6;
}
.vp_chat_2_messages {
    background-color: #fff;
    padding-bottom: 30px;
    height: 440px; 
    overflow-y: auto;
}
.chat_2-head_thumb {
    position: relative;
}
.chat_2-head_thumb:before, .chat_2-head_thumb:after {
    position: absolute;
    content: "";
    width: 12px;
    height: 12px;
    background: #00B8B3;
    border-radius: 50%;
    right: 6px;
    bottom: 4px;
}
.chat_2-head_thumb:after {
    background: #DFE1E6;
}
.chat_2-head_thumb:before {
    background: #00B8B3;
}
.vp-message-list h1 {
    text-align: center;
}

.vp-message-list {
    padding-right: 20px;
}
li.open-chat.ps-0.active {
    background-color: #d3edff;
}
ul.vp_chat_user_list {
    padding-left: 0;
    text-align: center;
}
.ekit-template-content-header {
    z-index: 1 !important;
}

.vp_chat_2_head_left.user-active .chat_2-head_thumb::after {
    background: #00B8B3 !important; 
}

.vp_chat_2_head_left.user-inactive .chat_2-head_thumb::after{
    background: #ccc !important; 
}
.vp_typing_thumb {
    margin-left: 15px;
}