/* ---------- live chat (inc/chat.php, assets/js/chat.js — Mantas 2026-10-08) ---------- */
.smg-chat-fab{position:fixed;right:14px;bottom:52px;z-index:60;width:58px;height:58px;padding:0;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(201,162,74,.6);background:radial-gradient(circle at 50% 35%,rgba(40,33,25,.92),rgba(12,10,9,.9) 70%);color:var(--gold,#c9a24a);cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.45);-webkit-tap-highlight-color:transparent;transition:color .2s,border-color .2s,transform .25s cubic-bezier(.2,.8,.2,1),opacity .25s,visibility .25s}
.smg-chat-fab:hover,.smg-chat-fab:focus-visible{border-color:var(--gold,#c9a24a);transform:translateY(-2px);color:#f0cf95}
.smg-chat-fab:active{transform:scale(.95)}
/* robot head (2026-10-19): gold outline, cream eyes, the antenna is the red brand pin; pupils are moved by chat.js */
.smg-bot{width:52px;height:52px;overflow:visible;display:block}
.smg-bot-head{transform-box:fill-box;transform-origin:50% 100%;transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.smg-bot-skull{fill:#211b15;stroke:currentColor;stroke-width:1.5}
.smg-bot-face{fill:#0a0807;stroke:rgba(201,162,74,.35);stroke-width:.8}
.smg-bot-ear{fill:#211b15;stroke:currentColor;stroke-width:1.3}
.smg-bot-ant{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
.smg-bot-pin{fill:#c4352b;stroke:#5a120c;stroke-width:.8}
.smg-bot-eyes{transform-box:fill-box;transform-origin:50% 50%;transition:transform .08s ease-in}
.smg-bot-eye{fill:#f3ead6}
.smg-bot-pp{fill:#14110d;transition:transform .14s ease-out}
.smg-bot-glint{fill:#fff}
.smg-bot-mouth{fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;transition:d .25s}
.smg-bot.blink .smg-bot-eyes{transform:scaleY(.12)}
.smg-chat-fab:hover .smg-bot-head,.smg-chat-fab:focus-visible .smg-bot-head{transform:rotate(-7deg)}
.smg-chat-fab:hover .smg-bot-mouth,.smg-chat-fab:focus-visible .smg-bot-mouth{d:path("M24.2 37.8q3.8 3 7.6 0")}
.smg-chat-fab.has-new .smg-bot-pin{animation:smgBotPin 1.6s ease-in-out infinite}
@keyframes smgBotPin{0%,100%{fill:#c4352b}50%{fill:#ff6a55}}
.smg-bot-tip{position:absolute;right:calc(100% + 10px);top:50%;white-space:nowrap;padding:8px 12px;background:#0f0c0a;border:1px solid rgba(201,162,74,.45);color:var(--cream,#ece6d6);font:500 12.5px/1 var(--sans,Inter,sans-serif);box-shadow:0 10px 26px rgba(0,0,0,.5);opacity:0;transform:translate(6px,-50%);pointer-events:none;transition:opacity .2s,transform .25s cubic-bezier(.2,.8,.2,1)}
@media(hover:hover){.smg-chat-fab:hover .smg-bot-tip{opacity:1;transform:translate(0,-50%);transition-delay:.15s}}
.smg-chat-dot{position:absolute;top:2px;right:2px;width:11px;height:11px;border-radius:50%;background:#d0473c;box-shadow:0 0 0 2px #0c0a09;opacity:0;transform:scale(.4);transition:.2s}
.smg-chat-fab.has-new .smg-chat-dot{opacity:1;transform:none}
body.smg-bug-on .smg-chat-fab,body.smg-cart-open .smg-chat-fab,body.smg-drawer-open .smg-chat-fab,body.smg-search-open .smg-chat-fab,body.smg-chat-open .smg-chat-fab{opacity:0;visibility:hidden;pointer-events:none}
/* pokalbio mygtukas liks matomas net preloaderio metu */
html.smg-pre-on .smg-chat-fab{pointer-events:auto!important;opacity:1!important;visibility:visible!important}

.smg-chat{position:fixed;right:14px;bottom:14px;z-index:9400;width:370px;height:min(580px,calc(100svh - 28px));display:flex;flex-direction:column;background:#0f0c0a;border:1px solid rgba(201,162,74,.4);box-shadow:0 30px 80px rgba(0,0,0,.65);color:var(--cream,#f0e6d2);font-family:var(--sans,Inter,sans-serif);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(14px);transition:opacity .25s,visibility .25s,transform .25s}
body.smg-chat-open .smg-chat{opacity:1;visibility:visible;pointer-events:auto;transform:none}
.smg-chat-head{display:flex;align-items:center;gap:12px;padding:14px 14px 13px 16px;border-bottom:1px solid rgba(201,162,74,.25);background:linear-gradient(#17130f,#0f0c0a)}
.smg-chat-head .pin{flex:none}
.smg-chat-ttl{flex:1;min-width:0}.smg-chat-ttl b{display:block;font:400 21px/1.1 var(--serif,Georgia,serif);letter-spacing:.04em}
.smg-chat-ttl span{display:block;font-size:12px;color:rgba(240,230,210,.6);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.smg-chat-x{width:36px;height:36px;border:1px solid rgba(240,230,210,.18);background:none;color:var(--cream,#f0e6d2);font-size:22px;line-height:1;cursor:pointer;flex:none}
.smg-chat-x:hover{border-color:var(--gold,#c9a24a);color:var(--gold,#c9a24a)}
.smg-chat-log{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px;display:flex;flex-direction:column;gap:10px}
.smg-cm{max-width:84%;font-size:14.5px;line-height:1.5}
.smg-cm p{margin:0;padding:9px 12px;white-space:pre-wrap;overflow-wrap:anywhere}
.smg-cm a{color:var(--gold,#c9a24a);text-decoration:underline}
.smg-cm-who{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:rgba(240,230,210,.5);margin:0 0 4px 2px}
.smg-cm.from-customer{align-self:flex-end}.smg-cm.from-customer p{background:#c9a24a;color:#14110d}
.smg-cm.from-customer .smg-cm-who{text-align:right;margin-right:2px}
.smg-cm.from-ai p{background:#1d1914;border:1px solid rgba(240,230,210,.1)}
.smg-cm.from-admin p{background:#1d2a1f;border:1px solid rgba(95,174,107,.4)}
.smg-cm.from-admin .smg-cm-who{color:#7cc487}
.smg-cm.from-system{align-self:center;max-width:94%;text-align:center}.smg-cm.from-system p{padding:4px 8px;font-size:12.5px;color:rgba(240,230,210,.6);border:1px dashed rgba(201,162,74,.3)}
.smg-cm-typing p{display:flex;gap:4px;padding:12px 14px}
.smg-cm-typing i{width:6px;height:6px;border-radius:50%;background:rgba(240,230,210,.6);animation:smgDots 1s infinite}
.smg-cm-typing i:nth-child(2){animation-delay:.15s}.smg-cm-typing i:nth-child(3){animation-delay:.3s}
@keyframes smgDots{0%,60%,100%{opacity:.25}30%{opacity:1}}
.smg-chat-mail{display:none;gap:6px;padding:8px 12px;border-top:1px solid rgba(240,230,210,.08)}
.smg-chat.ask-mail .smg-chat-mail{display:flex}
.smg-chat-mail input{flex:1;min-width:0;height:38px;background:#1a1612;border:1px solid rgba(240,230,210,.18);color:var(--cream,#f0e6d2);padding:0 10px;font:16px var(--sans,Inter,sans-serif)}
.smg-chat-mail button{height:38px;padding:0 12px;background:none;border:1px solid var(--gold,#c9a24a);color:var(--gold,#c9a24a);font:600 12px var(--sans,Inter,sans-serif);letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.smg-chat-human{margin:0 12px 8px;align-self:flex-start;background:none;border:0;padding:4px 2px;color:var(--gold,#c9a24a);font:500 13px var(--sans,Inter,sans-serif);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.smg-chat:not(.st-ai) .smg-chat-human{display:none}
.smg-chat-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px;border-top:1px solid rgba(201,162,74,.25)}
.smg-chat-form textarea{flex:1;min-width:0;min-height:44px;max-height:120px;resize:none;background:#1a1612;border:1px solid rgba(240,230,210,.18);color:var(--cream,#f0e6d2);padding:11px 12px;font:16px/1.35 var(--sans,Inter,sans-serif)}
.smg-chat-form textarea:focus,.smg-chat-mail input:focus{outline:0;border-color:var(--gold,#c9a24a)}
.smg-chat-form button{width:44px;height:44px;flex:none;display:grid;place-items:center;background:var(--gold,#c9a24a);border:0;color:#14110d;cursor:pointer}
.smg-chat-form button:disabled{opacity:.5;cursor:default}
.smg-chat-note{margin:0;padding:0 12px 10px;font-size:11px;color:rgba(240,230,210,.45)}
.smg-chat-note a{color:inherit;text-decoration:underline}
.smg-chat-err{color:#e6857b!important;border-color:rgba(208,71,60,.5)!important}

@media(max-width:900px){
 .smg-chat-fab{right:10px;bottom:calc(12px + env(safe-area-inset-bottom));width:50px;height:50px}.smg-bot{width:46px;height:46px}
 /* phone scenes keep their buttons along the bottom edge: the chat button steps aside there (same as the bug button) */
 html.smg-desk-on .smg-chat-fab,html.smg-chest-on .smg-chat-fab,html.smg-club-open .smg-chat-fab,html.smg-info-on .smg-chat-fab{opacity:0;visibility:hidden;pointer-events:none}
}
@media(max-width:600px){
 /* phones: the chat is a full screen sheet (no half-covered page behind it) */
 .smg-chat{inset:0;right:0;bottom:0;width:100%;height:100svh;height:100dvh;border:0;transform:translateY(24px)}
 .smg-chat-head{padding-top:calc(12px + env(safe-area-inset-top))}
 .smg-chat-note{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
 body.smg-chat-open{overflow:hidden}
}
@media(prefers-reduced-motion:reduce){.smg-chat,.smg-chat-fab,.smg-bot-head,.smg-bot-eyes,.smg-bot-pp,.smg-bot-tip{transition:none}.smg-cm-typing i,.smg-chat-fab.has-new .smg-bot-pin{animation:none}.smg-chat-fab:hover .smg-bot-head{transform:none}}
