/* NikolicWP Asistent – the bubble and the chat window on the site. Everything is scoped to .nwp-as
   and uses its own variables, so the theme's styles do not leak in. */
.nwp-as { --nwp-as-color:#2872fa; --nwp-as-color2:#2872fa; --nwp-as-icon:#ffffff; --nwp-as-header:#173963; --nwp-as-header-fg:#ffffff; --nwp-as-accent:#2872fa; --nwp-as-accent-fg:#ffffff; --nwp-as-radius:18px; --nwp-as-width:380px; --nwp-as-x:20px; --nwp-as-y:20px; --nwp-as-bubble:60px;
  --nwp-as-bg:#ffffff; --nwp-as-bg2:#f2f5f7; --nwp-as-line:#e1e8ed; --nwp-as-text:#1f2d3d; --nwp-as-muted:#5a6b7d; --nwp-as-user:#eaf2ff; --nwp-as-shadow:0 18px 50px rgba(23,57,99,.22);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; font-size:15px; line-height:1.5; color:var(--nwp-as-text); -webkit-font-smoothing:antialiased; }
.nwp-as--dark, .nwp-as--auto { --nwp-as-dark-bg:#15202e; }
.nwp-as--dark { --nwp-as-bg:#15202e; --nwp-as-bg2:#1d2b3d; --nwp-as-line:#2c3d52; --nwp-as-text:#eef3f9; --nwp-as-muted:#9fb0c3; --nwp-as-user:#243c5e; }
@media (prefers-color-scheme: dark) { .nwp-as--auto { --nwp-as-bg:#15202e; --nwp-as-bg2:#1d2b3d; --nwp-as-line:#2c3d52; --nwp-as-text:#eef3f9; --nwp-as-muted:#9fb0c3; --nwp-as-user:#243c5e; } }
.nwp-as *, .nwp-as *::before, .nwp-as *::after { box-sizing:border-box; }
.nwp-as button { font:inherit; }
.nwp-as svg { display:block; }
.nwp-as [hidden] { display:none !important; }
.nwp-as .nwp-as-sr { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ---- Bubble ---- */
.nwp-as-launch { position:fixed; z-index:99990; bottom:calc(var(--nwp-as-y) + var(--nwp-as-lift, 0px)); transition:bottom .2s ease; right:var(--nwp-as-x); display:flex; align-items:center; gap:10px; flex-direction:row-reverse; }
.nwp-as--left .nwp-as-launch { right:auto; left:var(--nwp-as-x); flex-direction:row; }
.nwp-as-bubble { position:relative; width:var(--nwp-as-bubble); height:var(--nwp-as-bubble); margin:0; padding:0; border:0; border-radius:50%; cursor:pointer; color:var(--nwp-as-icon);
  background:linear-gradient(135deg,var(--nwp-as-color),var(--nwp-as-color2)); box-shadow:0 10px 28px rgba(23,57,99,.3), 0 0 0 0 rgba(40,114,250,.35); display:grid; place-items:center; transition:transform .2s, box-shadow .2s; }
.nwp-as-bubble:hover, .nwp-as-bubble:focus-visible { transform:translateY(-2px) scale(1.04); outline:none; }
.nwp-as-bubble:focus-visible { box-shadow:0 10px 28px rgba(23,57,99,.3), 0 0 0 4px rgba(255,255,255,.9), 0 0 0 7px var(--nwp-as-accent); }
.nwp-as-bubble__icon { width:54%; height:54%; }
.nwp-as-bubble__icon svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.nwp-as-bubble__nik { width:82%; height:82%; border-radius:50%; background:#fff; display:grid; place-items:center; overflow:hidden; }
.nwp-as-bubble__nik svg { width:92%; height:92%; }
.nwp-as-bubble__img { width:84%; height:84%; border-radius:50%; object-fit:cover; display:block; }
.nwp-as-bubble__close { position:absolute; inset:0; display:none; place-items:center; }
.nwp-as-bubble__close svg { width:42%; height:42%; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }
.nwp-as.is-open .nwp-as-bubble > :not(.nwp-as-bubble__close) { display:none; }
.nwp-as.is-open .nwp-as-bubble__close { display:grid; }
.nwp-as-bubble__badge { position:absolute; top:-2px; right:-2px; width:16px; height:16px; border-radius:50%; background:#ec1d24; border:2px solid #fff; display:none; }
.nwp-as-bubble.has-badge .nwp-as-bubble__badge { display:block; }
.nwp-as-label { margin:0; padding:9px 14px; border-radius:999px; background:var(--nwp-as-bg); color:var(--nwp-as-text); font-size:14px; font-weight:600; line-height:1.3; box-shadow:0 6px 20px rgba(23,57,99,.18); border:1px solid var(--nwp-as-line); cursor:pointer; white-space:nowrap; max-width:min(260px, 60vw); overflow:hidden; text-overflow:ellipsis; }
.nwp-as.is-open .nwp-as-label { display:none; }
.nwp-as--small { --nwp-as-bubble:50px; } .nwp-as--large { --nwp-as-bubble:72px; }
/* animations */
.nwp-as-bubble--pulse { animation:nwp-as-pulse 2.6s ease-out infinite; }
@keyframes nwp-as-pulse { 0% { box-shadow:0 10px 28px rgba(23,57,99,.3), 0 0 0 0 rgba(40,114,250,.45); } 70% { box-shadow:0 10px 28px rgba(23,57,99,.3), 0 0 0 18px rgba(40,114,250,0); } 100% { box-shadow:0 10px 28px rgba(23,57,99,.3), 0 0 0 0 rgba(40,114,250,0); } }
.nwp-as-bubble--bounce { animation:nwp-as-bounce 3s ease-in-out infinite; }
@keyframes nwp-as-bounce { 0%, 20%, 50%, 80%, 100% { transform:translateY(0); } 40% { transform:translateY(-10px); } 60% { transform:translateY(-5px); } }
.nwp-as-bubble--wave .nwp-as-bubble__nik svg, .nwp-as-bubble--wave .nwp-as-bubble__icon { animation:nwp-as-wave 2.8s ease-in-out infinite; transform-origin:50% 80%; }
@keyframes nwp-as-wave { 0%, 60%, 100% { transform:rotate(0); } 70% { transform:rotate(-10deg); } 80% { transform:rotate(10deg); } 90% { transform:rotate(-6deg); } }
.nwp-as.is-open .nwp-as-bubble { animation:none; }

/* ---- Window ---- */
.nwp-as-win { position:fixed; z-index:99991; bottom:calc(var(--nwp-as-y) + var(--nwp-as-lift, 0px) + var(--nwp-as-bubble) + 14px); right:var(--nwp-as-x); width:var(--nwp-as-width); max-width:calc(100vw - 2 * var(--nwp-as-x)); height:min(620px, calc(100vh - var(--nwp-as-y) - var(--nwp-as-lift, 0px) - var(--nwp-as-bubble) - 34px));
  display:flex; flex-direction:column; background:var(--nwp-as-bg); border-radius:var(--nwp-as-radius); box-shadow:var(--nwp-as-shadow); overflow:hidden; opacity:0; transform:translateY(12px) scale(.98); pointer-events:none; transition:opacity .22s, transform .22s; }
.nwp-as--left .nwp-as-win { right:auto; left:var(--nwp-as-x); }
.nwp-as.is-open .nwp-as-win { opacity:1; transform:none; pointer-events:auto; }
.nwp-as--inline { position:relative; width:100%; }
.nwp-as--inline .nwp-as-win { position:relative; inset:auto; width:100%; max-width:none; height:100%; opacity:1; transform:none; pointer-events:auto; border:1px solid var(--nwp-as-line); box-shadow:none; }
.nwp-as-head { display:flex; align-items:center; gap:12px; padding:14px 14px 14px 16px; background:var(--nwp-as-header); color:var(--nwp-as-header-fg); }
.nwp-as-head__avatar { flex:none; width:40px; height:40px; border-radius:50%; background:#fff; display:grid; place-items:center; overflow:hidden; }
.nwp-as-head__avatar svg { width:34px; height:34px; }
.nwp-as-head__avatar img { width:100%; height:100%; object-fit:cover; }
.nwp-as-head__avatar--icon { background:#fff; color:var(--nwp-as-header); box-shadow:inset 0 0 0 1px rgba(0,0,0,.06); }
.nwp-as-head__avatar--icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.nwp-as-head__text { min-width:0; flex:1; }
.nwp-as-head__title { margin:0; font-size:16px; font-weight:700; line-height:1.2; color:var(--nwp-as-header-fg); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nwp-as-head__sub { margin:2px 0 0; font-size:12.5px; color:var(--nwp-as-header-fg); opacity:.82; line-height:1.3; display:flex; align-items:center; flex-wrap:wrap; gap:2px 6px; }
.nwp-as-head__sub .nwp-as-pill { flex:none; }
.nwp-as-head__sub::before { content:""; width:7px; height:7px; border-radius:50%; background:#49d17d; flex:none; }
.nwp-as-head__btn { flex:none; width:34px; height:34px; border:0; border-radius:50%; background:transparent; color:var(--nwp-as-header-fg); cursor:pointer; display:grid; place-items:center; opacity:.85; }
.nwp-as-head__btn:hover, .nwp-as-head__btn:focus-visible { background:rgba(255,255,255,.14); opacity:1; outline:none; }
.nwp-as-head__btn svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.nwp-as-pill { display:inline-flex; align-items:center; gap:5px; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; background:rgba(127,127,127,.22); color:var(--nwp-as-header-fg); }
.nwp-as-body { flex:1; min-height:0; display:flex; flex-direction:column; position:relative; }
.nwp-as-msgs { flex:1; overflow-y:auto; padding:16px 14px 8px; display:flex; flex-direction:column; gap:10px; overscroll-behavior:contain; scroll-behavior:smooth; }
.nwp-as-msg { display:flex; align-items:flex-end; gap:8px; max-width:88%; }
.nwp-as-msg--user { align-self:flex-end; flex-direction:row-reverse; }
.nwp-as-msg__avatar { flex:none; width:28px; height:28px; border-radius:50%; background:#fff; border:1px solid var(--nwp-as-line); display:grid; place-items:center; overflow:hidden; }
.nwp-as-msg__avatar svg { width:24px; height:24px; }
.nwp-as-msg__avatar img { width:100%; height:100%; object-fit:cover; }
.nwp-as-msg__avatar--icon { background:var(--nwp-as-accent); color:var(--nwp-as-accent-fg); border:0; }
.nwp-as-msg__avatar--icon svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.nwp-as-msg__bubble { padding:10px 14px; border-radius:16px; background:var(--nwp-as-bg2); color:var(--nwp-as-text); font-size:15px; line-height:1.5; word-wrap:break-word; overflow-wrap:anywhere; border-bottom-left-radius:6px; }
.nwp-as-msg--user .nwp-as-msg__bubble { background:var(--nwp-as-accent); color:var(--nwp-as-accent-fg); border-bottom-left-radius:16px; border-bottom-right-radius:6px; white-space:pre-wrap; }
.nwp-as-msg--error .nwp-as-msg__bubble { background:#fff1f1; color:#8a1f24; border:1px solid #f5c2c5; }
.nwp-as--dark .nwp-as-msg--error .nwp-as-msg__bubble { background:#3a1f22; color:#ffb4b8; border-color:#5a2b2f; }
.nwp-as-msg__bubble p { margin:0 0 .6em; } .nwp-as-msg__bubble p:last-child { margin-bottom:0; }
.nwp-as-msg__bubble ul, .nwp-as-msg__bubble ol { margin:.3em 0 .6em; padding-left:1.3em; }
.nwp-as-msg__bubble li { margin:0 0 .25em; }
.nwp-as-msg__bubble a { color:var(--nwp-as-accent); text-decoration:underline; }
.nwp-as-msg--user .nwp-as-msg__bubble a { color:inherit; }
.nwp-as-msg__bubble code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.9em; background:rgba(0,0,0,.07); padding:1px 5px; border-radius:5px; }
.nwp-as-msg__bubble strong { font-weight:700; }
.nwp-as-typing { display:inline-flex; gap:4px; padding:4px 2px; }
.nwp-as-typing i { width:7px; height:7px; border-radius:50%; background:var(--nwp-as-muted); opacity:.5; animation:nwp-as-dot 1.2s infinite; }
.nwp-as-typing i:nth-child(2) { animation-delay:.2s; } .nwp-as-typing i:nth-child(3) { animation-delay:.4s; }
@keyframes nwp-as-dot { 0%, 60%, 100% { transform:translateY(0); opacity:.5; } 30% { transform:translateY(-4px); opacity:1; } }
.nwp-as-note { margin:0; padding:4px 14px; font-size:12px; color:var(--nwp-as-muted); text-align:center; }
.nwp-as-compose { display:flex; align-items:flex-end; gap:8px; padding:10px 12px 10px 14px; border-top:1px solid var(--nwp-as-line); background:var(--nwp-as-bg); }
.nwp-as-compose textarea { flex:1; min-height:42px; max-height:140px; margin:0; padding:10px 12px; border:1px solid var(--nwp-as-line); border-radius:12px; background:var(--nwp-as-bg2); color:var(--nwp-as-text); font:inherit; line-height:1.4; resize:none; outline:none; box-shadow:none; }
.nwp-as-compose textarea:focus { border-color:var(--nwp-as-accent); box-shadow:0 0 0 3px rgba(40,114,250,.18); background:var(--nwp-as-bg); }
.nwp-as-compose textarea::placeholder { color:var(--nwp-as-muted); opacity:.9; }
.nwp-as-send { flex:none; width:42px; height:42px; border:0; border-radius:50%; background:var(--nwp-as-accent); color:var(--nwp-as-accent-fg); cursor:pointer; display:grid; place-items:center; transition:transform .15s, opacity .15s; }
.nwp-as-send:hover, .nwp-as-send:focus-visible { transform:scale(1.06); outline:none; }
.nwp-as-send:disabled { opacity:.45; cursor:default; transform:none; }
.nwp-as-send svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.nwp-as-count { font-size:11px; color:var(--nwp-as-muted); text-align:right; padding:0 14px 6px; margin:0; }
.nwp-as-count.is-over { color:#c4141b; font-weight:600; }
.nwp-as-foot { padding:6px 14px 8px; border-top:1px solid var(--nwp-as-line); background:var(--nwp-as-bg); }
.nwp-as-credit { margin:0; font-size:11px; color:var(--nwp-as-muted); text-align:center; }
.nwp-as-credit a { color:inherit; text-decoration:none; }

/* ---- Gate (e-mail) ---- */
.nwp-as-gate { flex:1; overflow-y:auto; padding:22px 20px; display:flex; flex-direction:column; gap:12px; }
.nwp-as-gate__nik { width:84px; margin:0 auto 2px; }
.nwp-as-gate__nik svg { width:100%; height:auto; }
.nwp-as-gate__text { margin:0; text-align:center; color:var(--nwp-as-muted); font-size:14px; }
.nwp-as-gate__greet { margin:0; text-align:center; font-weight:600; font-size:16px; }
.nwp-as-field { display:flex; flex-direction:column; gap:5px; }
.nwp-as-field label { font-size:13px; font-weight:600; color:var(--nwp-as-text); }
.nwp-as-field input { width:100%; margin:0; padding:10px 12px; min-height:42px; border:1px solid var(--nwp-as-line); border-radius:10px; background:var(--nwp-as-bg2); color:var(--nwp-as-text); font:inherit; outline:none; box-shadow:none; }
.nwp-as-field input:focus { border-color:var(--nwp-as-accent); box-shadow:0 0 0 3px rgba(40,114,250,.18); background:var(--nwp-as-bg); }
.nwp-as-consent { display:flex; gap:9px; align-items:flex-start; font-size:12.5px; color:var(--nwp-as-muted); cursor:pointer; line-height:1.4; }
.nwp-as-consent input { margin:3px 0 0; width:16px; height:16px; flex:none; accent-color:var(--nwp-as-accent); }
.nwp-as-consent a { color:var(--nwp-as-accent); }
.nwp-as-btn { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:44px; margin:0; padding:10px 16px; border:0; border-radius:12px; background:var(--nwp-as-accent); color:var(--nwp-as-accent-fg); font-weight:600; font-size:15px; cursor:pointer; transition:filter .15s; }
.nwp-as-btn:hover, .nwp-as-btn:focus-visible { filter:brightness(1.08); outline:none; }
.nwp-as-btn:disabled { opacity:.55; cursor:default; }
.nwp-as-btn--ghost { background:transparent; color:var(--nwp-as-accent); border:1px solid var(--nwp-as-line); }
.nwp-as-err { margin:0; padding:9px 12px; border-radius:10px; background:#fff1f1; color:#8a1f24; font-size:13px; border:1px solid #f5c2c5; }
.nwp-as--dark .nwp-as-err { background:#3a1f22; color:#ffb4b8; border-color:#5a2b2f; }
.nwp-as-hp { position:absolute; left:-9999px; top:-9999px; opacity:0; height:0; width:0; overflow:hidden; }
.nwp-as-channels { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.nwp-as-channels__title { margin:6px 0 0; text-align:center; font-size:12px; color:var(--nwp-as-muted); }
.nwp-as-chan { display:inline-flex; align-items:center; gap:7px; padding:7px 12px; border-radius:999px; border:1px solid var(--nwp-as-line); background:var(--nwp-as-bg); color:var(--nwp-as-text); font-size:13px; font-weight:600; text-decoration:none; }
.nwp-as-chan:hover, .nwp-as-chan:focus-visible { border-color:var(--nwp-as-accent); color:var(--nwp-as-accent); outline:none; }
.nwp-as-chan svg { width:16px; height:16px; }
.nwp-as-chan--viber svg { fill:#7360f2; } .nwp-as-chan--whatsapp svg { fill:#25d366; } .nwp-as-chan--telegram svg { fill:#2aabee; } .nwp-as-chan--email svg, .nwp-as-chan--phone svg { fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.nwp-as-msgs .nwp-as-channels { margin:4px 0 6px; }

/* ---- Phone ---- */
@media (max-width: 560px) {
  .nwp-as:not(.nwp-as--inline) .nwp-as-win { right:0; left:0; bottom:0; width:100%; max-width:none; height:100%; height:100dvh; border-radius:0; }
  .nwp-as.is-open:not(.nwp-as--inline) .nwp-as-launch { display:none; }
  .nwp-as-win .nwp-as-head { padding-top:max(14px, env(safe-area-inset-top)); }
  .nwp-as-compose { padding-bottom:max(10px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .nwp-as-launch { transition:none; }
  .nwp-as *, .nwp-as *::before, .nwp-as *::after { animation:none !important; transition:none !important; }
  .nwp-as-msgs { scroll-behavior:auto; }
}
@media print { .nwp-as { display:none !important; } }

/* ---- Admin preview stage ---- */
.nwp-as-stage { position:relative; height:620px; border-radius:12px; overflow:hidden; border:1px solid #e1e8ed; background:#fafbfc; }
.nwp-as-stage .nwp-as-launch, .nwp-as-stage .nwp-as-win { position:absolute; z-index:5; }
.nwp-as-stage .nwp-as-win { height:min(470px, calc(100% - var(--nwp-as-y) - var(--nwp-as-bubble) - 34px)); max-width:calc(100% - 2 * var(--nwp-as-x)); }
.nwp-as-stage .nwp-as-fake { position:absolute; inset:0; padding:22px; display:flex; flex-direction:column; gap:12px; }
.nwp-as-stage .nwp-as-fake i { display:block; height:14px; border-radius:7px; background:#e1e8ed; }
.nwp-as-stage .nwp-as-fake i:first-child { height:42px; width:55%; background:#cfdbe8; border-radius:10px; }
.nwp-as-stage .nwp-as-fake i:nth-child(3) { width:80%; } .nwp-as-stage .nwp-as-fake i:nth-child(4) { width:65%; } .nwp-as-stage .nwp-as-fake i:nth-child(5) { height:80px; border-radius:10px; }
.nwp-as-stage.is-phone { width:360px; max-width:100%; margin:0 auto; }
.nwp-as-stage.is-phone .nwp-as-win { right:0 !important; left:0 !important; bottom:0 !important; width:100% !important; max-width:none !important; height:100% !important; border-radius:0 !important; }
.nwp-as-stage.is-phone .nwp-as.is-open .nwp-as-launch { display:none; }
