/*Chat*/
/* Floating Chat Icon */
.chat-icon {
  position: fixed;
  bottom: 50px;
  left: 30px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 24px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.chat-icon:hover {
  background: #041e42;
}

/* Chat Window */
.chat-container {
  position: fixed;
  bottom: 20px;
  left: 5px;
  width: 700px;
  max-width: 100%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  border: 1px solid #041e42;
  z-index: 999;
}

/* Header */
.chat-container .chat-header {
  background: #041e42;
  color: white;
  padding: 10px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Subtitle */
.chat-subtitle {
  font-size: 16px;
  font-style: italic;
  text-align: center;
  color: #333;
  padding: 6px 0;
  background: #f9f9f9;
}

/* Chat box */
.chat-container .chat-box {
  max-height: 500px;
  min-height: 500px;
  overflow-y: auto;
  padding: 10px;
  background: #f8f9fa;
}

/* Messages */
.chat-container .message {
  padding: 8px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  max-width: 75%;
  word-wrap: break-word;
}

.chat-container .user-message {
  background: #041e42;
  color: white;
  text-align: right;
  float: right;
  clear: both;
}

.chat-container .bot-message {
  background: #e9ecef;
  color: black;
  text-align: left;
  float: left;
  clear: both;
}

/* Input */
.chat-container .input-group {
  padding: 10px;
  border-top: 1px solid #041e42;
}

/* Tooltip */
.chat-icon #chatbotTooltip {
  visibility: hidden;
  background-color: #041e42;
  color: white;
  text-align: center;
  padding: 5px 10px;
  border-radius: 5px;
  position: absolute;
  bottom: 200%;
  right: 100%;
  transform: translateX(50%);
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.chat-icon:hover #chatbotTooltip {
  visibility: visible;
  opacity: 1;
  right: -50px;
}

img.edithbot-img {
  width: 100px;
}

/* Typing indicator styled as bot message */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.typing-indicator span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  background-color: #555;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}


/* ========================= */
/* MOBILE VIEW (FLOATING CHAT) */
/* ========================= */
@media (max-width: 576px) and (max-width: 768px) {
  .chat-container {
    width: 355px;
    left: 25px;
  }
  .chat-container .chat-box {
    max-height: 500px;
    min-height: 300px;
  }
}

@media (max-width: 360px) {
  .chat-container {
    width: 360px;
    left:5px;
  }
  .chat-container .chat-box {
    max-height: 500px;
    min-height: 300px;
  }
}