

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* WP Direct Chat Styles */

/* Chat Section Container */
.group_chat_section {
    padding: 40px 0;
    /* background-color: #f5f5f5; */
    /* min-height: 100vh; */
}

.group_chat_section .homepage_banner {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 30px;
}

/* Main Chat Container */
.group_chat_main {
    display: flex;
    max-width: 1140px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 224px);
    overflow: auto;
    position: relative;
}

/* Sidebar Styles */
.group_chat_sidebar {
    width: 350px;
    min-width: 350px; /* Prevent sidebar from shrinking */
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

/* Sidebar always visible - no hide functionality */
.group_chat_sidebar.hide {
    display: flex !important; /* Keep sidebar visible even with hide class */
}

/* Search Header */
.search_header {
    padding: 18.5px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.search_header .form-control {
    border-radius: 20px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 14px;
}
.search_header .form-control::placeholder{
    color: #3D454D;
}

.search_header .btn-link {
    color: #666;
    padding: 0;
    margin-left: 10px;
    background: none;
}

/* Chat Listing */
.group_chat_listing {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.group_chat_listing .list_items {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.group_chat_listing .list_items:hover {
    background-color: #FFF9F2;
}

.group_chat_listing .list_items a.chat_details {
    display: flex;
    padding: 15px 24px;
    text-decoration: none;
    color: inherit;
    align-items: center;
    gap: 12px;
}

.group_chat_listing .list_items a.chat_details:focus{
    outline: none;
    
}

.group_chat_listing .list_items figure {
    flex-shrink: 0;
    margin: 0;
}

.group_chat_listing .list_items figure img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.group_chat_listing .list_items .user_details {
    flex: 1;
    min-width: 0;
}

.group_chat_listing .list_items .user_name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 0px 0;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
}

.group_chat_listing .list_items .chat_desc {
    font-size: 12px;
    color: #3D454D;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
    font-family: 'Poppins';
}
.group_chat_listing .list_items .chat_time_notification {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.group_chat_listing .list_items .time {
    font-size: 12px;
    color: #3D454D;
    font-weight: 400;
    font-family: 'Poppins';
}

.group_chat_listing .list_items .badge {
    background: #002620;
    color: #fff;
    font-size: 12px;
    padding: 0;
    border-radius: 50%;
    width: 20px;
    /* line-height: 20px; */
    height: 20px;
    text-align: center;
}

/* Chat Container */
.group_chat_container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    /* Prevent layout shifts that cause blinking */
    min-height: 400px;
    position: relative;
    /* Prevent any transitions that could cause visible changes */
    transition: none;
}

/* Container always visible when active - side by side with sidebar */
.group_chat_container.active {
    display: flex;
}

/* Prevent any transitions on chat elements */
.group_chat_container * {
    transition: none !important;
}

/* Only allow transitions on user interactions (hover, etc.) */
.group_chat_listing .list_items:hover {
    transition: background-color 0.2s ease;
}

/* Chat Header */
.chat_header {
    display: flex;
    align-items: center;
    padding: 23.5px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    gap: 15px;
}

.chat_header .back-to-listing {
    color: #666;
    padding: 5px;
    display: none !important; /* Always hidden - sidebar and chat are side by side */
}

.chat_header .chat_details {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chat_header figure {
    margin: 0;
}

.chat_header figure img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat_header .user_name {
    font-family: 'Raleway';
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;
    color: #081623;
    margin-bottom: 0;
}

/* Chat Body */
.chat_body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    /* Prevent smooth scrolling that causes visible movement */
    /* scroll-behavior: auto; */
}

/* Prevent any visible movement during loading - hide completely */
.chat_body.chat-loading {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    /* Prevent any transitions during load */
    transition: none !important;
    /* Maintain dimensions to prevent layout shift */
    position: relative;
    min-height: 400px;
}

/* Ensure chat container maintains structure during loading */
.group_chat_container {
    position: relative;
}

/* Chat Messages - No animations or transitions */
.chat_msg {
    display: flex;
    margin-bottom: 15px;
    /* No animations or transitions to prevent any visible movement */
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.chat_msg.send_chat {
    justify-content: flex-end;
}

.chat_msg.received_chat {
    justify-content: flex-start;
    gap: 10px;
}

.chat_msg figure {
    margin: 0;
    flex-shrink: 0;
}

.chat_msg figure img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat_msg > div {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.chat_msg.send_chat > div {
    align-items: flex-end;
}

.chat_msg.received_chat > div {
    align-items: flex-start;
}

.chat_box {
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.4;
}

.chat_msg.send_chat .chat_box {
    background: #F9941F;
    color: #fff;
    padding: 12px 16px;
    border-radius: 16px 16px 0 16px;
    font-size: 16px;
    font-weight: 400;
    color: #FFFFFF;
    font-family: 'Poppins';
}

.chat_msg.received_chat .chat_box {
    background: #F5F6F7;
    color: #0C1F28;
    border-radius: 16px 16px 16px 0;
    font-size: 16px;
    font-family: 'Poppins';
    font-weight: 400;
}

.chat_msg .chat_box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.chat_image_container {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.chat_image {
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

/* ================================================ */
.search_btn{
    background: none;
    position: absolute;
    right: 15px;
    top: 15px;
}
.search_btn i{
    color: #051828;
    
}
.search_btn i:before{
    font-size: 20px;
}
.search_group{
    position: relative;
}
.search_header .form-control {
    border-radius: 16px;
    border: 1px solid #ddd;
    padding: 14px 15px;
    font-size: 12px;
    width: 100%;
    line-height: 20px;
    font-weight: 400;
    font-family: 'Poppins';
    color: #3D454D;
}
.search_group .btn.btn-link {
    position: absolute;
    right: 15px;
    top: 14px;
}
ul.group_chat_listing {
    padding-left: 0;
    margin-top: 0;
}

.group_chat_listing .list_items.unread_msg .chat_desc{
    font-size: 16px;
    color: #0C1F28;
}
.chat_details figure{
    position: relative;
}

/* .chat_details figure:before {
    content: '';
    width: 14.8px;
    height: 14.8px;
    border: 2px solid #ffffff;
    background: #E6E8EA;
    position: absolute;
    border-radius: 50%;
    right: 0;
    bottom: 0;
}


.active_user .chat_details figure:before{
    background: #37B853;
} */

.group_chat_container.active .chat_details figure:before{
    background-color: #37B853;
    width: 11px;
    height: 11px;
}
.group_chat_container .chat_header figure img{
    width: 40px;
    height: 40px;
}
.group_chat_container .chat_time {
    font-size: 12px;
    color: #3D454D;
    margin-top: 0;
    padding: 0;
    font-family: 'Poppins';
    font-weight: 400;
}

.chat_footer .btn-link.send_btn{
    background: #F9941F;   
    width: 48px;
    height: 48px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    color: #ffffff;
}

.page-id-2000 .ast-container {
    max-width: 100%;
    padding: 0;
}
.page-id-2000 .elementor.elementor-2000 > div{
    margin: 0 ;
    padding: 0;
}


.page-id-2000 .elementor.elementor-2000 > div > div{
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.single_banner {
    padding: 9px 35.5px;
}

@media (max-width: 768px) {
    .chat_image {
        max-width: 200px;
        max-height: 200px;
    }
}

.chat_time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    padding: 0 5px;
}

/* Chat Footer */
.chat_footer {
    padding: 16px 24px;
    border-top: 1px solid #E6E8EA;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat_footer .input_box {
    width: calc(100% - 58px);
}

.input_box input.form-control {
    font-size: 16px;
    font-family: 'DM Sans';
    color: #58646f;
    line-height: 22px !important;
    height: auto;
    padding: 12px 16px !important;
    font-weight: 500;
    background: #F5F6F7 !important;
    border: 1px solid #E6E8EA;
    border-radius: 8px !important;
}


.chat_footer .form-control {
    border: none;
    background: transparent;
    padding: 10px 5px;
    flex: 1;
    font-size: 14px;
}

.chat_footer .form-control:focus {
    outline: none;
    box-shadow: none;
}

.chat_footer .file_attachment {
    cursor: pointer;
    color: #666;
    padding: 5px;
    display: flex;
    align-items: center;
}

.chat_footer .file_attachment input {
    display: none;
}

.chat_footer .btn-link {
    color: #007bff;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat_footer .btn-link:hover {
    opacity: 0.8;
}

/* No Messages / No Conversations */
.data_not_found {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

#no_groups_chat_found {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

a.back_chat_list {
    display: none;
}

.chat_footer .btn-link.send_btn i{
    font-size: 20px;
}


/* Responsive Styles */
@media (max-width: 768px) {
    .group_chat_main {
        flex-direction: column;
        /* height: calc(100vh - 100px); */
        margin: 0 15px;
        position: relative;
        overflow: hidden;
    }
    
    .group_chat_sidebar {
        width: 100%;
        max-height: 50vh;
    }
    
    .group_chat_container {
        min-height: 50vh;
    }
    
    .chat_header .back-to-listing {
        display: none !important; /* Keep hidden even on mobile - no back button needed */
    }
    
    .chat_msg > div {
        max-width: 85%;
    }
    .group_chat_container{
        position: absolute;
        right: -100%;
        transition: 0.3s ease;
    }
    .group_chat_container.active {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        display: flex;
        transition: 0.3s ease;
        height: calc(100vh - 224px);
    }
    a.back_chat_list {
        text-decoration: none !important;
        color: #000000;
        display: inline-block;
    }
}

/* Loading State */
.chat_body.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Scrollbar Styling */
.chat_body::-webkit-scrollbar,
.group_chat_listing::-webkit-scrollbar {
    width: 6px;
}

.chat_body::-webkit-scrollbar-track,
.group_chat_listing::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat_body::-webkit-scrollbar-thumb,
.group_chat_listing::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat_body::-webkit-scrollbar-thumb:hover,
.group_chat_listing::-webkit-scrollbar-thumb:hover {
    background: #555;
}

