/* Rihla FAQ Chatbot Styles */
/* Professional & Classy Design - Minimalist Black & White Aesthetic */

/* Floating trigger button */
.chatbot-trigger {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  animation: jumpBounce 2s ease-in-out infinite;
}

@keyframes jumpBounce {
  0%, 100% {
    transform: translateY(0);
  }
  10% {
    transform: translateY(-20px);
  }
  20% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-12px);
  }
  40% {
    transform: translateY(0);
  }
}

.chatbot-trigger:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
}

.chatbot-trigger:active {
  transform: scale(0.98);
}

.chatbot-trigger.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

/* Chat window */
.chatbot-window {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 420px;
  max-width: calc(100vw - 64px);
  height: 640px;
  max-height: calc(100vh - 120px);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s ease;
  font-family: 'Barlow', sans-serif;
  overflow: hidden;
}

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

/* Header */
.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header h3 {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Barlow', sans-serif;
}

.chatbot-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Messages container */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Minimalist scrollbar */
.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Message bubbles */
.chatbot-message {
  display: flex;
  margin-bottom: 4px;
  animation: messageSlideIn 0.4s ease;
}

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

.chatbot-message.bot {
  justify-content: flex-start;
}

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

.message-bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.chatbot-message.bot .message-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 14px 14px 14px 3px;
}

.chatbot-message.user .message-bubble {
  background: #fff;
  color: #000;
  border-radius: 14px 14px 3px 14px;
  font-weight: 500;
}

.message-bubble strong {
  color: #fff;
  font-weight: 600;
}

.chatbot-message.user .message-bubble strong {
  color: #000;
  font-weight: 700;
}

/* Buttons container */
.chatbot-buttons {
  padding: 0 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Option buttons - Clean minimal style */
.chatbot-option-btn {
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.01em;
}

.chatbot-option-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(4px);
}

.chatbot-option-btn:active {
  transform: translateX(4px) scale(0.98);
}

/* Navigation buttons - Subtle style */
.chatbot-nav-btn {
  width: 100%;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.02em;
}

.chatbot-nav-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Text input area */
.chatbot-input-area {
  padding: 20px 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.chatbot-text-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-family: 'Barlow', sans-serif;
  resize: none;
  max-height: 120px;
  transition: all 0.3s ease;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.chatbot-text-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.chatbot-text-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.chatbot-send-btn {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: #fff;
  border: none;
  border-radius: 12px;
  color: #000;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

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

/* Mobile responsive */
@media (max-width: 768px) {
  .chatbot-window {
    width: calc(100vw - 48px);
    height: calc(100vh - 120px);
    bottom: 24px;
    right: 24px;
  }

  .chatbot-trigger {
    width: 60px;
    height: 60px;
    bottom: 24px;
    right: 24px;
    font-size: 26px;
  }

  .chatbot-header {
    padding: 20px 24px;
  }

  .chatbot-header h3 {
    font-size: 13px;
  }

  .chatbot-messages {
    padding: 20px 24px;
    gap: 14px;
  }

  .message-bubble {
    font-size: 13px;
    padding: 12px 16px;
  }

  .chatbot-buttons {
    padding: 0 24px 20px;
    gap: 8px;
  }

  .chatbot-option-btn,
  .chatbot-nav-btn {
    font-size: 13px;
    padding: 12px 16px;
  }

  .chatbot-input-area {
    padding: 16px 24px 20px;
  }
}

/* Small mobile - Full screen */
@media (max-width: 480px) {
  .chatbot-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }

  .chatbot-trigger {
    bottom: 20px;
    right: 20px;
  }
}

/* Loading animation - Minimal */
.loading-dots {
  display: inline-block;
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}

.loading-dots span {
  animation: minimalDot 1.4s ease-in-out infinite;
  opacity: 0;
  color: #fff;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

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

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

@keyframes minimalDot {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
