/* Lares Chatbot styles (based on user's CSS) */
.chatbot-demo {
  background: rgba(255,255,255,0.9);
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  padding: 20px;
  width: 90%;
  max-width: 600px;
  box-sizing: border-box;
  text-align: center;
  margin: 20px auto;
}

.chat-icon {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #007BFF;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
}
/* === Greeting bubble (mobile) =========================================== */
@media (max-width: 767px) {
  .chat-greeting {
    position: fixed;
    z-index: 10000;
    bottom: 170px;   /* sits above the floating icon (adjust if your icon size changes) */
    right: 20px;
    max-width: 70vw;
    animation: greet-in 240ms ease-out;
  }

  .chat-greeting-bubble {
    background: #ffffff;
    color: #111827;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 0 0 3px rgba(0,200,255,0.18);
    font-size: 14px;
    line-height: 1.35;
  }

  /* little pointer tail toward the icon */
  .chat-greeting-bubble:after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: -7px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.08);
  }

  @keyframes greet-in {
    0% { opacity: 0; transform: translateY(8px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
}

/* Optional: gentle pulse on the icon (mobile only) to attract attention */
@media (max-width: 767px) {
  .chat-icon-img {
    box-shadow: 0 0 0 rgba(0, 200, 255, 0.7);
    animation: pulse-glow 2s infinite;
  }
  @keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.7); }
    70% { box-shadow: 0 0 20px 20px rgba(0, 200, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0); }
  }
}

@media (max-width: 767px) {
  .chat-icon {
    animation: pulse 2s infinite;
  }
	.chat-icon-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(0, 200, 255, 0.7);
  animation: pulse-glow 2s infinite;
}
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 20px 20px rgba(0, 200, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 200, 255, 0);
  }
}
.chat-icon-img {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.chat-icon-img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(0,0,0,0.6);
}

.chat-container {
  display: none;
  flex-direction: column;
  width: 350px;
  height: 500px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  position: fixed;
  bottom: 90px;
  right: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1000;
}
.chat-container.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.chat-header {
  display: flex;
  align-items: center;
  background: linear-gradient(to right, #007BFF, #00BFFF);
  color: #fff;
  padding: 10px 15px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.chat-logo { height: 40px; margin-right: 10px; border-radius: 10%; }
.chat-header-content { flex-grow: 1; }
.chat-title { font-size: 1rem; margin: 0 0 4px 0 !important;  }
.chat-status { font-size: .8rem; }

.close-button {
  background: none; border: none; color: #fff; cursor: pointer; font-size: 1.5rem;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 10px;
  background-color: #e9ebee;
  height: calc(100% - 60px);
}

.chat-message {
  display: block;
  margin: 5px 0;
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 80%;
  word-wrap: break-word;
}
.user-message {
  background-color: #007BFF;
  align-self: flex-end;
  text-align: right;
  color: #fff;
}
.server-message {
  background-color: #28a745;
  align-self: flex-start;
  text-align: left;
  color: #fff;
}

.chat-input-group {
  display: flex;
  padding: 10px;
  background-color: #fff;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.chat-input { flex-grow: 1; margin-right: 10px; padding: 8px; border: 1px solid #CCC; border-radius: 4px; }
.chat-send-button { padding: 8px 15px; background-color: #00B2FF; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.chat-send-button:hover { background-color: #008ACF; }

@media (max-width: 600px) {
  .chat-container { width: 100%; height: 60%; bottom: 80px; right: 0; border-radius: 0; }
}
