/* AgiLean.Ai — custom layer over Tailwind CDN */

html { scroll-behavior: smooth; }

body {
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection { background: rgba(124, 224, 199, 0.3); color: #e7ecf6; }

/* Scrollbar — only the chat stream */
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: rgba(155, 166, 194, 0.25) transparent; }
.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(155, 166, 194, 0.18); border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(155, 166, 194, 0.35); }

/* Coach bubble base */
.bubble {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: bubble-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bubble.bot {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(155,166,194,0.15);
  color: #e7ecf6;
  margin-right: auto;
}
.bubble.user {
  background: linear-gradient(135deg, rgba(124,224,199,0.18), rgba(124,224,199,0.08));
  border: 1px solid rgba(124,224,199,0.3);
  color: #e7ecf6;
  margin-left: auto;
}
.bubble.system {
  background: transparent;
  border: 1px dashed rgba(155,166,194,0.25);
  color: #9ba6c2;
  font-size: 12px;
  font-style: italic;
  margin: 4px auto;
  text-align: center;
}

/* "Reid is thinking" dots */
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(124,224,199,0.7);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

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

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Suggestion pills */
.suggestion {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(155,166,194,0.22);
  background: rgba(255,255,255,0.02);
  color: #c4cde0;
  font-size: 12px;
  cursor: pointer;
  transition: all 180ms;
  white-space: nowrap;
}
.suggestion:hover {
  border-color: rgba(124,224,199,0.5);
  background: rgba(124,224,199,0.08);
  color: #e7ecf6;
  transform: translateY(-1px);
}

/* Textarea auto-resize hint */
textarea#coach-input {
  min-height: 44px;
  max-height: 160px;
  line-height: 1.5;
}

/* Subtle entrance animations for sections (no JS dependency) */
@media (prefers-reduced-motion: no-preference) {
  section { animation: section-rise 600ms ease-out both; animation-delay: 100ms; }
  section + section { animation-delay: 200ms; }
}
@keyframes section-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile chat card — full bleed */
@media (max-width: 1023px) {
  #talk { position: relative !important; top: 0 !important; }
  #coach-stream { height: 360px; }
}
