/* Minor polish on top of Tailwind utilities. */
:root { color-scheme: dark; }
html, body, #root { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Avoid iOS double-tap zoom on buttons. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Smooth scroll on the message list. */
.msg-scroll { scrollbar-width: thin; scrollbar-color: #2a2d36 transparent; scroll-behavior: smooth; }
.msg-scroll::-webkit-scrollbar { width: 8px; }
.msg-scroll::-webkit-scrollbar-thumb { background: #2a2d36; border-radius: 4px; }
.msg-scroll::-webkit-scrollbar-track { background: transparent; }

/* Pulsing cursor for streaming state. */
@keyframes pulse-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
.cursor-pulse {
  display: inline-block;
  width: 8px;
  height: 16px;
  margin-left: 2px;
  background: currentColor;
  vertical-align: text-bottom;
  animation: pulse-cursor 1s ease-in-out infinite;
  border-radius: 2px;
}

/* Plain-text wrap for message bubbles. */
.bubble-text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.55; }

/* Auto-grow textarea cap. */
textarea.composer { max-height: 200px; }

/* Mic recording pulse — red-glow halo. */
@keyframes mic-pulse-anim {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.mic-pulse { animation: mic-pulse-anim 1.4s ease-out infinite; }

/* iOS: prevent text-size auto-bump inside the composer. */
textarea.composer { font-size: 16px; }

/* Larger tap targets on mobile. */
@media (max-width: 768px) {
  button, [role="button"] { min-width: 40px; min-height: 40px; }
}
