/**
 * ═══════════════════════════════════════════════════════════
 * SKYNET AI AGENT STYLES
 * Interactive chatbot with holographic design
 * ═══════════════════════════════════════════════════════════
 */

/* ============================================
   FLOATING AI BUTTON
   ============================================ */

.skynet-ai-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--gradient-neural);
  border: none;
  cursor: pointer;
  z-index: 9999;
  box-shadow: var(--shadow-glow-holographic);
  transition: all var(--duration-normal) var(--ease-out);
}

.skynet-ai-button:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow:
    var(--shadow-glow-holographic),
    0 10px 40px rgba(0, 0, 0, 0.3);
}

.skynet-ai-button.active {
  transform: scale(0.9);
}

.ai-button-icon {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.ai-button-icon svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Pulsing rings */
.ai-button-pulse,
.ai-button-pulse-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--skynet-primary);
  opacity: 0;
  animation: aiPulse 2s ease-out infinite;
}

.ai-button-pulse-2 {
  animation-delay: 1s;
  border-color: var(--ai-neon-green);
}

@keyframes aiPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

/* ============================================
   NOTIFICATION BADGE
   ============================================ */

.skynet-ai-notification {
  position: fixed;
  bottom: 115px;
  right: 30px;
  max-width: 300px;
  z-index: 9998;
  display: none;
  animation: slideInRight 0.5s var(--ease-out);
}

.notification-content {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--ai-neon-green);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg), var(--shadow-glow-green);
  position: relative;
}

.notification-content p {
  margin: 0;
  color: var(--white);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 20px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--duration-fast) var(--ease-out);
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   CHAT WINDOW
   ============================================ */

.skynet-ai-chat {
  position: fixed;
  bottom: 115px;
  right: 30px;
  width: 420px;
  height: 600px;
  background: var(--skynet-darker);
  border-radius: var(--radius-2xl);
  box-shadow:
    var(--shadow-xl),
    0 0 80px rgba(0, 240, 255, 0.2),
    0 0 120px rgba(123, 97, 255, 0.15);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid var(--glass-border);
}

.skynet-ai-chat.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.ai-chat-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(123, 97, 255, 0.1) 100%);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}

.ai-chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-neural);
}

.ai-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.ai-avatar svg {
  width: 28px;
  height: 28px;
  color: var(--white);
  position: relative;
  z-index: 2;
}

.avatar-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-neural);
  opacity: 0.5;
  filter: blur(10px);
  animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.ai-info {
  flex: 1;
}

.ai-info h4 {
  margin: 0 0 4px;
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--white);
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--gray-400);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ai-neon-green);
  box-shadow: 0 0 10px var(--ai-neon-green-glow);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.ai-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.ai-close svg {
  width: 18px;
  height: 18px;
}

.ai-close:hover {
  background: rgba(255, 71, 87, 0.2);
  border-color: var(--error);
  color: var(--error);
  transform: rotate(90deg);
}

/* Messages */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--skynet-deepest);
}

.ai-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 10px;
}

.ai-message {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--duration-normal) var(--ease-out);
}

.ai-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-message-user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message-avatar svg {
  width: 18px;
  height: 18px;
  color: var(--white);
}

.message-bubble {
  max-width: 75%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  line-height: 1.5;
  word-wrap: break-word;
}

.ai-message-bot .message-bubble {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--gray-300);
  border-bottom-left-radius: 4px;
}

.ai-message-user .message-bubble {
  background: var(--gradient-primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-glow-primary);
}

/* Typing indicator */
.ai-typing .message-bubble {
  padding: var(--space-4);
}

.typing-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--skynet-primary);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--ai-neon-green);
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--skynet-secondary);
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Contact Buttons Container */
.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

/* Base Contact Button */
.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-xl);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  transition: all var(--duration-fast) var(--ease-out);
}

.contact-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* WhatsApp Button */
.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

/* Fiverr Button */
.fiverr-btn {
  background: linear-gradient(135deg, #1DBF73 0%, #00A055 100%);
  box-shadow: 0 4px 20px rgba(29, 191, 115, 0.3);
}

.fiverr-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(29, 191, 115, 0.5);
}

/* Input */
.ai-chat-input {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--skynet-dark);
  border-top: 1px solid var(--glass-border);
}

.ai-chat-input input {
  flex: 1;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3) var(--space-4);
  color: var(--white);
  font-size: var(--text-sm);
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.ai-chat-input input::placeholder {
  color: var(--gray-500);
}

.ai-chat-input input:focus {
  border-color: var(--skynet-primary);
  box-shadow: 0 0 0 3px var(--skynet-primary-glow);
}

.ai-chat-input button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: var(--shadow-glow-primary);
}

.ai-chat-input button svg {
  width: 20px;
  height: 20px;
}

.ai-chat-input button:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow-holographic);
}

.ai-chat-input button:active {
  transform: scale(0.95);
}

/* Quick Actions */
.ai-quick-actions {
  padding: var(--space-4);
  background: var(--skynet-dark);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.quick-action {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  color: var(--gray-300);
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.quick-action:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--skynet-primary);
  color: var(--white);
  transform: translateX(4px);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .skynet-ai-button {
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
  }

  .ai-button-icon svg {
    width: 28px;
    height: 28px;
  }

  .skynet-ai-chat {
    width: calc(100vw - 40px);
    height: calc(100vh - 140px);
    bottom: 95px;
    right: 20px;
  }

  .skynet-ai-notification {
    right: 20px;
    bottom: 95px;
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 480px) {
  .skynet-ai-chat {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
}
