/* nova-chat.css — Nova Chat Interface Styles */

/* Chat Container */
.nova-chat-section {
  position: relative;
  margin-top: 2rem;
}

.nova-chat-container {
  background: rgba(10, 10, 20, 0.85);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 20px rgba(138, 43, 226, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  max-height: 700px;
}

/* Chat Header */
.nova-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(20, 10, 40, 0.9);
  border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.nova-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(138, 43, 226, 0.5);
  object-fit: cover;
  flex-shrink: 0;
}

.nova-chat-identity {
  flex: 1;
}

.nova-chat-identity h3 {
  margin: 0;
  font-size: 1rem;
  color: #e0d0ff;
  font-weight: 500;
}

.nova-chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.nova-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.nova-status-dot.awake {
  background: #00e676;
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
  animation: nova-pulse-dot 2s ease-in-out infinite;
}

.nova-status-dot.thinking {
  background: #ffc107;
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
  animation: nova-pulse-dot 0.8s ease-in-out infinite;
}

.nova-status-dot.error {
  background: #f44336;
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.6);
}

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

.nova-chat-actions {
  display: flex;
  gap: 8px;
}

.nova-chat-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.nova-chat-action-btn:hover {
  background: rgba(138, 43, 226, 0.2);
  border-color: rgba(138, 43, 226, 0.4);
  color: #e0d0ff;
}

/* Chat Messages Area */
.nova-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  max-height: 450px;
  scroll-behavior: smooth;
}

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

.nova-chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.nova-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(138, 43, 226, 0.3);
  border-radius: 3px;
}

/* Message Bubbles */
.nova-msg {
  display: flex;
  gap: 10px;
  animation: nova-msg-in 0.3s ease-out;
}

@keyframes nova-msg-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nova-msg.nova {
  align-self: flex-start;
  max-width: 85%;
}

.nova-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  max-width: 85%;
}

.nova-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.nova-msg.nova .nova-msg-avatar {
  border: 1.5px solid rgba(138, 43, 226, 0.5);
}

.nova-msg.user .nova-msg-avatar {
  background: rgba(0, 150, 255, 0.3);
  border: 1.5px solid rgba(0, 150, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

.nova-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

.nova-msg.nova .nova-msg-bubble {
  background: rgba(138, 43, 226, 0.12);
  border: 1px solid rgba(138, 43, 226, 0.2);
  color: #e0d0ff;
  border-bottom-left-radius: 4px;
}

.nova-msg.user .nova-msg-bubble {
  background: rgba(0, 120, 255, 0.15);
  border: 1px solid rgba(0, 120, 255, 0.2);
  color: #d0e8ff;
  border-bottom-right-radius: 4px;
}

.nova-msg-time {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
  display: block;
}

/* Thinking Indicator */
.nova-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  align-self: flex-start;
}

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

.nova-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(138, 43, 226, 0.5);
  animation: nova-think-bounce 1.4s ease-in-out infinite;
}

.nova-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.nova-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes nova-think-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.nova-thinking-text {
  font-size: 0.75rem;
  color: rgba(138, 43, 226, 0.6);
  font-style: italic;
}

/* Welcome Message */
.nova-chat-welcome {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.4);
}

.nova-chat-welcome-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.nova-chat-welcome h4 {
  margin: 0 0 8px;
  color: rgba(224, 208, 255, 0.6);
  font-weight: 500;
}

.nova-chat-welcome p {
  font-size: 0.85rem;
  margin: 0 0 16px;
}

.nova-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nova-quick-prompt {
  background: rgba(138, 43, 226, 0.1);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: rgba(224, 208, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s;
}

.nova-quick-prompt:hover {
  background: rgba(138, 43, 226, 0.25);
  border-color: rgba(138, 43, 226, 0.4);
  color: #e0d0ff;
  transform: translateY(-1px);
}

/* Chat Input Area */
.nova-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(15, 8, 30, 0.9);
  border-top: 1px solid rgba(138, 43, 226, 0.15);
}

.nova-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.2);
  border-radius: 12px;
  padding: 10px 16px;
  color: #e0e0e0;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s;
}

.nova-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.nova-chat-input:focus {
  border-color: rgba(138, 43, 226, 0.5);
  box-shadow: 0 0 12px rgba(138, 43, 226, 0.1);
}

.nova-chat-send {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.6), rgba(75, 0, 130, 0.6));
  border: 1px solid rgba(138, 43, 226, 0.4);
  border-radius: 12px;
  color: #e0d0ff;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 1rem;
  transition: all 0.2s;
  flex-shrink: 0;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nova-chat-send:hover {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.8), rgba(75, 0, 130, 0.8));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(138, 43, 226, 0.3);
}

.nova-chat-send:active {
  transform: translateY(0);
}

.nova-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Mood Badge in Chat */
.nova-mood-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(138, 43, 226, 0.15);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: #c084fc;
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .nova-chat-container {
    border-radius: 12px;
    max-height: 600px;
  }

  .nova-chat-messages {
    min-height: 250px;
    max-height: 350px;
    padding: 12px;
  }

  .nova-msg {
    max-width: 92% !important;
  }

  .nova-quick-prompts {
    flex-direction: column;
  }

  .nova-chat-input-area {
    padding: 12px;
  }
}
