 body {
     font-family: Arial, sans-serif;
     height: auto !important;
     min-height: 100vh;
 }

 footer {
     bottom: 0 !important;
     position: fixed;
 }

 .chat-container {
     width: 100%;
     max-width: 400px;
     margin: auto;
     background: transparent;
     border-radius: 8px;
     padding: 10px;
     margin-top: 0px;
 }

 /* User Tabs Container */
 .user-tabs {
     display: flex;
     overflow-x: auto;
     /* Enables horizontal scrolling */
     white-space: nowrap;
     /* Prevents text from wrapping */
     border-bottom: 2px solid #ccc;
     padding-bottom: 5px;
     margin-top: 5px;
     scrollbar-width: thin;
     /* For Firefox */
     scrollbar-color: #053e8b #f1f1f1;
     /* Thumb and track color */
 }

 /* Custom scrollbar for Webkit browsers (Chrome, Edge, Safari) */
 .user-tabs::-webkit-scrollbar {
     height: 6px;
     /* Adjust scrollbar height */
 }

 .user-tabs::-webkit-scrollbar-track {
     background: #f1f1f1;
     /* Light gray background */
     border-radius: 5px;
 }

 .user-tabs::-webkit-scrollbar-thumb {
     background: #053e8b;
     /* Blue thumb */
     border-radius: 5px;
 }

 .user-tabs::-webkit-scrollbar-thumb:hover {
     background: #f72e1f;
     /* Red thumb on hover */
 }

 /* Style for user tab buttons */
 .user-tab {
     flex: 0 0 auto;
     display: flex;
     align-items: center;
     padding: 10px;
     cursor: pointer;
     transition: background 0.3s;
     border-radius: 5px;
     margin-right: 5px;
     user-select: none;
 }

 .user-tab img {
     width: 30px;
     height: 30px;
     border-radius: 50%;
     margin-right: 5px;
 }

 /* Active User Tab */
 .user-tab.active {
     background: #053e8b;
     color: white;
 }


 .user-tab.active {
     background: #0cb7dc;
     color: white;
 }

 .user-tab img {
     width: 30px;
     height: 30px;
     border-radius: 50%;
     margin-right: 5px;
 }

 #chat-box {
     width: 100%;
     height: 300px;
     border: 0px solid #ccc;
     overflow-y: auto;
     padding: 10px;
     margin-top: 10px;
     background: #FFF;
     scroll-behavior: smooth;
     border-radius: 15px;
 }

 .user-list {
     list-style: none;
     padding: 0;
     margin: 0;
     overflow: auto;
     transition: all 0.3s ease-in-out;
     max-height: 100vh;
     height: calc(100vh - 400px); /* adjust 200px to match actual top content height */
    overflow-y: auto;
 }

 #user-list {
     transition: all 0.3s ease-in-out;
 }



 .user-item {
     display: flex;
     align-items: center;
     padding: 10px;
     cursor: pointer;
     transition: all 0.3s;
     border-radius: 10px;
 }

 .user-item:hover {
     background: #d8f3fa;
     color: #b0b3b8 !important;
 }



 .user-details {
     flex-grow: 1;
     text-align: left;
     color: #2b98b0;
 }

 .user-name {
     font-weight: bold;
 }

 .last-message {
     color: #b0b3b8;
     max-width: 160px;
     overflow: hidden;
     white-space: nowrap;
     text-overflow: ellipsis;
     display: block;
     font-size: 13px;
 }


 .user-item:hover .last-message {
     color: #b0b3b8;
 }

 .notif-badge {
     background: red;
     color: white;
     padding: 4px 8px;
     border-radius: 50%;
     font-size: 12px;
 }

 .chat-input {
     display: flex;
     margin-top: 10px;
 }

 .chat-input input {
     flex-grow: 1;
     padding: 8px;
     border-radius: 5px;
     border: none;
     background: transparent;
     color: white;
 }

 .chat-input button {
     margin-left: 5px;
     padding: 8px;
     border: none;
     background: #f72e1f;
     color: white;
     border-radius: 5px;
     cursor: pointer;
 }

 #chat-box,
 .chat-input {
     transition: all 0.3s ease-in-out;
 }

 /* Custom scrollbar */
 #chat-box::-webkit-scrollbar {
     width: 8px;
 }

 #chat-box::-webkit-scrollbar-track {
     background: #FFF;
     border-radius: 5px;
 }

 #chat-box::-webkit-scrollbar-thumb {
     background: #f6f5f5;
     /* Blue thumb */
     border-radius: 5px;
     border: 1px solid #e9e8e8;
 }

 #chat-box::-webkit-scrollbar-thumb:hover {
     background: #2b99b1;
     /* Red thumb on hover */
 }

 #message-input {
     width: calc(100% - 70px);
     padding: 5px;
 }

 #send-btn {
     padding: 5px 10px;
     background-color: transparent;
     border-radius: 5px;
     color: #fff;
     border: none;
     cursor: pointer !important;
 }

 #message-input,
 .search-chat-user {
     width: 100%;
     padding: 8px;
     border: none;
     margin-bottom: 10px;
     background: transparent;
     outline: none;
     border: 0px solid #ccc;
     color: #000;
     background: #FFF;
 }

 .search-chat-user {
     max-width: 100%;
     outline: none;
     transition: all 0.3s ease-in-out;
     border: none;
     border-bottom: 1px solid #ccc;
 }

 .bubble-right,
 .bubble-left {
     max-width: 250px;
     padding: 10px;
     border-radius: 10px;
     font-size: 14px;
     word-wrap: break-word;
     text-align: justify;
     min-height: 30px;
     box-sizing: border-box;
     margin-top: 0;
     display: flex;
     align-items: center;
     flex-direction: column;
     justify-content: center;
 }

 .bubble-left p,
 .bubble-right p {
     margin: 0;
     padding: 0;
     font-size: 14px;
     line-height: 1.4;
     max-width: 100%;
 }

 .bubble-right {
     background-color: #d8f3fa;
     color: #2a5889;
     margin-right: 0px;
 }

 .bubble-left {
     background-color: #9ae1f3;
     color: #2a5889;
     margin-left: 0px;
 }

 .profileimage {
     min-width: 60px;
     height: 60px;
     border-radius: 50%;
     overflow: hidden;
     margin: 5px;
     width: 40px;
 }

 .profileimage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

 .right,
 .left {
     display: flex;
     flex-direction: column;
     margin-bottom: 10px;
 }

 .right {
     text-align: right;
     align-items: flex-end;
 }

 .left {
     justify-content: flex-start;
     text-align: left;
     align-items: flex-start;
 }

 .timestamp {
     font-size: 10px;
     color: #999;
     margin-top: 10px;
     display: block;
 }

 .userinfos-sender {
     display: flex;
     flex-direction: row-reverse;
     align-items: center;
 }

 .userinfos-receiver {
     display: flex;
     flex-direction: row;
     align-items: center;
 }

 .notif-badge {
     background-color: red;
     color: white;
     font-size: 12px;
     font-weight: bold;
     padding: 4px 8px;
     border-radius: 50%;
     position: relative;
     top: -15px;
     right: -7px;
     margin-left: -27px;
     text-decoration: none;
 }

 #toggle-user-list {
     width: 30px;
     background-color: transparent;
     color: #0cb7dc;
     border: none;
     outline: none;
     transition: all 0.3s ease-in-out;
     float: left;
     margin-bottom: 10px;
     align-items: center;
     justify-content: flex-start;
     font-weight: bold;
     cursor: pointer;

 }



 .fixed {
     position: sticky;
     top: -10px;
     z-index: 1000;
     background: #f0f5fc;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
     width: 105.8%;
     margin-left: -10px;
     margin-right: -10px;
     float: left;
     margin-top: -10px;
     ;

 }

 .chat-input textarea {
     width: 100%;
     resize: none;
     min-height: 40px;
     max-height: 150px;
     overflow-y: auto;
     padding: 8px 12px;
     border: 1px solid #b1b1b1;
     font-size: 14px;
 }
 
@media only screen and (max-width: 500px) {
.chat-container {
    width: 100%;
    max-width: 400px;
    margin: auto;
    background: transparent;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}
}