/* Illumin8OS Styles v2.0 - Correct Branding */

:root {
  /* Primary Accents - Orange/Yellow (from andydoucet.com) */
  --color-accent-yellow: #FFE600;
  --color-accent-yellow-bright: #FFF14A;
  --color-accent-orange: #FF9100;
  --color-accent-orange-bright: #FFB84D;
  
  /* Backgrounds - Dark Theme */
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #111118;
  --color-bg-card: rgba(255, 255, 255, 0.03);
  --color-bg-card-hover: rgba(255, 255, 255, 0.06);
  
  /* Text */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  
  /* Borders */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  
  /* Semantic Colors */
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-base: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-base: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms;
  --transition-base: 200ms;
  --transition-slow: 300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-base);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-yellow), var(--color-accent-orange));
  color: var(--color-bg-primary);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 145, 0, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card);
}

.btn-danger {
  background: var(--color-error);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}

/* Cards */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
}

.card-header {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.card-body {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Inputs */
.input {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  width: 100%;
  transition: all var(--transition-base);
}

.input:focus {
  outline: none;
  border-color: var(--color-accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 145, 0, 0.1);
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.input-group {
  margin-bottom: var(--space-5);
}

/* Login Page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-6);
}

.login-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.logo {
  margin: 0 auto var(--space-8);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

.logo-illumin {
  color: #FFE600;
}

.logo-8 {
  color: #FF9100;
}

.logo-os {
  color: #64748b;
  font-weight: 400;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg, var(--color-accent-yellow), var(--color-accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

/* Chat Interface */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  max-width: 100vw;
  overflow-x: hidden;
}

.chat-header {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.chat-logo {
  width: 32px;
  height: 32px;
}

.chat-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.message {
  display: flex;
  gap: var(--space-3);
  max-width: 70%;
  min-width: 0;
  animation: messageIn 0.2s var(--ease-out);
}

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

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

.message.assistant {
  align-self: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.message-bubble {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.message.user .message-bubble {
  background: var(--color-bg-card-hover);
  border-right: 3px solid var(--color-accent-yellow);
}

.message.assistant .message-bubble {
  border-left: 3px solid var(--color-accent-orange);
}

.message-content {
  color: var(--color-text-primary);
  font-size: 1rem;
  line-height: 1.6;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-timestamp {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

/* Code Blocks in Chat */
.message-content pre {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  overflow-x: auto;
  margin: var(--space-3) 0;
  max-width: 100%;
}

.message-content code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-primary);
}

.message-content :not(pre) > code {
  background: var(--color-bg-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
  color: var(--color-accent-yellow-bright);
}

/* Chat Input */
.chat-input-container {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-6);
  flex-shrink: 0;
}

.chat-input-wrapper {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  resize: none;
  max-height: 150px;
  transition: all var(--transition-base);
}

.chat-input:focus {
  outline: none;
  border-color: var(--color-accent-orange);
}

.chat-input::placeholder {
  color: var(--color-text-muted);
}

.chat-send-btn {
  padding: var(--space-3) var(--space-5);
}

.file-upload-btn {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: var(--space-3);
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: all var(--transition-base);
}

.file-upload-btn:hover {
  border-color: var(--color-accent-orange);
  color: var(--color-accent-orange);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.live {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.deploying {
  background: rgba(255, 145, 0, 0.1);
  color: var(--color-accent-orange);
  border: 1px solid rgba(255, 145, 0, 0.2);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Loading Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-bg-card);
  border-top-color: var(--color-accent-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Bootstrap Icons - Spinning animation for deploying status */
.bi-arrow-repeat.spinning {
  animation: spin 1s linear infinite;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s var(--ease-out);
  position: relative;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 1.125rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  line-height: 1;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-close-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.modal-header {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
  padding-left: 3.75rem;
  padding-top: var(--space-1);
}

.modal-body {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.modal-footer {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* Table (Admin Dashboard) */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
}

.table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.table tbody tr {
  transition: background var(--transition-base);
}

.table tbody tr:hover {
  background: var(--color-bg-card);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Utility Classes */
.gradient-text {
  background: linear-gradient(135deg, var(--color-accent-yellow), var(--color-accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-center {
  text-align: center;
}

.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }

/* Responsive */
@media (max-width: 767px) {
  .chat-messages {
    padding: var(--space-3);
    gap: var(--space-2);
    overflow-x: hidden;
  }
  
  .message {
    max-width: 90%;
    gap: 0;
  }

  /* Hide avatars on mobile */
  .message-avatar {
    display: none;
  }
  
  .message-bubble {
    padding: var(--space-2) var(--space-3);
    max-width: 100%;
  }

  .message-content {
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  /* Keep timestamp on one line */
  .message-timestamp {
    white-space: nowrap;
    font-size: 0.6875rem;
    margin-top: var(--space-1);
  }
  
  .chat-input-container {
    padding: var(--space-3);
  }
  
  .modal {
    padding: var(--space-5);
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-close-btn {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    font-size: 1.125rem;
    min-width: 40px;
    min-height: 40px;
  }

  .modal-header {
    padding-left: 3.75rem;
    font-size: 1.25rem;
  }
}

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-yellow), var(--color-accent-orange));
  color: var(--color-bg-primary);
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 145, 0, 0.4);
  transition: all 0.2s ease;
  z-index: 100;
}

.fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 24px rgba(255, 145, 0, 0.5);
}

.fab:active {
  transform: translateY(0) scale(1);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--color-accent-orange);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent-orange);
  outline-offset: 2px;
}

/* Admin Tenant Switcher (dashboard-specific) */
.admin-tenant-select {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-base);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  min-width: 200px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.admin-tenant-select:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card);
}

.admin-tenant-select:focus {
  outline: none;
  border-color: var(--color-accent-orange);
}

/* Enhanced file card actions */
.file-card-actions {
  display: flex;
  gap: var(--space-2);
}

/* Deployment badges */
.deployment-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-base);
  font-size: 0.875rem;
  font-weight: 500;
}

.deployment-badge.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.deployment-badge.failed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.deployment-badge.deploying {
  background: rgba(255, 145, 0, 0.1);
  color: var(--color-accent-orange);
  border: 1px solid rgba(255, 145, 0, 0.2);
}

.deployment-badge.pending {
  background: rgba(100, 116, 139, 0.1);
  color: var(--color-text-muted);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ─── Chat Message Content (with Emoji Support) ─── */
.message-content {
  font-family: 'Inter', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  line-height: 1.6;
}

/* ─── Message Attachments ─── */
.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.message-image {
  max-width: 300px;
  max-height: 300px;
  border-radius: var(--radius-base);
  cursor: pointer;
  transition: all var(--transition-base);
}

.message-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.message-file-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.message-file-link:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
}

/* ─── File Preview Bar (Upload Progress) ─── */
.file-preview-chip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  font-size: 0.875rem;
  position: relative;
}

.file-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.file-status {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.file-status.uploading {
  color: var(--color-accent-orange);
  animation: pulse 1.5s ease-in-out infinite;
}

.file-status.uploaded {
  color: var(--color-success);
}

.file-status.error {
  color: var(--color-error);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ─── Lightbox ─── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text-primary);
  padding: var(--space-3);
  border-radius: var(--radius-base);
  cursor: pointer;
  font-size: 1.5rem;
  transition: all var(--transition-base);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
  border-radius: var(--radius-lg);
}

/* ─── Deployment Badge Styles ─── */
.deployment-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Streaming rendering (plain text while streaming, markdown on final) ─── */
.message-content.streaming-plain {
  white-space: pre-wrap;
}

/* ─── Thinking Dots (Inside Message Bubble) ─── */
.thinking-dots {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
}

.thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-orange);
  animation: thinking-bounce 1.4s infinite;
}

.thinking-dots span:nth-child(1) {
  animation-delay: 0ms;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 150ms;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 300ms;
}

@keyframes thinking-bounce {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-8px);
  }
}

/* ─── Typing Indicator (Legacy - Keep for Compatibility) ─── */
.typing-indicator {
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.typing-indicator.active {
  display: flex;
}

.typing-indicator .typing-dots {
  display: inline-flex;
}

/* ─── Message Content Wrapper (for button positioning) ─── */
.message-content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* ─── Stop Streaming Button ─── */
.stop-streaming-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: var(--radius-base);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  align-self: flex-start;
}

.stop-streaming-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.stop-streaming-btn i {
  font-size: 0.875rem;
}


/* Deployment Progress Steps */
.deployment-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-base);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}

.deployment-step-icon {
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.deployment-step-icon i.spinning {
  animation: spin 1s linear infinite;
}

.deployment-step-content {
  flex: 1;
}

.deployment-step-title {
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.deployment-step-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
