/* Na'Vi Chat Widget Styles */

/* CSS Variables */
:root {
  --navi-primary: #0dd675;
}

/* Base styles */
.navi-chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--navi-primary) 20%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.navi-chat-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--navi-primary) 30%, transparent);
}

.navi-chat-button img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}


/* Modal styles */
.navi-chat-modal {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  height: 600px;
  background: #0a0a0a;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 999999;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  display: none;
  animation: slideIn 0.3s ease;
}

@media (max-width: 480px) {
  .navi-chat-modal {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
  }
}

.navi-chat-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Header styles */
.navi-chat-header {
  padding: 16px 20px;
  background: #131313;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navi-chat-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
}

.navi-chat-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.navi-chat-close:hover {
  opacity: 1;
}

/* Messages container */
.navi-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Custom scrollbar */
.navi-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.navi-chat-messages::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.navi-chat-messages::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 3px;
}

/* Message bubbles */
.navi-chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

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

.navi-chat-message.ai {
  align-self: flex-start;
}

.navi-chat-message-content {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.navi-chat-message.user .navi-chat-message-content {
  background: var(--navi-primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.navi-chat-message.ai .navi-chat-message-content {
  background: #131313;
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

/* Suggested prompts */
.navi-chat-prompts-container {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 20px;
  position: relative;
}

.navi-chat-prompts-toggle {
  background: none;
  border: none;
  color: var(--navi-primary);
  cursor: pointer;
  display: block;
  margin: 0 auto 8px;
  padding: 4px;
  transition: transform 0.3s ease;
}

.navi-chat-prompts-toggle.rotated {
  transform: rotate(180deg);
}

.navi-chat-suggested-prompts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow: hidden;
  max-height: 200px; /* Adjust as needed */
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.navi-chat-suggested-prompts.hidden {
  max-height: 0;
  opacity: 0;
}

.navi-chat-prompt {
  background: #131313;
  border: 1px solid color-mix(in srgb, var(--navi-primary) 30%, transparent);
  color: var(--navi-primary);
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.navi-chat-prompt:hover {
  background: color-mix(in srgb, var(--navi-primary) 10%, transparent);
  border-color: var(--navi-primary);
}

/* Input area */
.navi-chat-input-container {
  padding: 16px 20px;
  background: #131313;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 12px 12px;
  display: flex;
  gap: 12px;
}

.navi-chat-input {
  flex: 1;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
}

.navi-chat-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--navi-primary) 50%, transparent);
}

.navi-chat-send {
  background: var(--navi-primary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.navi-chat-send:hover {
  background: color-mix(in srgb, var(--navi-primary) 90%, black);
}

.navi-chat-send svg {
  color: #ffffff;
}

/* Loading animation */
.navi-chat-loading {
  display: flex;
  gap: 4px;
  padding: 8px 0;
}

.navi-chat-loading div {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: bounce 0.8s infinite;
}

.navi-chat-loading div:nth-child(2) {
  animation-delay: 0.2s;
}

.navi-chat-loading div:nth-child(3) {
  animation-delay: 0.4s;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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