 /* Overall container for the chat app */
 .chat-container {
    height: 85vh;
  }
  /* Sidebar styling */
  .sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    height: 850px;
    overflow-y: auto;
    padding: 20px;
    margin-top: 6px;
    
  }
  .sidebar .user {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
  }
  .sidebar .user:hover {
    background-color: #e9ecef;
  }
  .sidebar .user.active {
    background-color: rgb(231, 231, 231);
  }
  .card-header{
    height: 50px;
    background-color: #1576c2;
    margin-top : 7px;
    color : white;
    padding: 10px;
    font-weight: bold;
    font-size : 18px;
  }
  .chat-messages {
    height: 750px;
    overflow-y: auto;
    background-color: #ffffff;
    padding: 15px;
    font-weight: 600;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    scroll-behavior: smooth;
    position: relative;
  }
  .message {
    max-width: 70%; 
    width: fit-content; 
    word-wrap: break-word;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 12px;
    position: relative;
  }
  .message .sent img {
    max-width: 100%;
    display: block; 
}
  .message.sent {
    background-color: #e1f2ff;
    margin-left: auto;
    text-align: right;
  }
  .message.received {
    background-color: rgb(231, 231, 231);
    margin-right: auto;
    text-align: left;
  }
.input-group{
    width: auto !important;
    display: flex;
  }
  .date_label {
    display: inline-block;
    padding: 5px 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    text-align: center;
    color: grey;
    font-weight: bold;
    background-color: #f2f2f2;
}
.no_data{
  font-size: 30px;
  text-align: center;
  margin-top: 25%;
  font-weight: bold;
}
.sidebar_title{
  font-size: 20px;
  font-weight: 900;
  margin-left: 4px;
}
#search{
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  margin-top: 15px;
}

.input {
  width: 100%;
  max-width: 500px;
  height: 45px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid lightgrey;
  outline: none;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0px 0px 20px -18px;
}

.input:hover {
  border: 2px solid lightgrey;
  box-shadow: 0px 0px 20px -17px;
}

.input:active {
  transform: scale(0.95);
}

.input:focus {
  border: 2px solid grey;
}
.loader{
  text-align: center;
  display : none;
  
}
 .icon{
   font-size : 50px;
   margin: 20px 20px 20px;
 }
 .user_date{
  float: right;
 }

 #chatForm .input-group {
  width : 1126px;
  display: flex;
  flex-direction: column;
}

#attachment{
  display: none;
}
#messageInput {
    padding : 20px;
    flex-grow: 1;
    width: 980px;
}
.attachment-icon{
  font-size: 20px;
  font-weight: bold;
}
#attachment{
  background-color: #dee2e6;
}
#chatForm{
  display: none;
}
.chat-data{
  gap: 0.5rem;
  height: 40px;
  width : 1126px;

}

.attachment-container {
  position: relative;
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f4f4f4;
  max-height : 150px;
  /* width:fit-content; */
  max-width:170px;
}

.preview-img {
  max-width: 100%;
  border-radius: 5px;
}

.file-preview {
  background-color: lightgrey;
  padding: 10px;
  margin: 0;
  border-radius: 5px;
  word-break: break-word;
  height: 116px;
}

.remove-btn {
  position: absolute;
  top:-10px;
  right: -5px;
  background: grey;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  width: 20px;
  height: 20px;
  line-height: 16px;
  text-align: center;
  font-weight:bold;
  cursor: pointer;
}
.message-tick {
  font-size: 14px;
  color: #007bff;
  white-space: nowrap; /* Prevent breaking ✓✓ */
}

.unread-count{
  background-color: grey;
  padding: 4px;
  border-radius: 50%;
  color: white;
  display: flex;
  width: 18px;
  height: 18px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  position: relative;
  top: -19px;
  left: 63px;
  font-size: 12px;
}

.chat-input-container {
  display: flex;
  align-items: center;
  padding: 0px 8px;
  background-color: #fff;
  width: auto;
}

.chat-input-container input[type="text"] {
  flex-grow: 1;
  border: none;
  outline: none;
  padding: 6px;
  font-size: 14px;
  height: 20px;
}

.chat-input-container .attachment-label {
  cursor: pointer;
  margin: 0 10px;
  color: #666;
  font-size: 16px;
}

.chat-input-container button {
  background-color: #0d6efd;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.chat-input-container #endChat {
  background-color: #ff0000;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin-left: 5px;
}

.chat-input-container button i {
  font-size: 14px;
}
