/* APJJ tip pop-ups — local add-on. Matches the approved mockup. Theme tokens, light default. */
#apjjTip{
  position:fixed;
  z-index:80;
  box-sizing:border-box;
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:calc(100vw - 32px);
  max-width:400px;
  left:16px;
  right:16px;
  bottom:calc(72px + env(safe-area-inset-bottom,0px) + 10px);
  margin:0 auto;
  background:var(--surface,#ffffff);
  color:var(--text,#111111);
  border:1px solid var(--line,#dfe2da);
  border-radius:18px;
  padding:14px 40px 12px 14px;
  box-shadow:0 10px 32px rgba(17,17,17,.14),0 2px 8px rgba(27,127,0,.08);
  font-family:var(--body),Inter,system-ui,sans-serif;
  animation:apjjTipIn .45s cubic-bezier(.2,.8,.2,1) both;
  pointer-events:auto;
}
#apjjTip *{box-sizing:border-box}
@keyframes apjjTipIn{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes apjjTipOut{
  from{opacity:1;transform:translateY(0)}
  to{opacity:0;transform:translateY(10px)}
}
#apjjTip.apjj-tip-out{animation:apjjTipOut .2s ease both}
#apjjTip .apjj-tip-ic{
  flex:none;
  width:40px;height:40px;border-radius:12px;
  background:color-mix(in srgb, var(--accent,#4ADE80) 22%, transparent);
  color:var(--accent-dark,#1B7F00);
  display:grid;place-items:center;
}
#apjjTip .apjj-tip-ic svg{
  width:22px;height:22px;fill:none;stroke:currentColor;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
}
#apjjTip .apjj-tip-body{flex:1;min-width:0}
#apjjTip .apjj-tip-k{
  margin:0 0 1px;
  font-size:10px;font-weight:800;letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--accent-dark,#1B7F00);
}
#apjjTip .apjj-tip-title{
  margin:0 0 4px;
  font-size:15px;font-weight:800;line-height:1.25;
  color:var(--text,#111111);
  font-family:var(--display),Poppins,Inter,sans-serif;
}
#apjjTip .apjj-tip-text{
  margin:0 0 8px;
  font-size:13px;line-height:1.4;
  color:var(--muted,#5d6573);
}
#apjjTip .apjj-tip-set{
  margin:0;border:0;background:none;padding:0;cursor:pointer;
  font:inherit;font-size:11px;font-weight:700;
  color:var(--accent-dark,#1B7F00);
  text-decoration:underline;text-underline-offset:2px;
}
#apjjTip .apjj-tip-set:hover{opacity:.85}
#apjjTip .apjj-tip-x{
  position:absolute;top:8px;right:8px;
  width:32px;height:32px;border:0;border-radius:10px;
  background:transparent;color:var(--muted,#5d6573);cursor:pointer;
  display:grid;place-items:center;padding:0;
}
#apjjTip .apjj-tip-x:hover{
  background:var(--surface2,#eef0ea);
  color:var(--text,#111111);
}
#apjjTip .apjj-tip-x svg{
  width:16px;height:16px;fill:none;stroke:currentColor;
  stroke-width:2.2;stroke-linecap:round;
}

/* Phone: sit just above the tabbar, leave the Help FAB clear on the right. */
@media (max-width:899px){
  #apjjTip.apjj-tip-beside-help{
    margin:0;
    max-width:none;
    width:auto;
  }
}

/* Desktop: bottom-right. JS lifts the card above the tabbar and Help FAB. */
@media (min-width:900px){
  #apjjTip,
  #apjjTip.apjj-tip-desk{
    left:auto;
    right:28px;
    margin:0;
    width:380px;
    max-width:380px;
    bottom:calc(92px + env(safe-area-inset-bottom,0px));
  }
}

@media (prefers-reduced-motion:reduce){
  #apjjTip,
  #apjjTip.apjj-tip-out{animation:none}
}

/* Settings row flash when opened from the card link */
#apTipsRow.ap-tips-flash{
  outline:2px solid var(--accent,#4ADE80);
  outline-offset:6px;
  border-radius:12px;
}

/* v339 Normal (plain white): keep the card white with near-black text. */
html[data-theme=light][data-plain] #apjjTip,
html[data-plain] #apjjTip{
  background:#ffffff;
  color:#111111;
  border-color:#e6e6e6;
}
html[data-plain] #apjjTip .apjj-tip-title{color:#111111}
html[data-plain] #apjjTip .apjj-tip-text,
html[data-plain] #apjjTip .apjj-tip-x{color:#444444}
html[data-plain] #apjjTip .apjj-tip-x:hover{background:#f3f3f3;color:#111111}
