::-webkit-scrollbar{
    width: 7px;
}
::-webkit-scrollbar-track{

}
::-webkit-scrollbar-thumb{
    background-color: #dfdfdf;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover{
    background-color: #b9b9b9;
}
.chat-message > div{
    -webkit-user-select: none; 
    user-select: none;
}
.chat-item > div{
    -webkit-user-select: none; 
    user-select: none;
}
.select-chat{
    width:100%;
}
.last-message{
    width: 150px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align:start;
}

.custom-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top:10px;
  padding-left:10px;
  border-radius: 10px;
  direction: ltr;
  width: 180px;
}

.custom-audio button {
  background-color: #58baff;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}
.custom-audio button > i{
    font-size:24px;
}
.custom-audio button:hover {
  background-color: #58baff;
}

.custom-audio input[type="range"] {
  -webkit-appearance: none;
  width: 80px;
  min-width:50px;
  height: 6px;
  background: #ddd;
  border-radius: 5px;
  outline: none;
}

.custom-audio input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #58baff;
  border-radius: 50%;
  cursor: pointer;
}

#time-display {
  font-size: 14px;
  color: #333;
  width: 80px;
}



.chat-container {
    width:100%;
    display:flex;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
}
.chat-list {
    width: 30%;
    border-left:1px solid #e3e3e3 ;
}
.chat-list-header{ 
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e3e3e3;
    padding: 15px;
    height:80px;
}
.chat-list-header .bx-menu{
    font-size: 24px;

}
.chat-list-header > h2 , .user-post-name{
    font-size: 20px;
    margin-right: 10px;
}
.chats{
    overflow: auto;
    height:65vh;
}
.chats form a {
    display: block;
    width: 100%;
    padding: 10px 20px;
}
.chat-item {
    border-bottom: 1px solid #e3e3e3;
    padding: 10px;
    position: relative;
}
.chat-item form{
    display: flex;
    flex-direction: column;
}
.chat-item .select-chat{
    border: none;
    background-color: #ffffff;
    padding:0;
    align-items: center;
}
.last-message , .chat-name{
    color:gray;
}
.chat-name >i{
    margin-left:5px;
}
.delete-chat-popup{
    width:fit-content;
    display: none;
    position: absolute;
    background-color: #fff;
    color: #b9b9b9;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
    z-index: 1;
    border-radius: 8px;
    padding: 10px;
    padding-left: 50px;
    bottom:0;
    left:0;
}
.chat-item .chat-post{
    display: flex;
    align-items: center;
}
.chat-item .chat-post img{
    width: 50px;
    height: 50px;
    border-radius: 5px;
}
.chat-item .chat-post .chat-post-title{
    color:#000;
    margin-right: 10px;
    text-align:right;
}
.post-details-btn .chat-post-title{
    text-align:right;
}
.chat-box {
    width: 100%;
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: calc(70vh - 200px);
    align-self: flex-start;
}
.chat-messages {
    display: flex;
    flex-direction: column;
    width: 70%;
    border-radius: 10px 0 0 10px;
}
.chat-messages .user-post-details{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e3e3e3;
    padding: 15px;
    position: relative;
    height:80px;
}
.user-post-details .bx-dots-vertical-rounded{
    font-size: 24px;
    margin-right: auto;
    cursor: pointer;
}
.post-details{
    display: none;
    align-items: center;
    padding: 10px;
    background-color: #eee;
}
.post-details-btn{
    border: none;
    display: flex;
    width: 100%;
    align-items: center;
}
.post-details img{
        width: 40px ;
        margin-left:10px;
        border-radius: 5px;
}
.block-unblock{
    display:none;
    position: absolute;
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
    z-index: 1;
    border-radius: 8px;
    left: 40px;
    top: 40px;
}

.block-user{
    border: none;
    cursor: pointer;
    background-color: #ffffff00;
    padding: 10px;
    padding-left:20px;
    color: #b9b9b9;
    text-align: left;
    display: none;
    align-items: center;
}
.unblock-user{
    border: none;
    cursor: pointer;
    width: 30%;
    background-color: var(--charsoogh-main);
    padding: 10px;
    padding-left: 20px;
    color: #fff;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
}
.blocked-container{
    display:none;
    justify-content: space-between;
    width: 100%;
    padding:20px;
    align-items: baseline;
}
.block-user i, .unblock-user i{
    font-size: 22px;
    margin-left: 10px;
}
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    word-wrap: break-word;
    white-space: normal;
    padding: 10px;
    margin:10px 0;
    position: relative;
}

.chat-message::first-child {
    margin-top: 40px !important;
}
.chat-message .message-content .chat-image{
    display:block;
}
.sent {
    color: #2b2c2d;
    background-color: #f0faff;
    border-radius: 10px 0 10px 10px;
    align-self: flex-start;

}
.received {
    color: #2b2c2d;
    margin-right: auto;
    border-radius: 0 10px 10px 10px;
    background-color: #e3e3e3;

}

.sent.audio-message {
    background-color:#ffffff;
    padding:0;
}
#send-message-form {
    display: flex;
    flex:1;
    flex-flow: row-reverse;
}
.send-message-container{
    display:none;
    align-items:center;
    flex: 1;
    width:100%;
}
.send-message-form .submit-button , #record-btn  , .upload-icon{
    width: 40px;
    height: 40px;
    margin: 5px;
    padding: 15px;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: #ffffff;
    color: gray;
    transition: all 0.3s;
    border-radius: 50%;
}
.send-message-form .submit-button{
    display: none;
}
.send-message-form .submit-button i , #record-btn>i , .upload-icon I{
    font-size: 20px;
}
.send-message-form .submit-button.active{
    background-color:  var(--charsoogh-main);
    color: #ffffff;
}
.send-message-form input#message_content{
    width: 90%;
}
.update-button{
    font-size: 20px;
    background-color:  var(--charsoogh-main);
    color: #fff;
    border-radius: 50%;
    padding: 10px;
}
.no-chats {
    font-style: italic;
    color: red;
}
.back-to-chats{
    display: none;
}
.empty_list , .no-message{
    align-self: center;
    margin: auto;
    color: #b9b9b9;
}
.chat-info{
    display: flex;
    justify-content: space-between;
    margin-top:10px;
}

.lastMessageRead{
   display:flex;
   justify-content:space-between;
}
.unread-count{
    background-color: var(--charsoogh-main);
    border-radius: 50%;
    margin: 5px;
    padding: 5px;
    color: #fff;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-time{
    color: #b9b9b9;
}
.message-seen i{
    color: rgb(38, 182, 38);
    font-size: 18px;
}
.message-not-seen{
    font-size: 18px;
    color: #b9b9b9;
}
.delete-edit{
    width: 100px;
    display: none;
    flex-direction: column;
    position: absolute;
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
    border-radius: 8px;
    z-index: 1;
    top: 0;
    right: 100%;
   
}
.chat-message.received .delete-edit{
    top: 0;
    right: -100px;
}
.show{
    display:flex;
    animation: fadeout 0.5s !important;
    opacity: 1;  
}
.show-block{
    display:block;
    animation: fadeout 0.5s !important;
    opacity: 1; 
    transform: scale(1)
}
@keyframes fadeout{  
    0% {  
        opacity: 0;
        transform: scale(0.8)
    }
    100% {  
        opacity: 1;
        transform: scale(1)
    }
    
} 
 
.delete-edit .delete-button , .edit-button ,.copy-button , .reply-button , .resend , .deleteBtn{
    width: 100%;
    background-color: #ffffff00;
    border: none;
    text-align: right;
    padding: 10px;
    color: #b9b9b9;
    display: flex;
    align-items: center;
}
.delete-edit-icons{
    font-size: 18px;
    margin-left: 10px;
}
.delete-button , .edit-button ,.copy-button  , .deleteBtn{
    border-bottom: 1px solid #e3e3e3 !important;
}




.modal-for-delete {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index:999;
}

.modal-content-delete {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 50% !important;
    text-align: center;
}

.modal-actions button {
    margin: 10px;
    border:2px #c1c1c1;
    width:100px;
    padding:10px 15px;
}
.edited-message{
    color:#85c4e3;
    display:inline-block;
    font-size:12px;
    margin-left: 5px;
}
.reply-to{
    display:flex;
    padding: 10px 20px;
    height:70px;
    justify-content:space-between;
    align-items:center;
    border-top:1px solid #e3e3e3;
    border-bottom:1px solid #e3e3e3;
    margin-bottom:5px;
}
.reply-to>div{
    display:flex;
    align-items:center;
    width:80%;
}
.reply-to .bx-reply{
    color:#85c4e3;
    font-size: 34px;
}
.reply-to .bx-x{
    font-size: 34px;
    color:#b9b9b9;
}
.reply-to .content-reply{
    width:150px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.content-message-replay .title{
    color:#85c4e3;
}
.show-message-reply{
    background-color:#cbeeff;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
    border-left:3px solid #6fcaf7;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.show-message-reply p{
    margin:0;
    font-weight: bold;
}
.login-user{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-user>i{
    font-size:48px;
    border-radius:50%;
    padding:10px;
    background-color:gray;
    color:#fff;
}
.login-user h3{
    margin-top:20px;
    font-size:2rem;
}
.login-user .login{
    margin-top:30px;
    background-color: var(--charsoogh-main);
    color:#fff;
    padding:10px 30px;
    border-radius:10px;
    text-decoration:none;
    font-weight:bold;
    font-size:1.5rem;
    display:flex;
    align-items:center;
}
.login-user .login>i{
    margin-right:10px;
    font-size:20px;
}
.unread-message{
    width: 10px;
    height: 10px;
    background-color: var(--charsoogh-main);
    border-radius: 50%;
    margin-left:5px;
}
.chat-time{
    display:flex;
    align-items: baseline;
}
#record-btn {
    display:flex;
     -webkit-user-select: none; 
    user-select: none;
    -webkit-touch-callout: none;
}
@keyframes scaleBtn{
    0%{
        transform : scale(1);
    }
    100%{
        transform : scale(1.2);
    }
}
#record-btn.recording {
  color:#fff;
  background-color: #e64a19;
  transform : scale(1.2);
  animation: scaleBtn 0.5s !important;
}
.send-message-container #cancel-text , #send-cancel-voice{
    display: none;
}
#cancel-text{
    display:none;
    align-items : center;
    color:gray;
    padding-right:50px;
}
#cancel-text i{
    font-size:20px;
}
.audio-message {
  margin: 10px 0;
}
#send-cancel-voice{
    align-items:center;
    justify-content:right;
}
#cancel-btn , #send-btn{
    width:40px;
    font-size:18px;
    border:none;
    color:#fff;
    background-color: var(--charsoogh-main);
    border-radius:50%;
    width: 40px;
    height: 40px;
    margin: 5px;
    padding: 15px;
    align-items: center;
    justify-content: center;
    display:none;
    
}
#cancel-btn{
    background-color:#ffd4d4;
    color:red;
    
}
#section-record{
    display:flex;
}
#section-record #record-btn{
    display:flex;
    overflow:hidden;
}
#section-record #record-btns{
    overflow:hidden;
}
#section-record #recoding-btns{
    overflow:hidden;
    display:none;
}
#section-record.activeRecording{
    
}

#section-record:not(.activeRecording) #record-btns{
    width:50px;
    display:flex;
    animation:recordTrashwidthReverce 0.5s forwards !important;
}
#section-record:not(.activeRecording) #recoding-btns{

    width:50px;
    display:none;
    animation:trashwidthReverce 0.5s forwards !important;
}
#section-record.activeRecording #record-btns{
    display:none;
    width:0px;
    animation:recordTrashwidth 0.5s forwards !important;
}

#section-record.activeRecording #recoding-btns{
    display:flex;
    
    width:100px;
    animation:trashwidth 0.5s forwards !important;
}

#section-record.activeRecording #recoding-btns #send-btn, 
#section-record.activeRecording #recoding-btns #cancel-btn {
    display:flex;
    /*animation:fade 0.6s forwards !important;*/
}
#trash{
    overflow:hidden;
}
@keyframes fade{
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}


@keyframes recordTrashwidth{
    0%{
        width:50px;
        display:flex;
        opacity: 1;
    }
    99%{
        width:0px;
        display:flex;
        opacity: 0;
    }
    100%{
        width:0px;
        display:none;
    }
}
@keyframes recordTrashwidthReverce{
    0%{
        width:0px;
        display:none;
    }
    1%{
        width:0px;
        display:flex;
          opacity: 0;
    }
    100%{
        width:50px;
        display:flex;
        opacity: 1;
    }
}



@keyframes trashwidth{
    0%{
        width:0px;
        display:none;
    }
    1%{
        width:0px;
        display:flex;
          opacity: 0;
    }
    100%{
        width:100px;
        display:flex;
        opacity: 1;
    }
}
@keyframes trashwidthReverce{
    0%{
        width:100px;
        display:flex;
        opacity: 1;
    }
    99%{
        width:0px;
        display:flex;
        opacity: 0;
    }
    100%{
        width:0px;
        display:none;
    }
}
    
.send-message-container.recordingMobile{
}
.send-message-container.recordingMobile #send-message-form , .send-message-container.recordingMobile .upload-icon{
    display:none;
}
.send-message-container.recordingMobile #cancel-text{
    display:flex;
}




.custom-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
}

.play-pause {
    cursor: pointer;
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
}

.progress-bar {
    flex-grow: 1;
    height: 5px;
    background-color: #e0e0e0;
    position: relative;
    cursor: pointer;
}

.progress {
    height: 100%;
    width: 0;
    background-color: #007BFF;
    transition: width 0.1s linear;
}

.time {
    font-size: 12px;
    color: #555;
}








.chat-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin: 5px 0;
}
.modal-img{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index:1000;
}
#confirmation-modal{
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    z-index:10000;
}

.upload-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px; 
    height: 50px;
    border-radius: 50%; 
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.modal-img #confirm-send{
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    color: #fff;
    background-color: #d70000;
}
.modal-img #message-text{
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    padding: 10px 15px;
    flex: 1;
    margin-left: 5px;
    background-color: #e3e3e3;
}
.modal-img .send-caption{
    display:flex;
    margin-top:5px;
}
.modal-img .model-img-header{
    display:flex;
    justify-content: space-between;
}
.modal-img .model-img-header #cancel-send{
    font-size:22px;
}



/* استایل پاپ‌آپ */
.popup {
    display: none; /* پنهان به‌طور پیش‌فرض */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* پس‌زمینه تیره */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* تصویر داخل پاپ‌آپ */
.popup-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* دکمه بستن پاپ‌آپ */
.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.popup-close:hover {
    color: #ff6666;
}

@media (max-width: 768px){
    .chat-messages{
        width: 100%;
    }
    .chat-list{
        width: 100%;
        border-left:none;
    }
    .back-to-chats{
        display: block;
    }
    .back-to-chats i{
        font-size: 28px;
    }
    .chat-container{
        height: 80vh;
    }
    .empty_list{
        display:none;
    }
    .modal-content-delete {
         width: 70% !important;
    }
}


/* the pagination message loading in box */

.spinner {  
    border: 4px solid #f3f3f3; /* Light grey */  
    border-top: 4px solid #3498db; /* Blue */  
    border-radius: 50%;  
    width: 30px; /* Size of the spinner */  
    height: 30px; /* Size of the spinner */  
    animation: spin 1s linear infinite; /* Animation */  
    margin:0 auto;
}  
@keyframes spin {  
    0% { transform: rotate(0deg); }  
    100% { transform: rotate(360deg); }  
}  