/* Chatbot Styles */
.chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: "Arial", sans-serif;
}

.chatbot-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e37945 0%, #f86e29 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(227, 121, 69, 0.4);
  transition: all 0.3s ease;
}

.chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(227, 121, 69, 0.6);
}

.chatbot-button svg {
  width: 30px;
  height: 30px;
  fill: white;
}

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

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

.chatbot-header {
  background: linear-gradient(135deg, #e37945 0%, #f86e29 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.close-button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
}

.questions-container {
  margin-bottom: 15px;
  animation: fadeIn 0.3s ease-out;
}

.questions-title {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
  text-align: center;
}

.questions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.question-button {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 15px;
  padding: 10px 12px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-family: inherit;
  text-align: center;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.question-button:hover {
  background: linear-gradient(135deg, #e37945 0%, #f86e29 100%);
  color: white;
  border-color: #e37945;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(227, 121, 69, 0.3);
}

.question-button:active {
  transform: translateY(0);
}

.chatbot-quick-replies {
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #e1e5e9;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-reply {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-family: inherit;
}

.quick-reply:hover {
  background: linear-gradient(135deg, #e37945 0%, #f86e29 100%);
  color: white;
  border-color: #e37945;
  transform: translateY(-1px);
}

.quick-reply:active {
  transform: translateY(0);
}

.message {
  margin-bottom: 15px;
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

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

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

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

.message-content {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
}

.message.user .message-content {
  background: linear-gradient(135deg, #e37945 0%, #f86e29 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot .message-content {
  background: white;
  color: #333;
  border: 1px solid #e1e5e9;
  border-bottom-left-radius: 4px;
}

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

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

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

@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.chatbot-input {
  padding: 20px;
  background: white;
  border-top: 1px solid #e1e5e9;
  display: flex;
  gap: 10px;
}

.chatbot-input input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e1e5e9;
  border-radius: 25px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.chatbot-input input:focus {
  border-color: #e37945;
}

.chatbot-input button {
  background: linear-gradient(135deg, #e37945 0%, #f86e29 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.chatbot-input button:hover {
  transform: scale(1.05);
}

.chatbot-input button svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* Responsive Design */
@media (max-width: 480px) {
  .chatbot-window {
    width: 300px;
    height: 450px;
    right: -10px;
  }

  .chatbot-container {
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 768px) {
  .chatbot-container {
    right: 10px;
    bottom: 10px;
  }

  .questions-grid {
    grid-template-columns: 1fr;
  }

  .question-button {
    font-size: 10px;
    padding: 8px 10px;
    min-height: 35px;
  }
}

/* RTL Support for Arabic */
[dir="rtl"] .chatbot-container {
  left: 20px;
  right: auto;
}

[dir="rtl"] .chatbot-window {
  right: auto;
  left: 0;
}

[dir="rtl"] .message.user {
  justify-content: flex-start;
}

[dir="rtl"] .message.bot {
  justify-content: flex-end;
}

[dir="rtl"] .message.user .message-content {
  border-bottom-right-radius: 18px;
  border-bottom-left-radius: 4px;
}

[dir="rtl"] .message.bot .message-content {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 4px;
}
