.chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.chat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 70px;  /* Base container size */
  height: 70px;
}

/* Style specifically for the minimized icon */
.chat-icon .chatbot-icon {
  width: 60px !important;
  height: 60px !important;
  display: block;
}

/* Add a specific class for the in-chat icon to avoid conflicts */
.chat-body .chatbot-icon {
  max-width: 35px;
  max-height: 35px;
}

.ChatApp {
  display: none;
  width: 350px;
  height: 500px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.ChatApp.open {
  display: flex;
}

.ChatApp.expanded {
  width: 500px;
  height: 35rem;
}

.chat-header {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #0078cc;
  color: white;
  height: 70px;  /* Increased height slightly */
}

.chat-header-text-expanded {
  width: 50%;
  padding-left: 10px;
  text-align: center;
  display: flex;
  align-items: center;
  height: 100%;  /* Use percentage instead of fixed height */
}

.chat-header-text {
  width: 50%;
  padding-left: 10px;
  text-align: left;
  display: flex;
  align-items: center;
  height: 100%;  /* Use percentage instead of fixed height */
  white-space: nowrap; /* Prevent text from wrapping */
}

.chat-header-text-expanded p {
  font-weight: 700;
  font-size: 25px;
  letter-spacing: 1.2px;
  color: white;
  margin: 0;  /* Remove default margins */
  line-height: 1;  /* Control line height */
}

.chat-header-text p {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1.2px;
  color: white;
  margin: 0;  /* Remove default margins */
  line-height: 1;  /* Control line height */
}

.chat-header-icon {
  display: flex;
}

.chat-header button {
  padding: 10px;
  border: none;
  background: transparent;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.3s;
}

.expand-button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.close-button {
  padding: 10px;
}

.chat-header button:hover {
  color: #ccc;
}

.chat-body.loading {
  filter: blur(5px);
  pointer-events: none;
  position: relative;
}

.chat-footer {
  width: 285px;
  position: relative;
  background-color: #ffffff;
}

.chat-footer.expanded {
  width: 27.5rem;
}
.chat-footer input {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
}

.chat-footer input:focus {
  outline: none;
}

.chat-footer button {
  background-color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  position: absolute;
  right: -60px;
  top: 10px;
}

.left-side {
  width: 50%;
  position: relative;
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-window {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.chat-header img {
  max-width: 40px;
  max-height: 55px;
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #eaeef2;
}

.chatbot-icon {
  max-width: 65px;
  max-height: 65px;
}

.chat-row-user {
  flex-direction: row-reverse !important;
}

.chat-row {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 2px;
}

.chat-message {
  width: 65%;
  margin: 5px 0;
  padding: 0 10px;
  max-width: 80%;
  word-wrap: break-word;
  border-radius: 10px;
}

.chat-message.user {
  text-align: left;
  background-color: #0078cc;
  color: white;
  border-top-right-radius: 0;
}

.chat-message.bot {
  align-self: flex-start;
  text-align: left;
  background-color: #fff;
  border-bottom-left-radius: 0;
  border: 1px solid #ccc;
  position: relative;
}

/* Style for streaming messages */
.chat-message.bot.streaming {
  border-left: 3px solid #0078cc;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 120, 204, 0.4);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(0, 120, 204, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 120, 204, 0);
  }
}

.message-color p {
  color: white !important;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.user-details-form {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background-color: #f1f1f1;
  border-radius: 10px;
  height: 100%;
}

.user-details-form h2 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  text-align: center;
}

.user-details-form input {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.user-details-form button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 16px;
}

.user-details-form button:hover {
  background-color: #0056b3;
}

.typing {
  align-items: center;
  display: flex;
  height: 45px;
}
.typing .dot {
  animation: mercuryTypingAnimation 1.8s infinite ease-in-out;
  background-color: #87a2ff;
  border-radius: 50%;
  height: 7px;
  margin-right: 4px;
  vertical-align: middle;
  width: 7px;
  display: inline-block;
}
.typing .dot:nth-child(1) {
  animation-delay: 200ms;
}
.typing .dot:nth-child(2) {
  animation-delay: 300ms;
}
.typing .dot:nth-child(3) {
  animation-delay: 400ms;
}
.typing .dot:last-child {
  margin-right: 0;
}

@keyframes mercuryTypingAnimation {
  0% {
    transform: translateY(0px);
    background-color: #87a2ff;
  }
  28% {
    transform: translateY(-7px);
    background-color: #c4d7ff;
  }
  44% {
    transform: translateY(0px);
    background-color: #cdc1ff;
  }
}

/* Add spinner animation */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: #0078cc;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
