/* Shubhlo AI Assistant Ultra-Modern Glassmorphism Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Floating Trigger Button */
.shubhlo-chat-trigger {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #8b5cf6 100%);
  color: white;
  border: 2px solid #f59e0b;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.45);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  outline: none;
}

.shubhlo-chat-trigger:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.6);
  border-color: #ffffff;
}

.shubhlo-chat-trigger:active {
  transform: scale(0.95);
}

.chat-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #10b981;
  animation: chat-pulse-anim 2s infinite;
  opacity: 0;
  pointer-events: none;
}

@keyframes chat-pulse-anim {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.chat-badge-notify {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f59e0b;
  color: #0f172a;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 50px;
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Chat Window Container */
.shubhlo-chat-window {
  position: fixed;
  bottom: 110px;
  right: 30px;
  width: 390px;
  height: 560px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 140px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  transform: translateY(30px) scale(0.92);
  opacity: 0;
  pointer-events: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.shubhlo-chat-window.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #f59e0b;
}

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

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 2px solid #fbbf24;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chat-header-title h4 {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: white;
}

.chat-header-title span {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.chat-header-title span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Suggestion Chips */
.chat-suggestions {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  scrollbar-width: none;
}
.chat-suggestions::-webkit-scrollbar {
  display: none;
}

.suggestion-chip {
  background: white;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.suggestion-chip:hover {
  border-color: #10b981;
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
  transform: translateY(-1px);
}

/* Messages Area */
.chat-messages-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
}

.chat-message {
  max-width: 82%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
  animation: chatMessageFade 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes chatMessageFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.bot {
  background: #f8fafc;
  color: #0f172a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.chat-message.bot a {
  color: #10b981;
  font-weight: 800;
  text-decoration: underline;
}

.chat-message.user {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
  font-weight: 600;
}

/* Typing Indicator */
.chat-typing-indicator {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 18px;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1.5px solid #e2e8f0;
}

.chat-typing-indicator span {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: chatTypingAnim 1.4s infinite ease-in-out both;
}
.chat-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

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

/* Footer / Input Form */
.chat-footer {
  padding: 14px 18px;
  border-top: 1.5px solid #e2e8f0;
  display: flex;
  gap: 10px;
  background: white;
  align-items: center;
}

.chat-footer input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: all 0.25s ease;
  background: #f8fafc;
}

.chat-footer input:focus {
  border-color: #8b5cf6;
  background: white;
}

.chat-mic-btn {
  background: #f1f5f9;
  color: #64748b;
  border: 1.5px solid #cbd5e1;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.25s ease;
}
.chat-mic-btn:hover {
  color: #10b981;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}
.chat-mic-btn.recording {
  background: #fee2e2;
  color: #ef4444;
  border-color: #ef4444;
  animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.chat-send-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.25s ease;
}

.chat-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}
