/* 🌟 Modern Chatbox */
.chatbox {
  position: fixed;
  bottom: 90px;
  right: 25px;
  width: 360px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  z-index: 9999;
  animation: slideUp 0.3s ease;
}

/* Smooth open animation */
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 🧭 Header with gradient & avatars */
.chat-header {
  background: linear-gradient(135deg, #007bff, #6610f2);
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.chat-status {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* 👥 Avatar group */
.chat-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-avatars img {
  width: 45px; /* Reduce size */
  height: 45px;
  border-radius: 10%;
  object-fit: cover; /* Crop nicely */
  border: 2px solid #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);

}

/* 🌟 Chat Banner (Perfect Circular Avatar Style) */
.chat-banner {
  width: 60px;               /* fixed size for a perfect circle */
  height: 60px;
  object-fit: cover;         /* keep proportions without stretching */
  border-radius: 50%;        /* makes it round */
  border: 2px solid #fff;    /* clean white edge */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  background-color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.chat-banner:hover {
  transform: scale(1.06);
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
  transition: all 0.25s ease;
}

/* ❌ Close button */
.chat-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-toggle:hover {
  opacity: 0.8;
}

/* 💬 Chat body */
.chat-body {
  padding: 15px;
  max-height: 320px;
  overflow-y: auto;
  background: #f9fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ✉️ Message bubbles */
.chat-message {
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 85%;
  word-wrap: break-word;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #d34c8b, #e878aa);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.bot {
  align-self: flex-start;
  background: #eaeaea;
  color: #222;
  border-bottom-left-radius: 4px;
}

/* ✍️ Footer with input */
.chat-footer {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 10px;
  background: #fff;
}

.chat-footer input {
  flex: 1;
  border: none;
  padding: 10px;
  border-radius: 20px;
  background: #f2f2f2;
  outline: none;
  font-size: 0.9rem;
  margin-right: 8px;
  transition: all 0.2s;
}
.chat-footer input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #007bff40;
}

.chat-footer button {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.chat-footer button:hover {
  background: #0056b3;
}

/* 💬 Floating open button */
.chat-floating-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #6610f2);
  color: #fff;
  border: none;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.chat-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}


/* Open and Close see Better like a modern chat app */

.chatbox.open {
  display: flex;
}
.chatbox.close {
  display: none;
}

.chatbox {
  opacity: 1;
  transition: all 0.5s ease;
   transform: translateY(10px);
}
.chatbox.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
   opacity: 1;
}