/* Nova Blaze Chat UI */

/* === Layout === */
.chat-shell {
  display: flex;
  min-height: 100vh;
  padding-top: 80px;
  gap: 0;
}

/* === Sidebar === */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nova-orb-sm {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFB84D 0%, #E8A838 50%, #B8780A 100%);
  box-shadow: 0 0 8px rgba(232,168,56,0.4);
  flex-shrink: 0;
}

.sidebar-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

.stage-tracker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-30);
}

.stage-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gold-dim);
  border: 1px solid rgba(232,168,56,0.25);
  border-radius: 6px;
  padding: 14px 16px;
}

.stage-icon {
  font-size: 1.4rem;
}

.stage-name {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}

.stage-desc {
  font-size: 0.75rem;
  color: var(--white-50);
  margin-top: 2px;
}

.stage-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.stage-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #E8A838, #FFB84D);
  border-radius: 2px;
}

.stage-progress {
  font-size: 0.7rem;
  color: var(--white-40);
  text-align: right;
}

.curriculum-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.curriculum-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--white-40);
  padding: 8px 12px;
  border-radius: 4px;
}

.curriculum-item.active {
  background: var(--gold-dim);
  color: var(--gold);
}

.curriculum-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.curriculum-item.active .curriculum-dot {
  background: var(--gold);
  box-shadow: 0 0 6px rgba(232,168,56,0.5);
}

/* === Chat Main === */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.chat-header-info {
  display: flex;
  flex-direction: column;
}

.chat-header-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.chat-header-status {
  font-size: 0.75rem;
  color: var(--white-40);
  margin-top: 2px;
}

/* === Messages === */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 720px;
}

.message.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.message-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFB84D 0%, #E8A838 50%, #B8780A 100%);
  box-shadow: 0 0 10px rgba(232,168,56,0.35);
  flex-shrink: 0;
  margin-top: 4px;
}

.message-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  flex-shrink: 0;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-user-avatar::after {
  content: '👤';
  font-size: 0.8rem;
}

.message-content {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}

.message.user .message-content {
  background: var(--bg-surface);
}

.message-content p {
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.65;
  margin: 0 0 8px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content strong {
  color: var(--gold);
  font-weight: 600;
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white-30);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

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

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); background: var(--white-30); }
  30% { transform: translateY(-4px); background: var(--gold); }
}

/* === Input === */
.chat-input-area {
  padding: 20px 32px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.chat-form {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 8px 8px 20px;
  transition: border-color 0.2s;
}

.chat-form:focus-within {
  border-color: rgba(232,168,56,0.4);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-input::placeholder {
  color: var(--white-30);
}

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gold);
  border: none;
  color: #07070C;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.chat-send:hover {
  background: #FFB84D;
  transform: scale(1.05);
}

.chat-send:disabled {
  background: var(--white-20);
  color: var(--white-30);
  cursor: not-allowed;
  transform: none;
}

.chat-disclaimer {
  font-size: 0.7rem;
  color: var(--white-20);
  margin-top: 8px;
  text-align: center;
}

/* === Responsive === */
@media (max-width: 768px) {
  .chat-shell {
    flex-direction: column;
    padding-top: 70px;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
  }

  .stage-tracker { flex: 1; }
  .curriculum-list { flex-direction: row; }
  .curriculum-item span:not(.curriculum-dot) { display: none; }

  .chat-messages { padding: 20px 16px; }
  .chat-input-area { padding: 16px; }
}