/**
 * Enhanced Amrikyy AI Chatbot Styles
 * High-quality modern design
 */

/* Floating Chat Button */
.amrikyy-chat-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(145deg, rgba(0, 20, 40, 0.95), rgba(26, 26, 46, 0.95));
  border: 2px solid var(--neon-blue);
  border-radius: 25px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 212, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 1000;
  max-width: 280px;
  animation: breathe 3s ease-in-out infinite;
}

.amrikyy-chat-button:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(0, 212, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: var(--neon-green);
}

.amrikyy-chat-button.chat-open {
  transform: scale(0.8);
  opacity: 0.7;
}

.chat-btn-avatar {
  position: relative;
  flex-shrink: 0;
}

.avatar-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  object-fit: cover;
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 20, 40, 0.95);
}

.status-indicator.online {
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse 2s ease-in-out infinite;
}

.chat-btn-text {
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
}

.chat-btn-name {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--neon-blue);
}

.chat-btn-status {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
  color: var(--neon-green);
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Chat Container */
.enhanced-chatbot-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 420px;
  height: 600px;
  z-index: 1001;
  transform: translateY(100%) scale(0.8);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

.enhanced-chatbot-container.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.enhanced-chatbot-container.minimized {
  height: 80px;
  overflow: hidden;
}

.chatbot-window {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, rgba(0, 20, 40, 0.98), rgba(26, 26, 46, 0.98));
  border: 2px solid var(--neon-blue);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 212, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), rgba(57, 255, 20, 0.1));
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.chatbot-avatar {
  position: relative;
}

.header-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 20, 40, 0.98);
}

.status-dot.online {
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.header-info {
  flex: 1;
}

.chatbot-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--neon-blue);
  margin: 0 0 0.2rem 0;
}

.chatbot-title {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  display: block;
}

.typing-indicator {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.typing-text {
  font-size: 0.75rem;
  color: var(--neon-green);
  font-style: italic;
}

.typing-dots {
  display: flex;
  gap: 2px;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--neon-green);
  animation: typingBounce 1.4s ease-in-out infinite;
}

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

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

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.minimize-btn, .close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.minimize-btn:hover, .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.1);
}

.close-btn:hover {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
}

/* Messages */
.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

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

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

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

.message {
  display: flex;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.message.visible {
  opacity: 1;
  transform: translateY(0);
}

.message.user-message {
  justify-content: flex-end;
}

.message.user-message .message-content {
  background: linear-gradient(145deg, var(--neon-blue), #0084cc);
  color: #000;
  border-radius: 18px 18px 4px 18px;
  max-width: 80%;
}

.message.bot-message {
  align-items: flex-start;
}

.message-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--neon-green);
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-content {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 18px 18px 18px 4px;
  max-width: 85%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.sender-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--neon-green);
  font-family: 'Orbitron', sans-serif;
}

.message-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.user-message .message-time {
  color: rgba(0, 0, 0, 0.6);
  margin-top: 0.5rem;
  text-align: right;
}

.message-text {
  color: #ffffff;
  line-height: 1.5;
  word-wrap: break-word;
}

.user-message .message-text {
  color: #000;
}

.message-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message:hover .message-actions {
  opacity: 1;
}

.action-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.action-btn:hover {
  color: var(--neon-blue);
  background: rgba(0, 212, 255, 0.1);
}

.action-btn.liked {
  color: var(--neon-green);
}

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.quick-actions::-webkit-scrollbar {
  height: 4px;
}

.quick-actions::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.quick-actions::-webkit-scrollbar-thumb {
  background: var(--neon-blue);
  border-radius: 2px;
}

.quick-btn {
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Orbitron', sans-serif;
}

.quick-btn:hover {
  background: var(--neon-green);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(57, 255, 20, 0.3);
}

/* Input Area */
.chatbot-input-area {
  padding: 1rem;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.input-container {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 25px;
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.input-container:focus-within {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.attachment-btn, .emoji-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attachment-btn:hover, .emoji-btn:hover {
  color: var(--neon-blue);
  background: rgba(0, 212, 255, 0.1);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  resize: none;
  outline: none;
  min-height: 20px;
  max-height: 120px;
  line-height: 1.4;
  font-family: inherit;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.send-btn {
  background: linear-gradient(145deg, var(--neon-green), #2dd60a);
  border: none;
  color: #000;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(57, 255, 20, 0.3);
}

.send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(57, 255, 20, 0.4);
}

.input-footer {
  margin-top: 0.5rem;
  text-align: center;
}

.powered-by {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Orbitron', sans-serif;
}

/* Toast Notifications */
.chat-toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: linear-gradient(145deg, rgba(57, 255, 20, 0.95), rgba(45, 214, 10, 0.95));
  color: #000;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1002;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(57, 255, 20, 0.3);
}

.chat-toast.show {
  transform: translateX(0);
}

/* Animations */
@keyframes breathe {
  0%, 100% { 
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
  }
  50% { 
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.5);
  }
}

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

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-8px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .enhanced-chatbot-container {
    width: calc(100% - 2rem);
    height: calc(100% - 4rem);
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .amrikyy-chat-button {
    bottom: 1rem;
    right: 1rem;
    max-width: 200px;
  }

  .chat-btn-text {
    display: none;
  }

  .chatbot-header {
    padding: 1rem;
  }

  .quick-actions {
    padding: 0 0.5rem;
  }
}
