/* AI Harmony: the "type your answer or ask anything" box under the answer cards.
   Reads only the semantic tokens in tokens.css, so it follows Day and Night. */

.ai-composer {
  display: flex; align-items: center; gap: 8px; margin-top: var(--space-2);
  padding: 6px; border-radius: 24px; border: 1px solid var(--glass-edge);
  background: var(--glass-strong); box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.ai-composer:focus-within { box-shadow: var(--glow), var(--shadow-soft); }
.ai-composer input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 0; border-radius: 18px;
  background: transparent; box-shadow: none; color: var(--text); font: inherit; font-size: max(16px, var(--fs-md)); /* 16px+ stops iOS zoom */
}
.ai-composer input::placeholder { color: var(--faint); }
.ai-composer input:focus { outline: none; }
.ai-composer .btn-send { border-radius: 18px; }
.ai-composer .btn-send:disabled { opacity: 0.55; cursor: progress; }
.ai-note { font-size: var(--fs-xs); color: var(--faint); line-height: 1.45; }

@media (forced-colors: active) {
  .ai-composer { border: 1px solid CanvasText; }
  .ai-composer:focus-within { outline: 2px solid Highlight; }
}

/* The answer cards fade back in after Harmony's reply (they're hidden while it reads a typed answer). */
.tray.cards-back > :not(.ai-composer):not(.ai-note) { animation: cards-back 0.35s var(--ease) both; }
@keyframes cards-back { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .tray.cards-back > * { animation: none; } }

/* Harmony's "writing" dots stay until the reply arrives (the scripted intro's dots hide after 0.5 s). */
.typing-row.ai-typing { animation: none; max-height: none; overflow: visible; }
@media (prefers-reduced-motion: reduce) {
  .typing-row.ai-typing { display: flex !important; }
  .typing-row.ai-typing .typing i { animation: none; }
}
