/* --- CHATBOT FLOATING WIDGET STYLES --- */

/* Floating Toggle Button */
.ee-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d8b4 0%, #00a4ff 100%);
  color: #02161b;
  box-shadow: 0 8px 30px rgba(0, 216, 180, 0.4);
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.ee-chat-toggle:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 216, 180, 0.6);
}

.ee-chat-toggle svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  transition: transform 0.4s ease;
}

.ee-chat-toggle.active svg {
  transform: rotate(90deg);
}

/* Dynamic Greeting Bubble */
.ee-chat-greeting {
  position: fixed;
  bottom: 34px;
  right: 96px;
  background: rgba(8, 19, 33, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 216, 180, 0.3);
  padding: 10px 16px;
  border-radius: 16px 16px 0 16px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 999;
  white-space: nowrap;
  animation: ee-fade-in-up 0.5s ease forwards;
  pointer-events: none;
}

@keyframes ee-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat Widget Container */
.ee-chat-container {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 580px;
  background: rgba(3, 7, 15, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.ee-chat-container.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Chat Header */
.ee-chat-header {
  background: linear-gradient(90deg, rgba(8, 24, 42, 0.95) 0%, rgba(3, 7, 15, 0.95) 100%);
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ee-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ee-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 216, 180, 0.1);
  border: 1px solid rgba(0, 216, 180, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ee-chat-title h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.ee-chat-subtitle {
  font-size: 0.75rem;
  color: #00d8b4;
  margin: 2px 0 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.ee-chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #00d8b4;
  display: inline-block;
  animation: ee-pulse-green 2s infinite alternate;
}

@keyframes ee-pulse-green {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.ee-chat-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.ee-chat-close:hover {
  color: #ffffff;
}

/* Chat Messages Stream */
.ee-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

/* Scrollbar styling */
.ee-chat-messages::-webkit-scrollbar {
  width: 4px;
}
.ee-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.ee-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.ee-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.ee-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 216, 180, 0.2) 0%, rgba(0, 164, 255, 0.15) 100%);
  border: 1px solid rgba(0, 216, 180, 0.25);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.ee-message.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  border-bottom-left-radius: 4px;
}

/* Suggestions chips */
.ee-chat-suggestions {
  padding: 0 20px 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ee-chat-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: #00d8b4;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.ee-chat-chip:hover {
  background: rgba(0, 216, 180, 0.08);
  border-color: rgba(0, 216, 180, 0.3);
  transform: translateY(-1px);
}

/* Typing / Loading state indicator */
.ee-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.ee-typing-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: ee-bounce 1.4s infinite ease-in-out both;
}

.ee-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ee-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes ee-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Input Bar */
.ee-chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(8, 19, 33, 0.4);
}

.ee-chat-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ee-chat-input-bar input:focus {
  border-color: rgba(0, 216, 180, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.ee-chat-send {
  background: linear-gradient(135deg, #00d8b4 0%, #00a4ff 100%);
  color: #02161b;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ee-chat-send:hover {
  transform: scale(1.05);
}

.ee-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ee-chat-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Responsive Styles */
@media (max-width: 480px) {
  .ee-chat-container {
    bottom: 0;
    right: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .ee-chat-toggle {
    bottom: 16px;
    right: 16px;
  }
  .ee-chat-greeting {
    display: none; /* Hide bubble on mobile screen */
  }
}
