/* Spice Stocks Academy - chat box (bottom right). All class names start with sc- so nothing else on the page is touched. */
#ssaChat,#ssaChat *,#ssaChatBtn,#ssaChatBtn *,#ssaChatTip{box-sizing:border-box}
#ssaChatBtn{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:9800;display:grid;place-items:center;width:62px;height:62px;padding:0;border:0;border-radius:50%;background:#ff0000;color:#fff;cursor:pointer;box-shadow:0 14px 30px rgba(255,0,0,.38);transition:transform .2s,box-shadow .2s;-webkit-tap-highlight-color:transparent}
#ssaChatBtn:hover{transform:translateY(-3px) scale(1.04);box-shadow:0 18px 36px rgba(255,0,0,.45)}
#ssaChatBtn:focus-visible{outline:3px solid #ffb3b3;outline-offset:3px}
#ssaChatBtn svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#ssaChatBtn .sc-x{display:none}
#ssaChatBtn.is-open .sc-ic{display:none}#ssaChatBtn.is-open .sc-x{display:block}
#ssaChatBtn .sc-dot{position:absolute;top:4px;right:4px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2px solid #fff}
#ssaChatBtn.is-open .sc-dot{display:none}
#ssaChatBtn::after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid rgba(255,0,0,.45);animation:scPulse 2.4s ease-out infinite;pointer-events:none}
#ssaChatBtn.is-open::after{display:none}
@keyframes scPulse{0%{transform:scale(1);opacity:.9}100%{transform:scale(1.6);opacity:0}}
/* keep the existing "back to top" button clear of the chat button */
#uxTop{bottom:94px!important}

#ssaChatTip{position:fixed;right:max(88px,calc(env(safe-area-inset-right) + 88px));bottom:max(30px,calc(env(safe-area-inset-bottom) + 30px));z-index:9800;max-width:230px;padding:10px 14px;border-radius:14px 14px 4px 14px;background:#fff;color:#14161b;font:600 13.5px/1.4 "Plus Jakarta Sans","Segoe UI",system-ui,Arial,sans-serif;box-shadow:0 12px 30px rgba(15,23,42,.2);opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .3s,transform .3s}
#ssaChatTip.show{opacity:1;transform:none;pointer-events:auto;cursor:pointer}

#ssaChat{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:calc(max(18px,env(safe-area-inset-bottom)) + 74px);z-index:9801;display:flex;flex-direction:column;width:min(390px,calc(100vw - 24px));height:min(600px,calc(100vh - 170px));height:min(600px,calc(100dvh - 170px));border-radius:24px;background:#fff;color:#14161b;overflow:hidden;box-shadow:0 30px 80px rgba(15,23,42,.35);font:400 14.5px/1.5 "Plus Jakarta Sans","Segoe UI",system-ui,Arial,sans-serif;opacity:0;visibility:hidden;transform:translateY(16px) scale(.97);transform-origin:100% 100%;transition:opacity .22s,transform .25s cubic-bezier(.2,.8,.2,1),visibility 0s linear .25s}
#ssaChat.open{opacity:1;visibility:visible;transform:none;transition:opacity .22s,transform .25s cubic-bezier(.2,.8,.2,1),visibility 0s}
.sc-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:#ff0000;color:#fff}
.sc-av{position:relative;display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:#fff;color:#ff0000}
.sc-av svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sc-av i{position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:#22c55e;border:2px solid #ff0000}
.sc-ttl{flex:1;min-width:0}.sc-ttl b{display:block;font-size:15.5px;font-weight:800;line-height:1.25}.sc-ttl small{display:block;font-size:12px;opacity:.9}
.sc-hb{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border:0;border-radius:50%;background:rgba(255,255,255,.18);color:#fff;cursor:pointer;text-decoration:none;transition:background .2s}
.sc-hb:hover{background:rgba(255,255,255,.3)}.sc-hb svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.sc-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 6px;background:#f6f7f9;scroll-behavior:smooth}
.sc-row{display:flex;margin-bottom:10px}.sc-row.me{justify-content:flex-end}
.sc-msg{max-width:88%;padding:10px 13px;border-radius:16px 16px 16px 4px;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.08);white-space:pre-line;overflow-wrap:anywhere}
.sc-row.me .sc-msg{border-radius:16px 16px 4px 16px;background:#ff0000;color:#fff;box-shadow:none}
.sc-msg b{font-weight:800}
.sc-typing{display:inline-flex;gap:4px;padding:13px 14px}.sc-typing i{width:7px;height:7px;border-radius:50%;background:#b3b8c2;animation:scDot 1s infinite ease-in-out}.sc-typing i:nth-child(2){animation-delay:.15s}.sc-typing i:nth-child(3){animation-delay:.3s}
@keyframes scDot{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}
.sc-chips{display:flex;flex-wrap:wrap;gap:7px;margin:2px 0 12px}
.sc-chip{padding:8px 13px;border:1.5px solid #ff0000;border-radius:999px;background:#fff;color:#ff0000;font:700 13px/1.2 inherit;cursor:pointer;transition:background .2s,color .2s}
.sc-chip:hover,.sc-chip:focus-visible{background:#ff0000;color:#fff;outline:none}
.sc-act{display:flex;align-items:center;justify-content:center;gap:8px;margin:8px 0 0;padding:10px 14px;border:0;border-radius:12px;background:#ff0000;color:#fff!important;font:700 13.5px/1.2 inherit;text-decoration:none;cursor:pointer;width:100%}
.sc-act.wa{background:#16a34a}.sc-act svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.sc-form{display:grid;gap:8px;margin-top:8px;min-width:230px}
.sc-form input{width:100%;height:42px;padding:0 12px;border:1.5px solid #dfe3e8;border-radius:12px;background:#fff;color:#14161b;font:500 14px inherit;outline:none}
.sc-form input:focus{border-color:#ff0000;box-shadow:0 0 0 3px rgba(255,0,0,.12)}
.sc-form button{height:42px;border:0;border-radius:12px;background:#ff0000;color:#fff;font:700 14px inherit;cursor:pointer}
.sc-form button:disabled{opacity:.6;cursor:default}
.sc-form .sc-err{min-height:0;color:#c20000;font-size:12.5px;white-space:normal}
.sc-foot{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #eceef2;background:#fff}
.sc-foot input{flex:1;min-width:0;height:44px;padding:0 14px;border:1.5px solid #dfe3e8;border-radius:999px;background:#fff;color:#14161b;font:500 16px inherit;outline:none}
.sc-foot input:focus{border-color:#ff0000;box-shadow:0 0 0 3px rgba(255,0,0,.12)}
.sc-foot button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:0;border-radius:50%;background:#ff0000;color:#fff;cursor:pointer}
.sc-foot button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.sc-wa{display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px 11px;background:#fff;color:#15803d!important;font:700 12.8px/1.2 inherit;text-decoration:none}
.sc-wa svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.sc-wa:hover{text-decoration:underline}
@media(max-width:520px){
  #ssaChat{right:8px;left:8px;width:auto;bottom:calc(max(14px,env(safe-area-inset-bottom)) + 72px);height:min(78vh,calc(100dvh - 150px));border-radius:22px}
  #ssaChatBtn{right:14px;bottom:max(14px,env(safe-area-inset-bottom));width:58px;height:58px}
  #uxTop{bottom:84px!important}
  #ssaChatTip{right:84px;bottom:26px}
}
@media(prefers-reduced-motion:reduce){#ssaChat,#ssaChatBtn,#ssaChatTip{transition:none}#ssaChatBtn::after,.sc-typing i{animation:none}.sc-log{scroll-behavior:auto}}
