@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 1s linear infinite; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
.thinking-bubble .thinking-dots span { animation: typing-bounce 1.2s infinite ease-in-out; }
.thinking-bubble .thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-bubble .thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease both; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.slide-down { animation: slideDown 0.3s ease both; }

.action-btn { min-height: 2.5rem; }

/* Global refinements */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Header */
.app-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Cards */
.card {
  background: white;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* Conversation panel — no hover lift */
.card-static {
  background: white;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}

/* Input bar */
.input-bar {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.input-field {
  border: 1.5px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: #fafafa;
}
.input-field:focus {
  outline: none;
  border-color: #00beb7;
  box-shadow: 0 0 0 3px rgba(0, 190, 183, 0.1);
  background: white;
}
.input-field::placeholder { color: #9ca3af; }

/* Send button */
.send-btn {
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.send-btn:hover:not(:disabled) {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-0.5px);
}
.send-btn:active:not(:disabled) { transform: translateY(0); }

/* Chat bubbles */
.bubble-user {
  background: #00beb7;
  color: white;
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 75%;
  box-shadow: 0 1px 3px rgba(0, 190, 183, 0.15);
}

/* A comment sent to the Asana ticket, not a conversation turn. Right-aligned like
   .bubble-user because the support user authored it, but outlined rather than
   filled so it never reads as something Lumen answered. */
.bubble-asana-comment {
  background: #fff;
  color: #374151;
  border: 1px dashed #d1d5db;
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 75%;
}

.bubble-assistant {
  background: #f3f4f6;
  color: #374151;
  border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 85%;
}

.bubble-thinking {
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}

/* Synthesis bubble */
.bubble-synthesis {
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: #374151;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Hub badges */
.badge {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  letter-spacing: 0.01em;
}

/* Cache list items */
.cache-item {
  padding: 0.75rem 0;
  transition: background 0.1s ease;
}
.cache-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Section headers */
.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Cache banner */
.cache-banner {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Action buttons refined */
.action-btn-refined {
  min-height: 2.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  background: white;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  text-decoration: none;
}
.action-btn-refined:hover {
  border-color: #d1d5db;
  color: #374151;
  background: #fafafa;
}

/* Sign-in */
.sign-in-card {
  background: white;
  border-radius: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 3rem 2.5rem;
}

/* Scrollbar refinement for conversation thread and onboarding modal body */
#conversation-thread::-webkit-scrollbar,
#onboarding-body::-webkit-scrollbar { width: 4px; }
#conversation-thread::-webkit-scrollbar-track,
#onboarding-body::-webkit-scrollbar-track { background: transparent; }
#conversation-thread::-webkit-scrollbar-thumb,
#onboarding-body::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 2px; }
#conversation-thread::-webkit-scrollbar-thumb:hover,
#onboarding-body::-webkit-scrollbar-thumb:hover { background: #d1d5db; }

/* Client summary and chat bubble content styles */
#client-summary h1,#client-summary h2,#client-summary h3,#client-summary h4 { font-weight: 600; margin-top: 1.25em; margin-bottom: 0.5em; }
#client-summary h1 { font-size: 1.125rem; }
#client-summary h2 { font-size: 1rem; }
#client-summary h3,#client-summary h4 { font-size: 0.9375rem; }
#client-summary p { margin-bottom: 0.75em; }
#client-summary ul,#client-summary ol { padding-left: 1.5em; margin-bottom: 0.75em; }
#client-summary ul { list-style-type: disc; }
#client-summary ol { list-style-type: decimal; }
#client-summary li { margin-bottom: 0.25em; }
#client-summary code { background: #e5e7eb; padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.8125em; }
#client-summary strong { font-weight: 600; }
#client-summary a { color: #374151; text-decoration: underline; text-underline-offset: 2px; }
#client-summary a:hover { color: #111827; }

.chat-bubble-assistant h1,.chat-bubble-assistant h2,.chat-bubble-assistant h3 { font-weight: 600; margin-top: 0.75em; margin-bottom: 0.25em; font-size: 0.9375rem; }
.chat-bubble-assistant p { margin-bottom: 0.5em; }
.chat-bubble-assistant ul,.chat-bubble-assistant ol { padding-left: 1.25em; margin-bottom: 0.5em; }
.chat-bubble-assistant ul { list-style-type: disc; }
.chat-bubble-assistant ol { list-style-type: decimal; }
.chat-bubble-assistant li { margin-bottom: 0.2em; }
.chat-bubble-assistant code { background: #e5e7eb; padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.8125em; }
.chat-bubble-assistant strong { font-weight: 600; }
.chat-bubble-assistant a { color: #374151; text-decoration: underline; text-underline-offset: 2px; }
.chat-bubble-assistant a:hover { color: #111827; }
.chat-bubble-assistant table { width: 100%; border-collapse: collapse; font-size: 0.8125em; margin-bottom: 0.75em; }
.chat-bubble-assistant th { background: #e5e7eb; font-weight: 600; text-align: left; padding: 0.4em 0.7em; border: 1px solid #d1d5db; white-space: nowrap; }
.chat-bubble-assistant td { padding: 0.35em 0.7em; border: 1px solid #d1d5db; }
.chat-bubble-assistant tr:nth-child(even) td { background: #f9fafb; }

/* Prose in synthesis */
.bubble-synthesis .prose h1,.bubble-synthesis .prose h2,.bubble-synthesis .prose h3 { font-weight: 600; margin-top: 1em; margin-bottom: 0.35em; }
.bubble-synthesis .prose h1 { font-size: 1.0625rem; }
.bubble-synthesis .prose h2 { font-size: 0.9375rem; }
.bubble-synthesis .prose h3 { font-size: 0.875rem; }
.bubble-synthesis .prose p { margin-bottom: 0.6em; }
.bubble-synthesis .prose ul,.bubble-synthesis .prose ol { padding-left: 1.25em; margin-bottom: 0.6em; }
.bubble-synthesis .prose ul { list-style-type: disc; }
.bubble-synthesis .prose ol { list-style-type: decimal; }
.bubble-synthesis .prose li { margin-bottom: 0.2em; }
.bubble-synthesis .prose code { background: #e5e7eb; padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.8125em; }
.bubble-synthesis .prose a { color: #374151; text-decoration: underline; text-underline-offset: 2px; }
.bubble-synthesis .prose a:hover { color: #111827; }
.bubble-synthesis .prose hr { border: none; border-top: 1px solid #e5e7eb; margin: 1em 0; }
.bubble-synthesis .prose strong { font-weight: 600; }
.bubble-synthesis .prose table { width: 100%; border-collapse: collapse; font-size: 0.8125em; margin-bottom: 0.75em; }
.bubble-synthesis .prose th { background: #f3f4f6; font-weight: 600; text-align: left; padding: 0.4em 0.7em; border: 1px solid #e5e7eb; }
.bubble-synthesis .prose td { padding: 0.35em 0.7em; border: 1px solid #e5e7eb; }
.bubble-synthesis .prose tr:nth-child(even) td { background: #fafafa; }

/* Stale-deploy banner (version.js). Styled here rather than with Tailwind utilities:
   the banner is injected after load, and the Play CDN's JIT doesn't generate every
   utility for dynamically-added markup (-translate-x-1/2 silently didn't apply). */
/* Own entrance animation rather than .fade-in: that one ends on translateY(0) with
   fill-mode both, which would overwrite the centring translate and park the banner
   half off-screen. */
@keyframes staleBannerIn {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.stale-version-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  animation: staleBannerIn 0.3s ease both;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(32rem, calc(100vw - 2rem));
  background: #111827;
  color: #fff;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2), 0 4px 6px -4px rgb(0 0 0 / 0.2);
  padding: 0.75rem 1rem;
}

.stale-version-banner svg { width: 1rem; height: 1rem; flex-shrink: 0; color: #fbbf24; }

.stale-version-banner button {
  flex-shrink: 0;
  background: #fff;
  color: #111827;
  font-weight: 500;
  border-radius: 0.25rem;
  padding: 0.25rem 0.75rem;
  transition: background 0.15s ease;
}

.stale-version-banner button:hover { background: #f3f4f6; }
