/* The agent's cursor and its speech bubble. */

/* the agent's cursor rides on the canvas, kept one size on screen */
.cursor { z-index: 40; transform-origin: 0 0; transition: transform 380ms var(--ease-out); pointer-events: none; }
.cursor.is-hidden { display: none; }
.cursor-bubble { white-space: pre-wrap; }

/* the agent's words, on the canvas: long ones fade, and a click opens the transcript */
.cursor-bubble { pointer-events: auto; cursor: pointer; text-align: left; font-family: inherit; max-width: 340px; display: grid; gap: 6px; }
.cursor-bubble .bubble-text { display: block; max-height: 11.5em; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.cursor-bubble.is-long .bubble-text { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.cursor-bubble .bubble-more { font-size: 11px; font-weight: 600; color: var(--agent-ink); text-decoration: underline; }
@media (hover: hover) { .cursor-bubble:hover { border-color: var(--ink); } }

/* the agent's words as a strip: phones only */
.says { display: none; }

/* The agent has asked something: say where to answer. */
.cursor-bubble .bubble-ask { font-size: 12px; font-weight: 600; color: var(--agent-ink); }
.input-main.is-asked { border-color: var(--agent); box-shadow: 0 0 0 3px var(--agent-tint), var(--shadow); }

/* What the agent is doing, and a way to stop it, above the message box. */
.input-working {
  display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); padding: var(--s2) var(--s3);
  border-radius: var(--r2); background: var(--agent-tint);
}
.input-working p { margin: 0; min-width: 0; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--agent-ink); overflow-wrap: anywhere; }
.input-working .btn { flex: none; }

/* Read aloud: the sentence being spoken is marked and kept in view. */
.cursor-bubble .bubble-text.is-reading { overflow-y: auto; scroll-behavior: smooth; -webkit-mask-image: none; mask-image: none; }
.cursor-bubble .bubble-text .is-said { background: var(--agent-tint); box-shadow: 0 0 0 2px var(--agent-tint); border-radius: 3px; color: var(--agent-ink); }
@media (prefers-reduced-motion: reduce) { .cursor-bubble .bubble-text.is-reading { scroll-behavior: auto; } }

/* Where the agent's new work is, when its lesson is not open. */
.cursor-go {
  pointer-events: auto; cursor: pointer; display: grid; gap: 2px; margin-top: 6px; max-width: 340px; padding: 8px 12px;
  border: 0; border-radius: var(--r2); background: var(--agent); color: #fff;
  font: inherit; font-size: 13px; font-weight: 600; text-align: left; box-shadow: var(--shadow);
}
.cursor-go small { font-weight: 400; opacity: .85; }
.cursor-go:hover { background: var(--agent-ink); }

/* The way forward, above the message box. */
.input-next { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.input-next p { margin: 0; min-width: 0; font-size: var(--fs-sm); color: var(--muted); }
.input-next .btn { flex: none; min-width: 84px; }
