/*
Theme Name: Divi Child
Theme URI: http://www.elegantthemes.com/gallery/divi/
Template: Divi
Author: Elegant Themes
Author URI: http://www.elegantthemes.com
Description: Smart. Flexible. Beautiful. Divi is the most powerful theme in our collection.
Version: 4.27.2.1741881755
Updated: 2025-03-13 16:02:35
*/

/* GLOBAL RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- FLOATING CHAT LAUNCHER WITH TOOLTIP & BOUNCE ANIMATION --- */
#floating-chat-launcher {
  position: fixed;
  bottom: 20px;
  left: 50%;
  width: 60px;
  height: 60px;
  background: #424242;  /* Dark grey so your multicolour logo stands out */
  border: 1px solid #ccc;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 9999999 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Center horizontally using translateX */
  transform: translateX(-50%) translateY(-50px); /* Start slightly above final position */
  opacity: 0;
  animation: floatDown 1.5s ease-out forwards;
}

/* Float-down animation to bottom center */
@keyframes floatDown {
  0% { transform: translateX(-50%) translateY(-50px); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* --- TOOLTIP FOR THE LAUNCHER --- */
#chatbot-tooltip {
  position: absolute;
  bottom: 110%; /* Positioned above the launcher */
  left: 50%;
  transform: translateX(-50%);
  background: #424242; /* Dark grey for contrast */
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  max-width: calc(100vw - 40px);
  /* Remove the simple transition in favor of an animation */
}

/* When tooltip-visible is added, trigger the fade/slide animation */
#chatbot-tooltip.tooltip-visible {
  animation: tooltip-fade-slide 3s forwards;
  visibility: visible;
}

/* Keyframes for tooltip fade and slide */
@keyframes tooltip-fade-slide {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}

/* Logo/Avatar inside the launcher */
#chatbot-avatar {
  width: 70%;
  height: 70%;
  object-fit: contain;
  border-radius: 50%;
}

/* Hover effect for launcher */
#floating-chat-launcher:hover {
  transform: translateX(-50%) scale(1.05);
  background: #f9f9f9;
}

/* Wake-up bounce animation */
@keyframes wakeup-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20%, 60% { transform: scale(1.2) rotate(5deg); }
  40%, 80% { transform: scale(1.2) rotate(-5deg); }
}

.wakeup {
  animation: wakeup-bounce 1s ease;
}

/* --- CHATBOT CONTAINER --- */
#chatbot-container {
  position: fixed;
  /* We'll set 'left' and 'bottom' via JavaScript so remove defaults if needed */
  width: 360px;
  height: 520px;
  background: linear-gradient(135deg, #ffffff, #F5F5F5);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  padding: 15px;
  z-index: 9999999 !important;
  overflow: hidden;
  animation: chatbot-fade-in 0.5s ease;
  font-family: 'Roboto', sans-serif;
}

/* Hide container when hidden */
#chatbot-container.hidden {
  display: none;
}

/* Chatbot fade-in animation */
@keyframes chatbot-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- CHATBOT HEADER --- */
#chatbot-header {
  background: #424242;
  color: #fff;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#chatbot-close {
  background: #f9f9f9 !important; /* Light background */
  border: 1px solid #424242 !important; /* Dark border */
  color: #424242 !important; /* Dark text to contrast with light background */
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px; /* Add some padding for better visibility */
  border-radius: 4px; /* Optional rounded corners */
}

/* --- CHAT MESSAGES --- */
#chatbot-messages {
  flex-grow: 1;
  padding: 10px;
  background: #fafafa;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  max-height: 350px;
  margin: 10px 0;
  border-radius: 8px;
  line-height: 1.4;
}

/* Paragraphs within messages: moderate spacing */
#chatbot-messages p {
  margin: 4px 0;   
  line-height: 1.3;
}

/* Ensure <br> tags inside messages have minimal spacing */
#chatbot-messages br {
  display: block;
  line-height: 1;
  margin: 0;
  padding: 0;
}

/* --- CHAT INPUT --- */
#chatbot-input-container {
  display: flex;
  padding: 10px;
  background: #f1f1f1;
  border-top: 1px solid #ddd;
  border-radius: 0 0 12px 12px;
}

#chatbot-input {
  flex-grow: 1;
  padding: 12px;
  border: none;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#chatbot-send {
  background: #F57C00;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 20px;
  margin-left: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

#chatbot-send:hover {
  background: #E65100;
}

/* --- MESSAGE BUBBLES --- */
.user, .assistant {
  padding: 10px;
  border-radius: 12px;
  max-width: 80%;
  word-wrap: break-word;
  margin-bottom: 8px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.user {
  background: #F57C00;
  color: #fff;
  align-self: flex-end;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.assistant {
  background: #E0E0E0;
  color: #333;
  align-self: flex-start;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- TYPING INDICATOR --- */
.typing-indicator {
  background: #E0E0E0;
  color: #666;
  padding: 10px;
  border-radius: 12px;
  font-style: italic;
  max-width: 80%;
  align-self: flex-start;
  display: flex;
  justify-content: flex-start;
  position: relative;
}

.typing-indicator::after {
  content: "• • •";
  animation: typing 1.5s infinite;
  font-size: 14px;
  letter-spacing: 2px;
}

@keyframes typing {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* --- SAFE AREA INSETS FOR MOBILE (iOS) --- */
@media screen and (max-width: 768px) {
  #chatbot-container {
	left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}