/* ===========================================
   CHATBOT WIDGET - Neon Theme
   Matching website design
   =========================================== */

/* CSS Variables */
:root {
  --chat-primary: #00d9ff;
  --chat-secondary: #9945ff;
  --chat-accent: #ff3366;
  --chat-bg-dark: #0a0e1a;
  --chat-bg-card: #12162a;
  --chat-text: #ffffff;
  --chat-text-muted: #8892b0;
  --chat-border: rgba(0, 217, 255, 0.2);
  --chat-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

/* Chat Toggle Button */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
  border: none;
  cursor: pointer;
  box-shadow: var(--chat-shadow);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

.chat-toggle svg {
  width: 28px;
  height: 28px;
  fill: white;
  transition: transform 0.3s ease;
}

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

/* Notification Badge */
.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--chat-accent);
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
}

.chat-badge.show {
  display: flex;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Chat Window */
.chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: var(--chat-bg-dark);
  border: 1px solid var(--chat-border);
  border-radius: 16px;
  box-shadow: var(--chat-shadow);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
}

.chat-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(153, 69, 255, 0.1));
  border-bottom: 1px solid var(--chat-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chat-info {
  flex: 1;
}

.chat-name {
  font-weight: 600;
  color: var(--chat-text);
  font-size: 16px;
}

.chat-status {
  font-size: 12px;
  color: var(--chat-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
}

.chat-close {
  background: none;
  border: none;
  color: var(--chat-text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.chat-close:hover {
  color: var(--chat-accent);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--chat-border);
  border-radius: 3px;
}

/* Message Bubbles */
.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

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

.chat-message.bot {
  align-self: flex-start;
  background: var(--chat-bg-card);
  color: var(--chat-text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--chat-border);
}

.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.error {
  background: rgba(255, 51, 102, 0.2);
  border-color: var(--chat-accent);
  color: var(--chat-accent);
}

/* Typing Indicator */
.chat-typing {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--chat-bg-card);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  border: 1px solid var(--chat-border);
}

.chat-typing.show {
  display: flex;
}

.chat-typing span {
  width: 8px;
  height: 8px;
  background: var(--chat-primary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Chat Input */
.chat-input-container {
  padding: 16px;
  border-top: 1px solid var(--chat-border);
  display: flex;
  gap: 12px;
  background: var(--chat-bg-card);
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--chat-bg-dark);
  border: 1px solid var(--chat-border);
  border-radius: 24px;
  color: var(--chat-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

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

.chat-input::placeholder {
  color: var(--chat-text-muted);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
}

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

.chat-send svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Welcome Message */
.chat-welcome {
  text-align: center;
  padding: 20px;
  color: var(--chat-text-muted);
  font-size: 14px;
}

.chat-welcome h4 {
  color: var(--chat-text);
  margin-bottom: 8px;
}

/* Quick Replies */
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--chat-border);
}

.chat-quick-reply {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--chat-border);
  border-radius: 20px;
  color: var(--chat-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-quick-reply:hover {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--chat-primary);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 24px);
    height: calc(100vh - 140px);
    right: 12px;
    bottom: 90px;
    border-radius: 12px;
  }

  .chat-toggle {
    width: 56px;
    height: 56px;
    right: 16px;
    bottom: 16px;
  }
}

/* Dark mode already - no changes needed */
