/* Tharvik - chatfade.css (2026-11-12). Loaded after tablet.css.
   1. The chat no longer cuts a message in a hard line under the "Hoy" card (top) and the message bar (bottom) when you scroll: it dissolves into the edge.
      The padding is as tall as the fade, so at rest the first and last message are never touched by it.
   2. While a reply is checked after it has been written, the words STAY on screen and three small dots wait inside the bubble (app.js stream.hold()).
      The final answer then replaces it in place with a short fade (.live-swap). */

#app #chat{
  padding-top:14px; padding-bottom:18px;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
          mask-image:linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
}

/* 2026-11-12 (2): no bubble and no bouncing dots while Tharvik thinks, like Claude / ChatGPT: only the soft line of words (the avatar stays at its side).
   Inside a held reply the same line sits under the words. */
.live-wait{ display:flex; align-items:center; min-height:16px; margin-top:8px; }
#typingRow .typing-dots{ background:none; border:0; border-radius:0; box-shadow:none; padding:0; min-height:28px; }
#typingRow .typing-dots span{ display:none; }
#typingRow .think-label{ margin-left:0; font-size:14px; }

/* "what Tharvik is doing" line (app.js ThinkStatus): next to the dots in the typing row and inside a held bubble. Soft light passes over the words. */
.think-label{
  font:500 13px/1.2 var(--font-ui, system-ui, sans-serif); font-style:normal; letter-spacing:.01em; white-space:nowrap;
  margin-left:7px; color:var(--text-dim);
  background:linear-gradient(90deg, var(--text-dim) 0%, var(--text-dim) 38%, var(--text, #fff) 50%, var(--text-dim) 62%, var(--text-dim) 100%) 0 0/250% 100%;
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  animation:thinkShimmer 2.4s linear infinite;
}
.think-label:empty{ display:none; }
.think-label.swap{ animation:thinkShimmer 2.4s linear infinite, thinkIn .35s ease-out both; }
.live-wait .think-label{ margin-left:0; font-size:13px; }
.typing-dots{ align-items:center; }
@keyframes thinkShimmer{ from{ background-position:100% 0; } to{ background-position:-100% 0; } }
@keyframes thinkIn{ from{ opacity:0; transform:translateY(3px); } to{ opacity:1; transform:none; } }

.msg.live-swap{ animation:liveSwap .3s ease-out both; }
@keyframes liveSwap{ from{ opacity:.3; } to{ opacity:1; } }

@media (prefers-reduced-motion: reduce){
  .msg.live-swap{ animation:none; }
  .think-label, .think-label.swap{ animation:none; background:none; -webkit-text-fill-color:currentColor; color:var(--text-dim); }
}
