/* chatbot.css */
:root {
  --primary-color: #e15b13; /* Saffron tone representing Ayodhya */
  --primary-hover: #c94f0e;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(255, 255, 255, 0.4);
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --shadow-premium: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius-lg: 16px;
  --radius-md: 12px;
}

/* Floating Action Button */
#chatbot-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(225, 91, 19, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease;
}

#chatbot-trigger:hover {
  transform: scale(1.08);
  background-color: var(--primary-hover);
}

#chatbot-trigger svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Chat Widget Window */
#chatbot-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 580px;
  max-height: calc(100vh - 120px);
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#chatbot-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header styling */
.chat-header {
  background: linear-gradient(135deg, var(--primary-color), #f37021);
  color: #ffffff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar-container {
  position: relative;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-avatar svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.chat-header-title h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.chat-header-title span {
  font-size: 11px;
  opacity: 0.85;
}

.chat-header-actions {
  display: flex;
  gap: 8px;
}

.chat-header-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}

.chat-header-btn:hover {
  opacity: 1;
}

/* Messages Area */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Individual Message Layouts */
.msg-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.msg-wrapper.user {
  align-self: flex-end;
}

.msg-wrapper.bot {
  align-self: flex-start;
}

.msg-bubble {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.msg-wrapper.user .msg-bubble {
  background-color: var(--primary-color);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.msg-wrapper.bot .msg-bubble {
  background-color: #ffffff;
  color: var(--text-dark);
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  align-self: flex-end;
}

.msg-wrapper.bot .msg-time {
  align-self: flex-start;
}

/* Quick Actions Section */
.quick-actions {
  padding: 8px 16px 12px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar for clean look */
}

.quick-actions::-webkit-scrollbar {
  display: none;
}

.quick-btn {
  white-space: nowrap;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-dark);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.quick-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  align-items: center;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Footer & Input bar */
.chat-footer {
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #f8fafc;
  padding: 10px 14px;
  border-radius: 24px;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.chat-input:focus {
  border-color: var(--primary-color);
  background-color: #ffffff;
}

.chat-send-btn {
  background-color: var(--primary-color);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.chat-send-btn:hover {
  background-color: var(--primary-hover);
}

.chat-send-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Responsive styling */
@media (max-width: 480px) {
  #chatbot-window {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  
  #chatbot-trigger {
    bottom: 16px;
    right: 16px;
  }
}