/* Floating Chat Button Animation */
.floating-chat-btn {
  position: fixed;
  right: 25px;
  bottom: 25px;
  /* background: #25D366; */
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  animation: chatPulse 3s infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Idle breathing animation */
@keyframes chatPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }
}

/* Hover reaction */
.floating-chat-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.8);
  animation-play-state: paused;
}

/* Click feedback */
.floating-chat-btn:active {
  transform: scale(0.96);
}

/* Stop pulsing when chat is open */
.floating-chat-btn.chat-open {
  animation: none;
}


/* Chat Box Container */
.chat-container {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.chat-container.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Header */
.chat-header {
    background: #075E54;
    color: white;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #ECE5DD;
}

/* Messages */
.message {
    max-width: 75%;
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.user-message {
    background: #DCF8C6;
    align-self: flex-end;
}

.bot-message {
    background: white;
    align-self: flex-start;
}

/* Footer */
.chat-footer {
    display: flex;
    padding: 10px;
    background: #f0f0f0;
}

.chat-footer input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}

.send-btn {
    background: #128C7E;
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    margin-left: 8px;
}

/* Typing indicator */
.typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: white;
  border-radius: 8px;
  width: fit-content;
}

.typing span {
  width: 6px;
  height: 6px;
  background: #999;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

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

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.timestamp {
  display: block;
  font-size: 11px;
  color: #777;
  margin-top: 4px;
  text-align: right;
}

.chat-actions {
  display: flex;
  gap: 8px;
}

.clear-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 15px;
  cursor: pointer;
  opacity: 0.85;
}

.clear-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}