

/* Chat list */
#NewChatList {
  position: fixed;       /* always relative to viewport */
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 500px;
  border: 1px solid #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background: #fff;      /* changed to white to stand out */
  z-index: 999999;       /* super high to stay on top */
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
  opacity: 0;
  pointer-events: none;
}

/* visible state */
#NewChatList.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Chat list container */
#NewChatList {
  display: flex;
  flex-direction: column;
}

#NewChatList .chat-header {
  padding: 12px;
  font-weight: bold;
  font-size: 16px;
  background: #f7975c;
  color: #fff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  display: flex;
  justify-content: space-between;  /* space between Chats text & X */
  align-items: center;
}

#NewChatList .chat-header .close-btn {
  font-size: 20px;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s;
}

#NewChatList .chat-header .close-btn:hover {
  color: #ddd;
}

/* Members list */
#NewChatList .chat-members {
  flex: 1;
  overflow-y: auto;       /* scroll if too many members */
  padding: 10px;
}

/* Each member row */
#NewChatList .chat-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#NewChatList .chat-member:hover {
  background: #f1f1f1;
}

/* Profile avatar */
#NewChatList .chat-member img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
}

/* Member name */
#NewChatList .chat-member .name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
#NewChatContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 500px;
  border: 1px solid #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background: #fff;
  z-index: 999999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

/* Active state (slide up) */
#NewChatContainer.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
#NewChatContainer .chat-header {
  padding: 12px;
  font-weight: bold;
  font-size: 16px;
  background: #f7975c;
  color: #fff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Close button */
#NewChatContainer .chat-header .close-btn {
  font-size: 20px;
  cursor: pointer;
  color: #fff;
  transition: color 0.2s;
}

#NewChatContainer .chat-header .close-btn:hover {
  color: #ddd;
}

/* Chat body */
#NewChatContainer .chat-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #f9f9f9;
}

/* Chat input */
#NewChatContainer .chat-input {
  border-top: 1px solid #ddd;
  padding: 8px;
  display: flex;
  gap: 8px;
}

#NewChatContainer .chat-input input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
}

#NewChatContainer .chat-input button {
  background: #f7975c;
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

#NewChatContainer .chat-input button:hover {
  background: #f7975c;
}
/* Chat area */
.chat-body {
  height: 400px;   /* adjust as per layout */
  overflow-y: auto;
  padding: 15px;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
}

.message {
  display: flex;
  margin: 8px 0;
  max-width: 75%;
}

.message.sent {
  justify-content: flex-end;
  align-self: flex-end;
}

.message.received {
  justify-content: flex-start;
  align-self: flex-start;
}

.bubble {
  padding: 10px 14px;
  border-radius: 20px;
  position: relative;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sent .bubble {
  background: #f7975c;
  color: white;
  border-bottom-right-radius: 4px;
}

.received .bubble {
  background: #e76c1f;
  color: fff;
  border-bottom-left-radius: 4px;
}

.bubble .time {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  text-align: right;
  color: rgba(255,255,255,0.8);
}

.received .bubble .time {
  color: #f7f4f4;
}

/* .chat-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
} */

/* .chat-notification {
   position: absolute;
   top: -6px;
   right: -6px;
   background: red;
   color: white;
   font-size: 12px;
   font-weight: bold;
   padding: 2px 6px;
   border-radius: 50%;
   min-width: 18px;
   text-align: center;
   line-height: 16px;
   display: block !important;
   pointer-events: none;
   z-index: 1000001;   /* higher than container *
} */
 .chat-notification {
    position: absolute;
    top: -6px;
    right: -6px;
    background: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    line-height: 16px;
    display: block !important;
    pointer-events: none;
    z-index: 1000001;
}
.chat-icon {
  cursor: pointer;  
  position: fixed;
  bottom: 70px;
  width:60px;
  height:60px;
  right: 10px;
  z-index: 1000000;
  visibility: visible !important;
  color: #816263; /* Blue - you can change it */
  background-color: #fff;
  border-radius: 50%;
  padding: 10px;
  transition: transform 0.2s ease;
  -webkit-box-shadow: 5px 5px 15px 5px #000000; 
  box-shadow: 5px 5px 15px 5px #000000;
}

.chat-icon:hover {
    transform: scale(1.1);
    text-decoration: none;
    color: #0056b3;
}
.chatsmem{
  color: red !important;
}