/* Chat Panel */
.chat-panel {
  width: 400px;
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
  border-left: 1px solid var(--border);
  min-width: 0;
  overflow: hidden;
}

/* When collapsed, hide all content but keep element in DOM */
.chat-panel.collapsed {
  width: 0 !important;
  min-width: 0;
  overflow: hidden;
  border-left: none;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
}

.chat-messages-inner {
  padding: 16px;
  position: relative;
}

.chat-spinner-card {
  height: 132px;
  display: flex;
  align-items: flex-start;
  padding: 8px 16px 100px;
}

.chat-spinner-card .spinner {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.chat-spinner-card.active .spinner {
  opacity: 1;
}

#progress {
  padding: 8px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

#progress.hidden {
  display: none;
}

#progress::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: progress-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes progress-spin {
  to { transform: rotate(360deg); }
}
