/* AI Chatbot Styles */
.chatbot-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

/* Chat Toggle Button */
.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a18 0%, #ff2d80 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 122, 24, 0.4),
              0 0 0 0 rgba(255, 122, 24, 0.4);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(255, 122, 24, 0.5);
}

.chat-toggle.active {
  transform: scale(0.9);
}

.chat-toggle i {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #00ff88;
  color: #050915;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  border: 2px solid #050915;
}

/* Chat Window */
.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 400px;
  max-width: calc(100vw - 4rem);
  height: 600px;
  max-height: calc(100vh - 12rem);
  background: linear-gradient(135deg, rgba(5, 9, 21, 0.98) 0%, rgba(10, 15, 30, 0.98) 100%);
  border: 2px solid rgba(255, 122, 24, 0.3);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(255, 122, 24, 0.15);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(20px);
}

.chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Chat Header */
.chat-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.1) 0%, rgba(255, 45, 128, 0.1) 100%);
  border-bottom: 1px solid rgba(255, 122, 24, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px 18px 0 0;
}

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

.chat-header-info i {
  font-size: 24px;
  color: #ff7a18;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.6rem;
  color: #f7f8fb;
  font-weight: 600;
}

.chat-status {
  font-size: 1.2rem;
  color: #9aa3b8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: #9aa3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.chat-close-btn:hover {
  color: #ff2d80;
  background: rgba(255, 45, 128, 0.1);
}

/* Messages Container */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

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

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 122, 24, 0.3);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 122, 24, 0.5);
}

/* Message Bubbles */
.chat-message {
  display: flex;
  gap: 1rem;
  animation: slideIn 0.3s ease-out;
}

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

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.bot-message .message-avatar {
  background: linear-gradient(135deg, #ff7a18, #ff2d80);
  color: white;
}

.user-message .message-avatar {
  background: rgba(154, 163, 184, 0.2);
  color: #9aa3b8;
}

.message-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem 1.3rem;
  border-radius: 12px;
  color: #e8ecf5;
  font-size: 1.4rem;
  line-height: 1.6;
  max-width: 75%;
  word-wrap: break-word;
}

.bot-message .message-content {
  border: 1px solid rgba(255, 122, 24, 0.2);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.08) 0%, rgba(255, 45, 128, 0.08) 100%);
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-content {
  background: linear-gradient(135deg, #ff7a18, #ff2d80);
  color: white;
  border: none;
}

/* Typing Indicator */
.typing-indicator .message-content {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #ff7a18;
  border-radius: 50%;
  animation: typing 1.4s ease-in-out infinite;
}

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

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

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

/* Suggestions */
.chat-suggestions {
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-btn {
  background: rgba(255, 122, 24, 0.1);
  border: 1px solid rgba(255, 122, 24, 0.3);
  color: #ff7a18;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.suggestion-btn:hover {
  background: rgba(255, 122, 24, 0.2);
  border-color: rgba(255, 122, 24, 0.5);
  transform: translateY(-2px);
}

/* Schedule Meeting Button */
.schedule-meeting-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ff7a18, #ff2d80);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 122, 24, 0.3);
}

.schedule-meeting-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 122, 24, 0.5);
}

.schedule-meeting-btn i {
  font-size: 1.6rem;
}

/* Schedule Buttons */
.schedule-buttons a {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.8rem 1.2rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  color: white;
  transition: background-color 0.3s ease;
}

.schedule-buttons a.primary {
  background: linear-gradient(135deg, #ff7a18, #ff2d80);
}

.schedule-buttons a.primary:hover {
  background: linear-gradient(135deg, #ff2d80, #ff7a18);
}

.schedule-buttons a.secondary {
  background: #555;
}

.schedule-buttons a.secondary:hover {
  background: #333;
}

/* Input Container */
.chat-input-container {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 122, 24, 0.2);
  display: flex;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 0 18px 18px;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 122, 24, 0.2);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  color: #e8ecf5;
  font-size: 1.4rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.chat-input::placeholder {
  color: #9aa3b8;
}

.chat-input:focus {
  outline: none;
  border-color: rgba(255, 122, 24, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.1);
}

.chat-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a18, #ff2d80);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 122, 24, 0.4);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chatbot-container {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .chat-toggle {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .chat-window {
    width: calc(100vw - 3rem);
    height: calc(100vh - 10rem);
    bottom: 75px;
    right: -1.5rem;
  }

  .chat-header h3 {
    font-size: 1.4rem;
  }

  .chat-status {
    font-size: 1.1rem;
  }

  .message-content {
    font-size: 1.3rem;
    max-width: 80%;
  }

  .chat-suggestions {
    padding: 1rem;
  }

  .suggestion-btn {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .chat-window {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
    border: none;
  }

  .chat-header {
    border-radius: 0;
  }

  .chat-input-container {
    border-radius: 0;
  }
}
