/* Chat Widget Variables */
:root {
  --chat-primary: #facc15;
  /* Volt Yellow from site */
  --chat-primary-hover: #eab308;
  --chat-bg: rgba(255, 255, 255, 0.85);
  --chat-text: #1e293b;
  /* Navy/Slate */
  --chat-secondary: #f1f5f9;
  --chat-glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --chat-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --chat-radius: 16px;
  --chat-font: 'Inter', sans-serif;
}

/* Floating Action Button (FAB) */
.chat-widget-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: var(--chat-primary);
  border-radius: 50%;
  box-shadow: var(--chat-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  border: 4px solid rgba(255, 255, 255, 0.2);
}

.chat-widget-fab:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 25px 30px -5px rgba(250, 204, 21, 0.4);
}

.chat-widget-fab svg {
  width: 32px;
  height: 32px;
  color: #000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-widget-fab .close-icon {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg);
}

.chat-widget-fab.active .chat-icon {
  opacity: 0;
  transform: rotate(90deg);
}

.chat-widget-fab.active .close-icon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Chat Main Container */
.chat-widget-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: var(--chat-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--chat-glass-border);
  border-radius: var(--chat-radius);
  box-shadow: var(--chat-shadow);
  font-family: var(--chat-font);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9998;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-widget-container.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header */
.chat-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  position: relative;
  width: 40px;
  height: 40px;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  /* Green */
  border-radius: 50%;
  border: 2px solid white;
}

.chat-header-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--chat-text);
}

.chat-header-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}

/* Primary Actions (Call & WhatsApp) */
.chat-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px 0;
}

.chat-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  text-decoration: none;
  color: var(--chat-text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.chat-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background: var(--chat-secondary);
}

.chat-action-btn.primary-wa {
  background: #DCFCE7;
  /* Light green */
  color: #15803d;
}

.chat-action-btn.primary-call {
  background: #FEF9C3;
  /* Light yellow */
  color: #854d0e;
}

/* Chat Body (FAQ) */
.chat-body {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  animation: messageSlide 0.3s ease forwards;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.bot {
  background: white;
  border-top-left-radius: 2px;
  color: var(--chat-text);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  align-self: flex-start;
  margin-right: auto;
}

.message.user {
  background: var(--chat-primary);
  border-bottom-right-radius: 2px;
  color: #000;
  align-self: flex-end;
  margin-left: auto;
  font-weight: 500;
}

/* FAQ Options */
.faq-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.faq-chip {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--chat-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.faq-chip:hover {
  background: var(--chat-primary);
  border-color: var(--chat-primary);
  color: #000;
}

/* Footer Section with Secondary Links */
.chat-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: center;
  gap: 16px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 12px;
  color: #64748b;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #000;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  border-top-left-radius: 2px;
  width: fit-content;
  align-self: flex-start;
}

.dot {
  width: 6px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chat-widget-fab {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }

  .chat-widget-container {
    bottom: 90px;
    right: 20px;
    left: 20px;
    /* Center with margins */
    width: auto;
    max-width: none;
  }
}

/* Input Area */
.chat-input-area {
  padding: 12px 16px;
  background: white;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  font-family: var(--chat-font);
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--chat-primary);
}

.chat-send-btn {
  background: var(--chat-primary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
  color: #000;
}

.chat-send-btn:hover {
  transform: scale(1.1);
}

.chat-send-btn svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
  /* Visual centering */
}