/* Skeyy Chatbot Styles */
#skeyy-chatbot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Toggle Button */
.chatbot-toggle {
  position: relative;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.chatbot-icon {
  width: 28px;
  height: 28px;
  color: white;
}

.chatbot-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: bounce 1s infinite;
}

/* Chat Window */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 40px);
    height: 70vh;
    bottom: 80px;
    right: -10px;
  }
}

/* Chat Header */
.chatbot-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-avatar svg {
  width: 20px;
  height: 20px;
}

.chatbot-header-text h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chatbot-status {
  font-size: 12px;
  opacity: 0.9;
}

.chatbot-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.chatbot-close svg {
  width: 20px;
  height: 20px;
}

/* Messages Container */
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8f9fa;
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

/* Message Styles */
.chatbot-message {
  display: flex;
  max-width: 85%;
  animation: fadeInUp 0.3s ease-out;
}

.chatbot-message.user {
  align-self: flex-end;
}

.chatbot-message.bot {
  align-self: flex-start;
}

.message-content {
  background: white;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.chatbot-message.user .message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom-right-radius: 6px;
}

.chatbot-message.bot .message-content {
  border-bottom-left-radius: 6px;
}

.message-text {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  text-align: right;
}

/* Typing Indicator */
.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 85%;
  align-self: flex-start;
}

.typing-indicator {
  display: flex;
  gap: 4px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #667eea;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

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

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

.chatbot-typing span {
  font-size: 12px;
  color: #666;
}

/* Input Container */
.chatbot-input-container {
  background: white;
  border-top: 1px solid #eee;
}

.chatbot-quick-replies {
  padding: 12px 20px 0;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-reply-btn {
  background: #f1f3f4;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #333;
}

.quick-reply-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.chatbot-input-wrapper {
  display: flex;
  align-items: flex-end;
  padding: 16px 20px;
  gap: 12px;
}

#chatbot-input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 12px 16px;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  min-height: 20px;
  max-height: 80px;
  overflow-y: auto;
}

#chatbot-input:focus {
  border-color: #667eea;
}

#chatbot-send {
  background: #667eea;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
}

#chatbot-send:hover {
  background: #5a67d8;
  transform: scale(1.05);
}

#chatbot-send svg {
  width: 20px;
  height: 20px;
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6);
  }
  100% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

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

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

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .chatbot-window {
    background: #2d3748;
  }
  
  .chatbot-messages {
    background: #1a202c;
  }
  
  .chatbot-message.bot .message-content {
    background: #4a5568;
    color: white;
  }
  
  .chatbot-typing {
    background: #4a5568;
    color: white;
  }
  
  .chatbot-input-container {
    background: #2d3748;
    border-top-color: #4a5568;
  }
  
  #chatbot-input {
    background: #4a5568;
    border-color: #718096;
    color: white;
  }
  
  #chatbot-input::placeholder {
    color: #a0aec0;
  }
  
  .quick-reply-btn {
    background: #4a5568;
    border-color: #718096;
    color: white;
  }
}
