/* Chatbot Styles */

/* AI Booking button */
.ai-booking-button {
  position: fixed;
  bottom: 100px;
  right: 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9998;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #374151;
  font-weight: 500;
}

.ai-booking-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #F1D164;
  border-color: #F1D164;
  color: #060B0F;
}

.ai-booking-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Chat button */
.chatbot-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F1D164 0%, #D7B44E 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: all 0.3s ease;
}

.chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.chatbot-button svg {
  width: 28px;
  height: 28px;
  fill: #060B0F;
}

/* Notification badge */
.chatbot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: white;
  border: 2px solid white;
}

/* Chat window */
.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 150px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chatbot-window.open {
  display: flex;
}

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

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, #F1D164 0%, #D7B44E 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px 16px 0 0;
}

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

.chatbot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #060B0F;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chatbot-title {
  display: flex;
  flex-direction: column;
}

.chatbot-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #060B0F;
}

.chatbot-title span {
  font-size: 12px;
  color: #060B0F;
  opacity: 0.8;
}

.chatbot-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #060B0F;
  transition: transform 0.2s;
}

.chatbot-close:hover {
  transform: rotate(90deg);
}

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

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

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

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

/* Message bubble */
.chatbot-message {
  display: flex;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

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

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

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

.chatbot-message.bot .message-avatar {
  background: linear-gradient(135deg, #F1D164 0%, #D7B44E 100%);
  color: #060B0F;
}

.chatbot-message.user .message-avatar {
  background: #060B0F;
  color: #F1D164;
}

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

.chatbot-message.bot .message-content {
  background: white;
  color: #1f2937;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chatbot-message.user .message-content {
  background: #060B0F;
  color: white;
  border-bottom-right-radius: 4px;
}

.message-timestamp {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  text-align: right;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-radius: 16px;
  width: fit-content;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  animation: typing 1.4s 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.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Quick options */
.chatbot-quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.quick-option {
  background: white;
  border: 1px solid #e5e7eb;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #374151;
}

.quick-option:hover {
  background: #F1D164;
  border-color: #F1D164;
  color: #060B0F;
  transform: translateY(-2px);
}

/* Input area */
.chatbot-input-area {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  background: white;
  border-radius: 0 0 16px 16px;
}

.chatbot-input-container {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chatbot-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  transition: border-color 0.2s;
}

.chatbot-input:focus {
  outline: none;
  border-color: #F1D164;
}

.chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F1D164 0%, #D7B44E 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chatbot-send:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(241, 209, 100, 0.4);
}

.chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatbot-send svg {
  width: 20px;
  height: 20px;
  fill: #060B0F;
}

/* Powered by */
.chatbot-powered {
  text-align: center;
  padding: 8px;
  font-size: 11px;
  color: #9ca3af;
  border-top: 1px solid #f3f4f6;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .chatbot-window {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .chatbot-button {
    bottom: 16px;
    right: 16px;
  }

  .ai-booking-button {
    bottom: 88px;
    right: 16px;
    font-size: 12px;
    padding: 8px 14px;
  }
}

/* Message markdown support */
.message-content strong {
  font-weight: 600;
  color: #111827;
}

.message-content ul,
.message-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 4px 0;
}

.message-content a {
  color: #2563eb;
  text-decoration: underline;
}

.chatbot-message.user .message-content a {
  color: #F1D164;
}
