.smatec-ai { --sai-bg:#050b19; --sai-panel:#09162d; --sai-line:#244368; --sai-text:#f5f8fc; --sai-muted:#a8b5c8; --sai-cyan:#39d9ff; --sai-orange:#ff8a24; position:fixed; z-index:94; right:24px; bottom:92px; font-family:Inter,"Segoe UI",Arial,sans-serif; line-height:1.45; }
.smatec-ai * { box-sizing:border-box; }
.smatec-ai button,.smatec-ai input { font:inherit; }
.smatec-ai svg { display:block; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.smatec-ai .screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.smatec-ai-launch { min-height:58px; display:flex; align-items:center; gap:11px; padding:7px 16px 7px 7px; border:1px solid rgba(57,217,255,.46); border-radius:999px; color:var(--sai-text); background:linear-gradient(135deg,rgba(9,28,57,.98),rgba(6,15,33,.98)); box-shadow:0 18px 48px rgba(0,0,0,.38),0 0 0 1px rgba(255,255,255,.03) inset; cursor:pointer; transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease; }
.smatec-ai-launch:hover { transform:translateY(-2px); border-color:var(--sai-cyan); box-shadow:0 20px 54px rgba(0,0,0,.45),0 0 30px rgba(57,217,255,.12); }
.smatec-ai-launch-icon { position:relative; width:44px; height:44px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; color:var(--sai-cyan); background:rgba(57,217,255,.1); }
.smatec-ai-launch-icon svg { width:24px; }
.smatec-ai-launch-icon i { position:absolute; top:1px; right:2px; width:9px; height:9px; border:2px solid var(--sai-bg); border-radius:50%; background:#4be0a0; box-shadow:0 0 12px rgba(75,224,160,.8); }
.smatec-ai-launch strong,.smatec-ai-launch small { display:block; text-align:left; }
.smatec-ai-launch strong { font-size:.82rem; }
.smatec-ai-launch small { margin-top:2px; color:var(--sai-muted); font-size:.65rem; }
.smatec-ai-panel { position:absolute; right:0; bottom:72px; width:min(420px,calc(100vw - 28px)); height:min(680px,calc(100vh - 145px)); min-height:520px; overflow:hidden; border:1px solid var(--sai-line); border-radius:24px; color:var(--sai-text); background:radial-gradient(circle at 100% 0%,rgba(57,217,255,.08),transparent 28%),linear-gradient(160deg,#0b1d3b,#050b19 56%); box-shadow:0 32px 90px rgba(0,0,0,.56); transform-origin:bottom right; animation:sai-enter 260ms cubic-bezier(.2,.8,.2,1); }
.smatec-ai-panel[hidden] { display:none; }
@keyframes sai-enter { from { opacity:0; transform:translateY(18px) scale(.96); } to { opacity:1; transform:none; } }
.smatec-ai-panel > header { height:78px; display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid rgba(121,156,207,.2); background:rgba(4,11,26,.72); }
.smatec-ai-avatar { width:43px; height:43px; display:grid; place-items:center; flex:0 0 auto; border:1px solid rgba(57,217,255,.34); border-radius:13px; color:var(--sai-cyan); background:rgba(57,217,255,.07); }
.smatec-ai-avatar svg { width:24px; }
.smatec-ai-panel header h2 { margin:0 0 3px; color:var(--sai-text); font-size:.96rem; line-height:1.2; letter-spacing:0; }
.smatec-ai-panel header p { display:flex; align-items:center; gap:6px; margin:0; color:var(--sai-muted); font-size:.68rem; }
.smatec-ai-panel header p i { width:7px; height:7px; border-radius:50%; background:#4be0a0; box-shadow:0 0 9px rgba(75,224,160,.7); }
.smatec-ai-close { width:38px; height:38px; display:grid; place-items:center; margin-left:auto; padding:0; border:0; border-radius:10px; color:var(--sai-muted); background:transparent; cursor:pointer; font-size:1.45rem; }
.smatec-ai-close:hover { color:var(--sai-text); background:rgba(255,255,255,.06); }
.smatec-ai-messages { height:calc(100% - 218px); overflow-y:auto; overscroll-behavior:contain; padding:18px 16px 8px; scrollbar-width:thin; scrollbar-color:var(--sai-line) transparent; }
.smatec-ai-message { display:flex; margin-bottom:12px; }
.smatec-ai-message > div { max-width:88%; padding:11px 13px; border:1px solid var(--sai-line); border-radius:15px 15px 15px 5px; background:rgba(14,35,67,.74); }
.smatec-ai-message p { margin:0; color:#dce5f0; font-size:.82rem; line-height:1.55; }
.smatec-ai-message .smatec-ai-followup { margin-top:10px; padding-top:9px; border-top:1px solid rgba(121,156,207,.2); color:#fff; font-weight:650; }
.smatec-ai-message a { display:inline-flex; align-items:center; gap:7px; margin-top:10px; color:#8beaff; font-size:.77rem; font-weight:800; text-decoration:none; }
.smatec-ai-message a::after { content:"→"; font-size:1rem; transition:transform 160ms ease; }
.smatec-ai-message a:hover::after { transform:translateX(3px); }
.smatec-ai-message-user { justify-content:flex-end; }
.smatec-ai-message-user > div { border-color:rgba(255,138,36,.34); border-radius:15px 15px 5px 15px; background:rgba(255,138,36,.1); }
.smatec-ai-message-user p { color:#fff0df; }
.smatec-ai-typing > div { display:flex; gap:5px; padding:14px 16px; }
.smatec-ai-typing i { width:6px; height:6px; border-radius:50%; background:var(--sai-cyan); animation:sai-typing 1s ease-in-out infinite; }
.smatec-ai-typing i:nth-child(2) { animation-delay:140ms; }.smatec-ai-typing i:nth-child(3) { animation-delay:280ms; }
@keyframes sai-typing { 0%,100% { opacity:.25; transform:translateY(0); } 50% { opacity:1; transform:translateY(-3px); } }
.smatec-ai-quick { display:flex; gap:7px; overflow-x:auto; padding:7px 16px 10px; scrollbar-width:none; }
.smatec-ai-quick::-webkit-scrollbar { display:none; }
.smatec-ai-quick button { flex:0 0 auto; min-height:36px; padding:8px 11px; border:1px solid var(--sai-line); border-radius:999px; color:#d7e1ee; background:rgba(10,26,53,.78); cursor:pointer; font-size:.69rem; font-weight:700; transition:border-color 160ms ease,background 160ms ease,transform 160ms ease; }
.smatec-ai-quick button:hover { border-color:var(--sai-cyan); color:var(--sai-text); }
.smatec-ai-form { padding:0 16px 10px; }
.smatec-ai-input { min-height:48px; display:flex; align-items:center; gap:8px; padding:5px 5px 5px 13px; border:1px solid var(--sai-line); border-radius:14px; background:#030816; }
.smatec-ai-input:focus-within { border-color:var(--sai-cyan); box-shadow:0 0 0 3px rgba(57,217,255,.1); }
.smatec-ai-input input { width:100%; min-width:0; border:0; outline:0; color:var(--sai-text); background:transparent; font-size:.78rem; }
.smatec-ai-input input::placeholder { color:#75849b; }
.smatec-ai-input button { width:42px; height:42px; display:grid; place-items:center; flex:0 0 auto; border:0; border-radius:11px; color:#071226; background:linear-gradient(135deg,var(--sai-orange),#ffb157); box-shadow:0 8px 20px rgba(255,138,36,.22); cursor:pointer; transition:transform 160ms ease,box-shadow 160ms ease; }
.smatec-ai-input button:hover { transform:translateX(2px); box-shadow:0 10px 26px rgba(255,138,36,.34); }
.smatec-ai-input button .smatec-ai-send-icon { width:23px; height:23px; fill:currentColor; stroke:none; }
.smatec-ai-panel > footer { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:0 16px 12px; }
.smatec-ai-panel > footer span { color:#75849b; font-size:.57rem; }
.smatec-ai-panel > footer button { flex:0 0 auto; padding:0; border:0; color:#8beaff; background:transparent; cursor:pointer; font-size:.67rem; font-weight:800; }
.smatec-ai button:focus-visible,.smatec-ai input:focus-visible { outline:3px solid var(--sai-cyan); outline-offset:3px; }
.admin-bar .smatec-ai-panel { max-height:calc(100vh - 177px); }
@media(max-width:680px){
  .smatec-ai { right:14px; bottom:76px; }
  .smatec-ai-launch { width:52px; height:52px; min-height:52px; padding:4px; justify-content:center; }
  .smatec-ai-launch > span:last-child { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
  .smatec-ai-launch-icon { width:42px; height:42px; }
  .smatec-ai-panel { position:fixed; inset:auto 10px 10px; width:auto; height:min(680px,calc(100dvh - 20px)); max-height:none; border-radius:20px; }
  .smatec-ai-messages { height:calc(100% - 218px); }
}
@media(prefers-reduced-motion:reduce){
  .smatec-ai-panel,.smatec-ai-typing i { animation:none!important; }
  .smatec-ai * { transition-duration:.01ms!important; }
}
@media print { .smatec-ai { display:none!important; } }
