/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

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

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Pending Action Card (Confirmation, OAuth, Variable) */
.pending-action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0.5rem 0;
}

.pending-icon {
  font-size: 1.25rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pending-icon .agent-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.pending-content {
  flex: 1;
}

.pending-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.pending-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
}

.pending-desc .cost-amount {
  font-weight: 600;
  color: var(--accent);
}

.pending-actions {
  display: flex;
  gap: 0.5rem;
}

/* Image Attachments */
.attach-btn {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: color 0.2s;
}

.attach-btn:hover {
  color: var(--accent);
}

/* Image Preview Area */
.image-preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  animation: slideUp 0.2s ease-out;
}

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

.image-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.2s, transform 0.2s;
}

.image-preview-item:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

.image-preview-item.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}

.image-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: background 0.2s, transform 0.2s;
}

.preview-remove:hover {
  background: #ef4444;
  transform: scale(1.1);
}

/* Message Images */
.message-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.message-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s;
  object-fit: cover;
}

.message-image:hover {
  transform: scale(1.02);
}

