/* One Ask AI / Close AI button for every prototype: lime outline, light lime fill, orb, black label. */
.askai, .askAI {
  display: inline-flex !important; align-items: center !important; gap: 7px !important;
  height: 32px !important; padding: 0 14px 0 10px !important; box-sizing: border-box !important;
  border: 1.5px solid #CDEA68 !important; border-radius: 9999px !important;
  background: #FAFCEB !important; box-shadow: none !important;
  color: #0E1612 !important; font-family: inherit; font-size: 13px !important; font-weight: 600 !important; line-height: 1 !important;
  white-space: nowrap; cursor: pointer; transition: background .15s ease-out;
}
.askai:hover, .askAI:hover { background: #F4F9DC !important; border-color: #CDEA68 !important; }
.askai span, .askAI span { color: inherit !important; font-size: inherit !important; font-weight: inherit !important; }
.askai img, .askAI img { width: 16px !important; height: 16px !important; margin: 0 !important; flex-shrink: 0; }
.askai .g, .askai svg { display: none !important; }

/* Close × for AI panels: same as the entity side panel's close */
.ai-x { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; border-radius: 6px; cursor: pointer; padding: 0;
  color: #828987; font-family: inherit; font-size: 20px; line-height: 1; }
.ai-x:hover { background: #F1F2F1; color: #0E1612; }
.ai-head-acts { display: inline-flex; align-items: center; gap: 6px; }

/* Opening intro for the Ask JupiterAI panel: a small sparkle draws itself in over a soft lime glow,
   fills, then hands over to the panel content (the panel's "entering" phase lasts 640ms) */
/* sits near the top of the panel, where the answer will appear, not in the middle */
.ai .orbIntro, .orbIntro { align-items: start !important; padding-top: 260px; box-sizing: border-box; }
.orbIntro .ai-intro { width: 28px; height: 28px; overflow: visible; animation: aiIntroWrap .64s cubic-bezier(.2,.7,.3,1) both; }
@keyframes aiIntroWrap { 0% { opacity: 0; transform: scale(.6) rotate(-25deg); } 22% { opacity: 1; } 72% { opacity: 1; transform: scale(1) rotate(0); } 100% { opacity: 0; transform: scale(1.06) rotate(0); } }
.ai-intro .halo { fill: #CDEA68; opacity: 0; transform-box: view-box; transform-origin: 12px 12px; animation: aiHalo .64s ease-out both; }
@keyframes aiHalo { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: .5; } 100% { opacity: 0; transform: scale(2.2); } }
.ai-intro .star { fill: none; stroke: #5C6E22; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: aiDraw .42s .04s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes aiDraw { to { stroke-dashoffset: 0; } }
.ai-intro .fill { fill: #CDEA68; opacity: 0; animation: aiFill .24s .36s ease-out forwards; }
@keyframes aiFill { to { opacity: 1; } }
.ai-intro .plus { fill: none; stroke: #5C6E22; stroke-width: 1.9; stroke-linecap: round; opacity: 0; transform-box: view-box; transform-origin: 20px 5px; animation: aiPop .3s .3s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes aiPop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
/* small lime sparks burst out as the sparkle lands */
.ai-intro .spark { fill: #B6D052; opacity: 0; transform-box: view-box; transform-origin: 12px 12px; animation: aiSpark .46s .26s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes aiSpark { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); } }
/* the content arrives just after, with a short rise */
.ai .aiInner { transition: opacity .28s ease, transform .34s cubic-bezier(.2,.7,.3,1) !important; }
.ai.entering .aiInner { transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) {
  .orbIntro .ai-intro, .ai-intro .halo, .ai-intro .star, .ai-intro .fill, .ai-intro .plus, .ai-intro .spark { animation: none !important; }
  .ai-intro .spark { display: none; }
  .ai-intro .star { stroke-dashoffset: 0; } .ai-intro .fill, .ai-intro .plus { opacity: 1; }
}

/* "Thinking…" indicator: a small sparkle that breathes and turns, its "+" twinkling, and a soft shimmer on the text */
.thinking .ai-think { width: 14px; height: 14px; flex: none; overflow: visible; }
.ai-think .s { fill: #CDEA68; stroke: #5C6E22; stroke-width: 2; stroke-linejoin: round; transform-box: view-box; transform-origin: 12px 12px; animation: aiThink 1.4s ease-in-out infinite; }
@keyframes aiThink { 0%, 100% { transform: scale(.82) rotate(-10deg); } 50% { transform: scale(1.06) rotate(10deg); } }
.ai-think .p { fill: none; stroke: #5C6E22; stroke-width: 2; stroke-linecap: round; transform-box: view-box; transform-origin: 20px 5px; animation: aiTwinkle 1.4s ease-in-out infinite; }
@keyframes aiTwinkle { 0%, 100% { opacity: .15; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.1); } }
.thinking .txt { animation: aiShimmer 1.6s linear infinite !important; background: linear-gradient(90deg, #828987 0%, #828987 35%, #5C6E22 50%, #828987 65%, #828987 100%); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent !important; }
@keyframes aiShimmer { from { background-position: 110% 0; } to { background-position: -110% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-think .s, .ai-think .p, .thinking .txt { animation: none !important; } .thinking .txt { color: #828987 !important; background: none; } }
