
.js_chat-messages {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: 100%;
    height: calc(100vh - 247px);
    overflow-y: auto;
    margin-bottom: 9px;
}

.js_chat-message.js_receiver {
    align-self: flex-start;
    background-color: #F2F2F2;
    margin-right: auto;
}

.js_chat-message {
    width: 79%;
    max-width: 79%;
    display: flex;
    flex-direction: column;
    padding: 9px 9px;
    border-radius: 9px;
    box-shadow: unset;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    gap: 5px;
}

.js_message-header {
    font-size: 10px;
}

/* Sender messages (right side) */
.js_chat-message.js_sender {
    align-self: flex-end;
    background-color: #585191;
    color: white;
    margin-left: auto;
}

.js_message-attachments {
    margin-bottom: 5px;
}

.js_chat-message.js_unread {
    background: #C97C5D;
}

/* File Upload Area Styles */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 9px;
    padding: 9px;
    margin: 0px 0;
    text-align: center;
    background: #FFF;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-upload-area:hover {
    border-color: #52b787;
    background: #e7fff4;
}

.file-upload-area.drag-over {
    border-color: #52b787;
    background: #e7fff4;
    transform: scale(1.02);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.file-upload-icon svg {
    height: 18px;
    width: auto;
}
.file-upload-icon {
    font-size: unset;
    color: black;
}

.file-upload-text {
    font-size: 9px;
    color: #666;
}

.file-select-button {
    background: none;
    border: none;
    color: #52b787;
    text-decoration: underline;
    cursor: pointer;
    font-size: 9px;
    padding: 0;
    margin-left: 0px;
}

.file-upload-info {
    font-size: 9px;
    color: #888;
    margin-top: 5px;
}

/* Selected Files Display */
.selected-files {
    display: none;
    background: white;
        border: 0px solid #F2F2F2;
        border-radius: 4px;
        padding: 18px;
        margin: 0;
        position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 650px;
z-index: 99999;
}

.selected-files-header {
    font-weight: normal;
    font-family: 'Avenir-Heavy';
    margin-bottom: 8px;
    color: black;
    font-size: 14px;
}

.selected-file-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.selected-file-item:last-child {
    border-bottom: none;
}

.file-icon svg {
    height: 14px;
}

.file-icon {
    font-size: 16px;
    margin-right: 8px;
}

.file-name {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.file-size {
    font-size: 11px;
    color: #666;
    margin-left: 8px;
}

.remove-file-btn {
    background: #C97C5D;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button.js_toggle-read-status {
    font-size: 12px;
    padding: 6px 7px 3px 7px;
    border-radius: 3px;
    color: black;
    background: #FFF;
    display: table;
    border: 0;
    font-family: 'Avenir-Heavy';
}

.js_message-actions {
    position: absolute;
    bottom: 5px;
    right: 9px;
}

.js_unread .js_message-header {
    color: white;
}

.js_unread .js_message-content {
    color: white;
}

.remove-file-btn:hover {
    background: #b32d2e;
}

.attachment-item {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 8px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    border: 0px solid #e0e0e0;
}

.attachment-item:last-child {
    margin-bottom: 0;
}

/* Image Attachments */
.image-attachment {
    flex-direction: column;
    align-items: flex-start;
}

.attachment-thumbnail {
    max-width: 200px;
    max-height: 150px;
    border-radius: 3px;
}

/* File Attachments */
.file-attachment .attachment-icon {
    font-size: 20px;
    margin-right: 10px;
    width: 24px;
}


.attachment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attachment-name {
    font-size: 12px;
}

.attachment-size {
    display: none;
}

/* Message Content Updates */
.js_message-content {
  font-size: 16px;
  line-height: 26px;
    word-wrap: break-word;
}

.js_sender .js_message-notified, .js_unread .js_message-notified {
    color: white;
}

.js_message-notified {
    margin-bottom: 0px;
    font-size: 12px;
    color: #666;
    font-style: normal;
}

/* Notification Selector Styles */
.notification-selector {
    border-radius: 4px;
    margin: 18px 0 0 0;
}

.group-buttons {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-select-btn {
  font-size: 12px;
  padding: 6px 7px 3px 7px;
  border-radius: 3px;
  color: black;
  background: #F2F2F2;
  display: table;
  border: 0;
  font-family: 'Avenir-Heavy';
  cursor: pointer;
}

#select-all-btn {
    background: #52b787;
    color: white;
}

#clear-all-btn {
  background: #c97c5d;
  color: white;
}

.user-checkboxes {
    max-height: 250px;
    overflow-y: auto;
    background: white;
}

.user-group {
    margin-bottom: 18px;
}

.user-group h4 {
    margin: 0 0 9px 0;
    color: black;
    font-size: 12px;
    font-weight: 400;
    font-family: 'Avenir-Heavy';
    border-bottom: 1px solid black;
    padding-bottom: 3px;
}

.user-checkbox {
    display: block;
    margin: 8px 0;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
}

.user-checkbox:hover {
    background-color: #e7fff4;
    border-radius: 4px;
}

.user-checkbox input {
    margin-right: 10px;
}

/* Form Controls */
#js_chat-message {
    /* width: 100%; */
    height: 120px;
    width: 100%;
    border: 0;
    padding: 17px 15px 12px 15px;
    border-radius: 10px;
    font-family: 'Avenir-Roman';
    font-size: 17px;
    outline: none;
    z-index: 99999;
    position: relative;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    background: #f2f2f2;
    /* padding: 10px; */
    /* border: 1px solid #ddd; */
    /* border-radius: 4px; */
    resize: none;
    /* font-family: inherit; */
    /* font-size: 14px; */
    /* margin-bottom: 10px; */
}

/*
#js_chat-message:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}
*/

#js_send-message {
    background: #52b787;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    font-family: 'Avenir-Heavy';
}

#js_send-message:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.js_chat-container-wrapper {
    position: absolute;
    top: 4px;
    z-index: 99999;
    width: 1100px;
    left: 50%;
    transform: translate(-50%, 0px);
    display: none;
    height: calc(100vh - 45px);
}


.js_employee-chat-container {
    max-width: unset;
    margin: 0;
    border: unset;
    border-radius: 9px 0 9px 9px;
    background: #fff;
    box-shadow: unset;
    padding: 9px;
    height: calc(100vh - 100px);
}

#chat-footer-notifications {
  display: none !important;
}

#chat-footer-notifications {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background-color: #f8f8f8 !important;
    border-top: 2px solid #ca4a1f !important;
    padding: 12px 20px !important;
    display: none !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 999999 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

#chat-footer-notifications.show {
    display: flex !important;
}

.chat-notification-message {
    font-size: 14px !important;
    color: #333 !important;
    font-weight: 500 !important;
}

.chat-notification-count {
    display: inline-block !important;
    background-color: #ca4a1f !important;
    color: white !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    text-align: center !important;
    line-height: 24px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    margin-left: 8px !important;
}

.chat-notification-actions {
    display: flex !important;
    gap: 10px !important;
}

.chat-notification-actions a {
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}

.chat-notification-view {
    background-color: #2271b1 !important;
    color: white !important;
}

.chat-notification-view:hover {
    background-color: #135e96 !important;
    color: white !important;
}

.chat-notification-dismiss {
    background-color: #f1f1f1 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.chat-notification-dismiss:hover {
    background-color: #e5e5e5 !important;
    color: #333 !important;
}

/* Add padding to body when notification is visible */
body.has-chat-notification {
    padding-bottom: 60px !important;
}

#chat-footer-notifications {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background-color: #f8f8f8 !important;
    border-top: 2px solid #ca4a1f !important;
    padding: 12px 20px !important;
    display: none !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 999999 !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

#chat-footer-notifications.show {
    display: flex !important;
}

.chat-notification-message {
    font-size: 14px !important;
    color: #333 !important;
    font-weight: 500 !important;
}

.chat-notification-count {
    display: inline-block !important;
    background-color: #ca4a1f !important;
    color: white !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    text-align: center !important;
    line-height: 24px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    margin-left: 8px !important;
}

.chat-notification-actions {
    display: flex !important;
    gap: 10px !important;
}

.chat-notification-actions a {
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}

.chat-notification-view {
    background-color: #2271b1 !important;
    color: white !important;
}

.chat-notification-view:hover {
    background-color: #135e96 !important;
    color: white !important;
}

.chat-notification-dismiss {
    background-color: #f1f1f1 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.chat-notification-dismiss:hover {
    background-color: #e5e5e5 !important;
    color: #333 !important;
}

/* Add padding to body when notification is visible */
body.has-chat-notification {
    padding-bottom: 60px !important;
}

.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ca4a1f;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    margin-left: 5px;
    position: relative;
    top: -1px;
}

.recent-chats-list {
    margin: 0;
    padding: 0;
}

.recent-chats-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.recent-chats-list li:last-child {
    border-bottom: none;
}

.message-sender {
    font-weight: bold;
}

.message-time {
    color: #888;
    font-size: 11px;
}

.message-context {
    display: block;
    margin-top: 3px;
    color: #777;
}

.chat-widget-footer {
    margin: 10px 0 0;
    text-align: right;
}

.global-chat-notifications-widget {
    background: #fff;
    border: 0px solid #ddd;
    border-radius: unset;
    padding: 0 9px;
    margin-bottom: unset;
    position: relative;
}

.widget-header {
    position: absolute;
    right: -8px;
    top: -44px;
}

.widget-header h3 {
    margin: 0;
    font-size: 18px;
}

.unread-badge {
    background: #c97c5d;
    color: white;
    padding: 3px 8px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: normal;
    font-family: 'Avenir-Heavy';
    height: 22px;
    width: 22px;
    position: relative;
}

.unread_badge_count {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    font-size: 12px;
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1px #F2F2F2;
    border-bottom-style: dashed;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {

}

.notification-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: black;
    margin-bottom: 0px;
}

.notification-meta .sender {
    font-weight: normal;
    color: black;
}

.notification-message {
    color: black;
    margin-bottom: 0px;
}

.notification-context {
    font-size: 12px;
}

.notification-center .context-link {
    font-size: 12px;
    padding: 6px 7px 3px 7px;
    border-radius: 3px;
    color: black;
    background: #F2F2F2;
    display: table;
    border: 0;
    font-family: 'Avenir-Heavy';
}

.notification-center-header {
  display: none;
}

.notification-center .notification-meta {
    font-size: 12px;
    margin-bottom: 5px;
}

.notification-center .notification-content p {
    font-size: 16px;
    line-height: 26px;
    word-wrap: break-word;
}

.notification-center .notification-actions {
  display: none;
}

.notification-center .notification-context {
    display: flex;
    justify-content: end;
}

.notification-center .notification-item {
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.no-notifications {
    text-align: center;
    padding: 20px;
    color: #666;
}

.widget-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.view-all-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

.js_message-count-icon {
    font-size: 16px;
}

.js_message-count-text {
    font-weight: 500;
}

.js_chat-message_wrap {
    display: flex;
    gap: 9px;
}

button#js_send_message_notify {
    position: relative;
    background: #F2F2F2;
    margin: 0;
    border-radius: 9px;
    float: left;
    cursor: pointer;
    border: 0;
    font-family: 'Avenir-Heavy';
}

.js_chat_whotonotify {
    display: none;
    position: absolute;
    z-index: 99999999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    width: 650px;
    padding: 18px;
    border-radius: 9px;
}

.js_chat_whotonotify_close {
    position: absolute;
    top: 6px;
    right: 4px;
    font-size: 12px;
    padding: 6px 7px 3px 7px;
    border-radius: 3px;
    color: white;
    background: #52b787;
    display: table;
    border: 0;
    font-family: 'Avenir-Heavy';
    cursor: pointer;
}

.js_send_message_notify_count_wrap {
    position: absolute;
    top: -9px;
    right: -6px;
    background: #52b787;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    text-align: center;
    line-height: 1;
    font-weight: 400;
    box-sizing: border-box;
    font-family: 'Avenir-Heavy';
}

.js_send_message_notify_count {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.js_send_file_count_wrap {
    position: absolute;
    top: -9px;
    right: -6px;
    background: #52b787;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    text-align: center;
    line-height: 1;
    font-weight: 400;
    box-sizing: border-box;
    font-family: 'Avenir-Heavy';
}

.js_send_file_count {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.selected_files_close {
    position: absolute;
    top: 6px;
    right: 4px;
    font-size: 12px;
    padding: 6px 7px 3px 7px;
    border-radius: 3px;
    color: black;
    background: #F2F2F2;
    display: table;
    border: 0;
    font-family: 'Avenir-Heavy';
    cursor: pointer;
}

.js_page-message-count {
   position: fixed;
   bottom: 30px;
   right: 140px;
   width: 70px;
   height: 70px;
   background: #585191;
   border-radius: 50%;
   cursor: pointer;
   box-shadow: 0 4px 12px rgba(0,0,0,0.15);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 99999;
   transition: transform 0.2s ease;
}

.js_loop-message-count {
    position: absolute;
    top: 9px;
    right: 125px;
    width: 50px;
    height: 50px;
    background: #585191;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: transform 0.2s ease;
}

.js_loop-message-count .js_message-count-icons svg {
    width: 15px;
    height: 15px;
    fill: white;
}

.js_loop-message-count .traffic-lights {
    position: absolute;
    right: -25px;
}    

.js_loop-message-count .traffic-light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 8px;
    font-family: 'Avenir-Heavy';
    color: white;
    transition: all 0.3s ease;
}

.js_page-message-count:hover {
   transform: scale(1.05);
}

.js_message-count-icons {
   display: flex;
   gap: 6px;
}

.js_message-count-icons svg {
   width: 20px;
   height: 20px;
   fill: white;
}

.traffic-lights {
   position: absolute;
   right: -27px;
   top: 50%;
   transform: translateY(-50%);
   display: flex;
   flex-direction: column;
   gap: 4px;
}

.traffic-light {
   width: 20px;
   height: 20px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
   font-size: 10px;
   font-family: 'Avenir-Heavy';
   color: white;
   transition: all 0.3s ease;
}

.traffic-light.red {
   background: #e74c3c;
}

.traffic-light.orange {
   background: #f39c12;
}

.traffic-light.green {
   background: #27ae60;
}

.light-count {
   position: absolute;
   top: 53%;
   left: 50%;
   transform: translate(-50%, -50%);
}

.light-label {
   position: absolute;
   left: 100%;
   margin-left: 5px;
   white-space: nowrap;
   color: #333;
   font-size: 10px;
   font-weight: normal;
   top: 50%;
   transform: translateY(-50%);
}

/* bf */

/* Responsive Design */
@media (max-width: 768px) {


    .js_chat-messages {
        height: 300px;
        padding: 10px;
    }

    .file-upload-area {
        padding: 15px;
    }

    .attachment-thumbnail {
        max-width: 150px;
        max-height: 100px;
    }

    .attachment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-attachment {
        flex-direction: row;
        align-items: center;
    }

    .group-buttons {
        gap: 5px;
    }

    .group-select-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .js_chat-messages {
        height: 250px;
    }

    .file-upload-area {
        padding: 10px;
    }

    .file-upload-content {
        gap: 5px;
    }



    .attachment-thumbnail {
        max-width: 120px;
        max-height: 80px;
    }

    .selected-file-item {
        flex-wrap: wrap;
        gap: 5px;
    }

    .group-buttons {
        flex-direction: column;
        gap: 5px;
    }
}
