.chat_message > .col-inner{
    padding-left: 15px !important;
    padding-right: 15px !important;
    border-radius: 10px;
    font-size: 14px;
    max-width:80%;
}
.chat_gallery_container .box-image img,
.chat_product_gallery_container .box-image img{
    border-radius: 5px;
}
.chat-restriction-alert{
    margin-top:10px;
}
.close-chat-restriction{
    margin-top: 10px;
    display: block;
    font-weight: 800;
    color: #000;
    font-size:12px;
    text-decoration: underline;
}
.chat_gallery_container > .col-inner{
    width:60% !important;
    padding:0px !important;
}
.create-product-bottom-chat{
    background-color: #f2f2f2;
    padding-top: 20px;
}
.chat_product_gallery_container{
    padding:0px !important;
}
.chat_product_gallery_container .gallery-col > .col-inner{
    padding-bottom:5px;
}
.chat_gallery_container.gallery_reciver > .col-inner{
    float:right;
}
.chat_gallery_container.gallery_sender > .col-inner{
    float:left;
}
.user_chat_containers:first-child{
    border-top:1px solid #f2f2f2;
}
.chat_form_container .af-field{
    padding-bottom:0px !important;
    margin-top:5px;
}
.chat_form_container .acf-form{
    margin-bottom:0px;
}
.user_chat_containers .profile_content.unread:after{
    content: "";
    position: absolute;
    top: 10px;
    right: -20px;
    width: 12px;
    height: 12px;
    background-color: #8c0327;
    border-radius: 500px;
    opacity: 0.8;
}
.woocommerce-account .chat_user_header .profile_image .img-inner{
    overflow:visible !important;
}
.woocommerce-account .chat_user_header .profile_image img{
    box-shadow: 1px 1px 0px -4px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);
    z-index: 999;
}
.woocommerce-account .chat_user_header .profile_image{
    padding-left:5px;
    padding-right:5px;
}
.chat_message.chat_has_line_breaks .col-inner{
    border-radius: 15px;
}
.chat_user_header{
    padding-top:5px;
    padding-bottom:5px;
}
.chat_container_section .chat_message.product .product-purchase{
    padding-top:10px;
    border-top: 1px solid #f2f2f2;
}
.chat_container_section .chat_message.product .product-content{
    padding-top:10px;
    /* Let the description fit the card, including narrow chats and long words. */
    min-width:0;
    overflow-wrap:anywhere;
}
.chat_container_section .chat_message.product .product-header{
    border-bottom: 1px solid #f2f2f2;
    background-color: #f2f2f2;
    padding-top:10px;
}
.chat_container_section .chat_message.product > .col-inner{
    padding:0px !important;
}
.chat_container_section .chat_message.product .product-attached{
    list-style: none;
}
.mfp-iframe-scaler video{
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 8px rgb(0 0 0 / 60%);
    background: black;
}
.chat_container_section .chat-video-containers .video-button-wrapper.converting{
    padding: 5px;
    background-color: rgb(255 255 255 / 80%);
    color: #000;
    margin-left: -1px;
}
.chat_container_section .chat-video-containers > .col{
    padding-bottom:5px !important;
}
.chat_container_section .chat-video-containers .video-container{
    border-radius: 10px;
    overflow: hidden !important;
}
.chat_message.product .see-chat-order{
    float:right;
    font-size:12px;
}
.chat_message.product .chat_product_purchased{
    font-size: 12px;
    color: #7a9c59;
}
.chat_container_section .chat_message.product .product-attached li:before {
    content: '✓';
    font-weight: 800;
    margin-left: -10px;
    margin-right: 10px;
}
.chat_container_section .chat_message.product .product-sender{
    display: block;
    font-size: 12px;
    opacity: 0.5;
    margin-left: 5px;
}
.chat_container_section .chat_message.product .chat-product-container{
    padding-top:0px !important;
    border:1px solid #f2f2f2;
    padding: 5px 15px 5px 15px;
    border-radius: 10px;
    overflow: hidden;
}
.video-inner-container > .col-inner{
    padding: 0 2px 3px !important;
}
.chat-product-container .chat_gallery_container > .col-inner{
    width:100% !important;
}
.chat_container_section.no-message-to-show{
    background-color:#f2f2f2;
}
.chat_messages_container .no-message-to-show{
    padding-top:30px;
}
.chat_messages_container > .col{
    padding-bottom:10px;
}
.chat_messages_container{
    padding-bottom:0px;
    padding-top:30px;
    max-height:450px;
    min-height:450px;
    overflow-y: auto;
}
.extra-options li{
    float: left;
    margin-right: 20px;
}
.chat_message{
    padding-bottom:5px;
    margin-top:5px;
}
.sender_user_comment > .col-inner{
    display:inline-block;
    float:left;
    width:auto;
}
.current_user_comment > .col-inner {
    display: inline-block;
    float: right;
    width: auto;
}
.comment_viewed_time span{
    font-size:10px;
    opacity: 0.5;
    margin-top:-7px;
    margin-right:-7px;
    display:block;
}
.comment_viewed_time > .col-inner{
    padding-left:0px !important;
}
.chat_user_image img{
    width:40px;
}
.chat_message p:only-child{
    margin-bottom:0px !important;
}
.chat_container_section .wp-editor-tools{
    display:none !important;
}
.chat_container_section{
    border:1px solid #f2f2f2;
}
.user_chat_containers .sended{
    position: absolute;
    display: block;
    right:0px;
    bottom:10px;
    font-size:12px;
}
.user_chat_containers .sended.unread{
    font-weight: 700;
}
.user_chat_containers{
    padding-bottom:0px;
    border-bottom:1px solid #f2f2f2;
    border-left:1px solid #f2f2f2;
}
.user_chat_containers.user_chat_current{
    background-color:#f2f2f2;
}
.user_chat_containers .row .col,
.user_chat_containers .row .col p{
    padding:0px;
    margin:0px;
}
.user_chat_containers .row .col p{
    padding:0px;
    margin:0px;
}

.user_chat_containers .profile_content.read p{
    color:#000;
    opacity: 0.8;
}

.user_chat_containers .profile_content.unread p{
    color:#000;
    font-weight: 700;
    opacity: 0.8;
}
.user_chat_containers .profile_content.unread .comment_content{
    font-size:12px;
    color:#000;
    font-weight: 700;
}
.user_chat_containers .profile_content.read .comment_content{
    font-size:12px;
    color:#000;
    opacity: 0.6;
}


.user_chat_containers .profile_content .col-inner{
    padding:10px;
    margin-top:10px;
}
.user_chat_containers .profile_image .col-inner{
    padding:15px !important;
}

.hide-this-field{
    display:none !important;
}
.date_for_messages{
    text-align: center;
    color:#828282;
    font-size:12px;
    padding-bottom:10px;
    padding-top:10px;
}
.chat_form_container .acf-label{
    display:none !important;
}
.chat_form_container{
    border-top:1px solid #f2f2f2;
}
.chat_user_header{
    border-bottom:1px solid #f2f2f2;
}
.chat_user_header .online-status{
    text-align: center;
    margin-bottom: 10px;
    font-size: 12px;
    margin-top: -5px;
    display: table;
}
.chat-textarea textarea{
    height: 39px;
    line-height: 24px;
    min-height: 39px;
    overflow-y: hidden; /* fixes scrollbar flash - kudos to @brettjonesdev */
    padding-top: 1.1em; /* fixes text jump on Enter keypress */
    border: none;
    overflow: auto;
    outline: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    resize: none !important;
    background-color: #e3e6ea;
    border-radius: 10px;
    padding-top:10px !important;
    padding-bottom:10px !important;
    padding-left:10px !important;
}
.chat-profile-name{
    white-space: nowrap;
}
.wp-editor-tools{
    display:none;
}
@media only screen and (max-width: 600px) {
    .chat-outer-container.active-chat .chat-sidebar-profiles{
        display:none !important;
    }
    .user_action_buttons a{
        margin-right:0px;
    }
    body:not(.author) .chat-outer-container.no-active-chat .chat_container_section{
        display:none !important;
    }
    .author-chat-system .author_sidebar,
    .author-chat-system .author_cover_image{
        display:none;
    }
    .user_chat_containers.user_chat_current{
        background-color:#fff;
    }
    .chat_message > .col-inner{
        max-width:90%;
    }
    .chat_gallery_container > .col-inner{
        width:90% !important;
    }
    .my-account-chat-system .page-wrapper{
        padding-top:0px !important;
    }
    .my-account-chat-system .my-account-sidebar,
    .my-account-chat-system .back-to-controlpanel{
        display:none !important;
    }
}

/* Chat Pagination Styles */
.chat-loading-indicator {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 10px;
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.chat-loading-indicator .icon-spinner {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

.chat-no-more-messages {
    background-color: rgba(240, 240, 240, 0.8);
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    margin: 10px;
    padding: 15px;
    text-align: center;
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* Animation for spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure chat container has proper scroll behavior */
.chat_messages_container {
    max-height: 400px;
    overflow-y: auto;
}

/* Smooth transition for new messages */
.chat_message {
    transition: opacity 0.3s ease-in-out;
}

.chat_message.newly-loaded {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
