/* "שאל את Rutz". Only the app's own tokens, so it follows whatever the
   stylesheet's colours become. */

/* The sheet: header, the conversation, suggestions, the field. Its height is
   set by ask.js to the visible viewport, so the keyboard never covers the
   field. */
.asksheet{position:fixed;inset-inline:0;top:0;height:100dvh;z-index:58;display:flex;flex-direction:column;
  background:var(--bg);animation:ask-up .22s cubic-bezier(.2,.8,.2,1)}
@keyframes ask-up{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.asksheet{animation:none}}

.askhead{display:flex;align-items:center;gap:10px;padding:calc(env(safe-area-inset-top) + 10px) 14px 10px;
  border-bottom:1px solid var(--line-soft);background:var(--surface)}
.askhead .grow{flex:1;min-width:0}
.askhead b{display:block;font-size:15.5px;font-weight:760;color:var(--ink)}
.askhead .grow span{display:block;font-size:11.5px;color:var(--muted)}
.askface{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;
  background:var(--band-edge);color:var(--on-band);font-weight:800;font-size:16px}

.asklog{flex:1;overflow-y:auto;padding:14px 14px 8px;display:flex;flex-direction:column;gap:8px;
  overscroll-behavior:contain}
.msg{max-width:84%;padding:9px 13px;display:flex;flex-direction:column;gap:3px;
  font-size:14px;line-height:1.5;animation:msg-in .18s ease-out}
.msg p{margin:0;color:inherit;font-size:inherit;line-height:inherit}
.msg.me{align-self:flex-start;background:var(--band-edge);color:var(--on-band);font-weight:600;
  border-radius:18px 18px 18px 5px}
.msg.rutz{align-self:flex-end;background:var(--surface);color:var(--ink);border:1px solid var(--line-soft);
  border-radius:18px 18px 5px 18px}
@keyframes msg-in{from{transform:translateY(6px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.msg{animation:none}}

/* Three dots while the answer is worked out. */
.msg.typing{flex-direction:row;gap:4px;padding:13px 15px}
.msg.typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:ask-dot 1s infinite}
.msg.typing i:nth-child(2){animation-delay:.15s}
.msg.typing i:nth-child(3){animation-delay:.3s}
@keyframes ask-dot{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}

.asksuggest{display:flex;gap:7px;overflow-x:auto;padding:6px 14px;scrollbar-width:none}
.asksuggest::-webkit-scrollbar{display:none}
.asksuggest .chip{flex:0 0 auto;white-space:nowrap;font-size:12.5px}

.askbar{display:flex;gap:8px;align-items:center;padding:8px 12px calc(env(safe-area-inset-bottom) + 10px);
  border-top:1px solid var(--line-soft);background:var(--surface)}
.askbar input{flex:1;min-width:0;font:inherit;font-size:16px;padding:10px 14px;border-radius:999px;
  border:1px solid var(--line);background:var(--bg);color:var(--ink)}
.askbar input:focus-visible{outline:2px solid var(--band-edge);outline-offset:1px}
.asksend{width:42px;height:42px;border-radius:50%;border:0;flex:0 0 auto;display:grid;place-items:center;
  background:var(--band-edge);color:var(--on-band)}
.asksend svg{width:20px;height:20px;fill:currentColor;transform:scaleX(-1)}

/* The way in, beside the "?" in the top bar: a pill that says שאל, and every
   few seconds somebody peeks over its top edge — two hands on the rim, a
   round face, a look to each side and a blink, and back down (Tamir, 22.10).
   The face lives in a window the height of the peek, so below the rim it is
   simply not drawn; the pill needs no opaque background to hide it. */
.pill.ask{position:relative;overflow:visible;font-family:var(--heb);font-size:13px;font-weight:700;line-height:1;
  padding:5px 10px;cursor:pointer}
.pill.ask .peek{position:absolute;bottom:calc(100% - 1px);left:50%;width:26px;height:13px;margin-left:-13px;
  overflow:hidden;pointer-events:none}
.pill.ask .peeker{position:absolute;left:4px;top:13px;width:18px;height:18px;border-radius:50%;
  background:var(--sun);animation:askpeek 9s cubic-bezier(.3,1.3,.5,1) 1.5s infinite}
.pill.ask .peeker i{position:absolute;top:5px;width:3px;height:4px;border-radius:2px;background:var(--on-sun);
  animation:asklook 9s ease-in-out 1.5s infinite}
.pill.ask .peeker i:first-child{left:4px}
.pill.ask .peeker i:last-child{right:4px}
.pill.ask .hand{position:absolute;bottom:0;width:6px;height:4px;border-radius:3px 3px 1px 1px;background:var(--sun);
  transform:translateY(5px);animation:askhand 9s ease-in-out 1.5s infinite}
.pill.ask .hand:first-child{left:1px}
.pill.ask .hand:nth-child(2){right:1px}
@keyframes askpeek{0%,58%,96%,100%{transform:translateY(0)}64%,90%{transform:translateY(-10px)}}
@keyframes askhand{0%,56%,98%,100%{transform:translateY(5px)}61%,92%{transform:translateY(0)}}
@keyframes asklook{0%,68%{transform:translateX(0) scaleY(1)}72%,76%{transform:translateX(-1.5px)}
  80%,83%{transform:translateX(1.5px)}85%{transform:translateX(0) scaleY(.15)}87%,100%{transform:translateX(0) scaleY(1)}}
@media (prefers-reduced-motion:reduce){
  .pill.ask .peeker{animation:none;transform:translateY(-7px)}
  .pill.ask .peeker i,.pill.ask .hand{animation:none}
  .pill.ask .hand{transform:none}
}
.asksuggest .chip.howto{background:var(--band);color:var(--on-band);border-color:transparent;font-weight:700}
