body {
  font-family: "Segoe UI", sans-serif;
  background-color: #f3f2f1;
  margin: 0;
  padding: 0;
}

.chat-window {
  min-width: 400px;
  height: 90vh;
  margin: 20px auto;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chat-header {
  padding: 16px;
  background-color: #6264a7;
  color: white;
  font-size: 18px;
  font-weight: bold;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background-color: #f9f9f9;
}

.message {
  margin-bottom: 12px;
  padding: 10px;
  background-color: #E8EBFA;
  border-radius: 6px;
  max-width: 80%;
  display: inline-block; /* Shrinks to fit content */
  word-wrap: break-word; /* Ensures long words wrap */
  position: relative;
}
	
.incoming-message {
  margin-bottom: 12px;
  padding: 10px;
  background-color: #e1dfdd;
  border-radius: 6px;
  max-width: 80%;
  display: inline-block; /* Shrinks to fit content */
  word-wrap: break-word; /* Ensures long words wrap */
  position: relative;
}
	
.incoming-message-quote {
  margin-bottom: 12px;
  padding: 10px;
  background-color: #edebe8;
  border-radius: 6px;
  max-width: 80%;
  display: inline-block; /* Shrinks to fit content */
  border-left: 2px solid #444;
}

.chat-input {
  display: flex;
  padding: 12px;
  border-top: 1px solid #ccc;
  background-color: #fff;
  position: relative;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

.chat-input button {
  margin-left: 8px;
  padding: 10px 16px;
  background-color: #6264a7;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}

.chat-input button:hover {
  background-color: #4b4e8f;
}

.chatroom button {
  margin-left: 8px;
  padding: 10px 16px;
  background-color: #6264a7;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  margin-bottom: 8px;
}

.chatroom button:hover {
  background-color: #4b4e8f;
}
	
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* semi-transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* ensure it's on top */
}

/* Spinner style */
.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #ccc;
  border-top: 6px solid #6264a7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Animation keyframes */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
	
.modal {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  text-align: center;
  width: 300px;
}
	
.modal div {
  margin: 0;
  border: none;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background-color: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
	
.reply-menu {
  position: absolute;
  top: -10px;
  border-radius: 6px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 8px rgba(0,0,0,0.2);
  white-space: nowrap;
  user-select: none;
}

.reaction-bar {
  position: absolute;
  bottom: -10px;
  border-radius: 6px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 8px rgba(0,0,0,0.2);
  white-space: nowrap;
  user-select: none;
}
	
.menu {
  display: none;
  position: fixed;
  top: 60px;
  right: 20px;
  background-color: white;
  color: black;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  padding: 10px;
  z-index: 1000;
}

.typing-indicator {
  display: flex;
  align-items: flex-end;
  height: 20px;
  gap: 5px;
}

.dot {
  width: 5px;
  height: 5px;
  background-color: #6264a7;
  border-radius: 50%;
  animation: wave 1s infinite ease-in-out;
  z-index: 9998; /* ensure it's on top */
}

.dot:nth-child(1) {
  animation-delay: 0.3s;
}

.dot:nth-child(2) {
  animation-delay: 0s;
}

.dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes wave {
  0%, 33% {
    transform: translateY(0);
  }
  16% {
    transform: translateY(-6px);
  }
}