/* Asistentul virtual: calculator retro animat, mesaj de întâmpinare, formular dinaintea chatului. */
#abcit-chat-wrap { position:fixed; right:max(14px, env(safe-area-inset-right, 0px)); bottom:calc(14px + env(safe-area-inset-bottom, 0px)); z-index:60; display:flex; align-items:flex-end; gap:10px; max-width:calc(100vw - 20px); pointer-events:none; }
#abcit-chat-wrap > * { pointer-events:auto; }
#abcit-chat-wrap[hidden], .abcit-bubble[hidden], #abcit-lead[hidden], #abcit-chat-box[hidden] { display:none !important; }

/* calculatorul */
.abcit-pc { appearance:none; border:0; background:none; padding:0; width:92px; height:92px; flex:none; cursor:pointer; filter:drop-shadow(0 8px 10px rgba(0,0,0,.28)); transition:transform .25s cubic-bezier(.2,.8,.2,1), filter .25s; -webkit-tap-highlight-color:transparent; }
.abcit-pc:hover { transform:translateY(-4px) scale(1.06); filter:drop-shadow(0 12px 14px rgba(0,0,0,.32)); }
.abcit-pc:focus-visible { outline:3px solid var(--accent); outline-offset:4px; border-radius:14px; }
.abcit-pc-svg { width:100%; height:100%; display:block; overflow:visible; animation:abcit-bob 6s ease-in-out infinite; transform-origin:50% 90%; }
.abcit-cursor { animation:abcit-blink 1s steps(2, start) infinite; }
.abcit-t1 { transform-box:fill-box; transform-origin:left center; animation:abcit-type 5s steps(12, end) infinite; }
.abcit-t2 { transform-box:fill-box; transform-origin:left center; animation:abcit-type2 5s steps(14, end) infinite; }
.abcit-sweep { animation:abcit-sweep 3.4s linear infinite; }
.abcit-screen { animation:abcit-flicker 7s infinite; }
.abcit-led { animation:abcit-led 2.2s ease-in-out infinite; }
.abcit-keys rect:nth-child(2n) { animation:abcit-key 3s ease-in-out infinite; }
.abcit-keys rect:nth-child(3n) { animation:abcit-key 3s ease-in-out 1.1s infinite; }
@keyframes abcit-bob { 0%, 86%, 100% { transform:translateY(0) rotate(0); } 90% { transform:translateY(-6px) rotate(-1.5deg); } 94% { transform:translateY(0) rotate(1.2deg); } 97% { transform:translateY(-2px) rotate(0); } }
@keyframes abcit-blink { to { visibility:hidden; } }
@keyframes abcit-type { 0%, 8% { transform:scaleX(0); } 45%, 100% { transform:scaleX(1); } }
@keyframes abcit-type2 { 0%, 40% { transform:scaleX(0); } 80%, 100% { transform:scaleX(1); } }
@keyframes abcit-sweep { 0% { transform:translateY(-10px); } 100% { transform:translateY(46px); } }
@keyframes abcit-flicker { 0%, 100% { opacity:1; } 92% { opacity:1; } 93% { opacity:.86; } 94% { opacity:1; } 96% { opacity:.92; } }
@keyframes abcit-led { 0%, 100% { opacity:1; } 50% { opacity:.35; } }
@keyframes abcit-key { 0%, 100% { transform:translateY(0); } 50% { transform:translateY(.7px); } }

/* mesajul de întâmpinare */
.abcit-bubble { position:relative; max-width:250px; margin-bottom:22px; border:1px solid var(--line); border-radius:14px 14px 4px 14px; background:var(--surface); color:var(--ink); box-shadow:0 10px 26px rgba(0,0,0,.2); }
.abcit-bubble .ab-text { appearance:none; display:block; width:100%; border:0; background:none; margin:0; padding:12px 30px 12px 14px; color:inherit; font:500 .9375rem/1.4 var(--font-body); text-align:left; cursor:pointer; border-radius:inherit; -webkit-tap-highlight-color:transparent; }
.abcit-bubble .ab-x { appearance:none; position:absolute; top:-10px; right:-8px; width:26px; height:26px; padding:0; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--ink); font:400 1.1rem/1 system-ui, sans-serif; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.2); display:grid; place-items:center; }
.abcit-bubble .ab-x:hover { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.abcit-bubble .ab-x:focus-visible, .abcit-bubble .ab-text:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.abcit-bubble::after { content:""; position:absolute; right:-7px; bottom:10px; width:12px; height:12px; background:var(--surface); border-right:1px solid var(--line); border-top:1px solid var(--line); transform:rotate(45deg); border-radius:0 3px 0 0; }
.abcit-bubble:hover { border-color:var(--accent); }
.abcit-bubble.is-in { animation:abcit-pop .55s cubic-bezier(.2,.9,.3,1.3) both; transform-origin:100% 100%; }
@keyframes abcit-pop { from { opacity:0; transform:translateY(10px) scale(.7); } to { opacity:1; transform:none; } }
@media (max-width:520px) {
  #abcit-chat-wrap { flex-direction:column; align-items:flex-end; gap:6px; }
  .abcit-pc { width:80px; height:80px; }
  .abcit-bubble { max-width:min(250px, calc(100vw - 28px)); margin-bottom:0; border-radius:14px 14px 4px 14px; }
  .abcit-bubble::after { right:34px; bottom:-7px; border:0; border-right:1px solid var(--line); border-bottom:1px solid var(--line); border-radius:0 0 3px 0; }
}

/* formularul */
#abcit-lead { position:fixed; right:max(14px, env(safe-area-inset-right, 0px)); bottom:calc(14px + env(safe-area-inset-bottom, 0px)); z-index:2147483001; width:380px; max-height:calc(100vh - 28px); overflow:auto; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:16px; box-shadow:0 14px 44px rgba(0,0,0,.34); font-family:var(--font-body); }
#abcit-lead .al-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line); background:var(--bg); position:sticky; top:0; }
#abcit-lead .al-head strong { font-size:1.125rem; }
#abcit-lead .al-x { appearance:none; border:0; background:none; color:var(--ink); font-size:1.75rem; line-height:1; width:40px; height:40px; border-radius:10px; cursor:pointer; }
#abcit-lead .al-x:hover { background:var(--line); }
#abcit-lead .al-form { padding:16px; display:grid; gap:12px; }
#abcit-lead .al-intro { margin:0; color:var(--muted); font-size:.9375rem; }
#abcit-lead label { display:block; font-weight:600; font-size:.9375rem; margin-bottom:4px; }
#abcit-lead input:not(.al-hp) { width:100%; min-height:46px; padding:10px 12px; font:inherit; font-size:1rem; color:var(--ink); background:var(--bg); border:1px solid var(--line); border-radius:10px; }
#abcit-lead input:focus-visible { outline:3px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
#abcit-lead input[aria-invalid="true"] { border-color:#c62828; }
:root[data-chat-scheme="dark"] #abcit-lead input[aria-invalid="true"] { border-color:#ff8a80; }
#abcit-lead .al-msg { margin:4px 0 0; min-height:0; font-size:.875rem; color:#b3261e; }
:root[data-chat-scheme="dark"] #abcit-lead .al-msg, :root[data-chat-scheme="dark"] #abcit-lead .al-err { color:#ff8a80; }
#abcit-lead .al-err { margin:0; font-size:.9375rem; color:#b3261e; }
#abcit-lead .al-hp { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
#abcit-lead .al-go { appearance:none; border:0; min-height:50px; border-radius:12px; background:var(--accent); color:var(--accent-ink); font:600 1.0625rem var(--font-body); cursor:pointer; box-shadow:0 5px 0 color-mix(in srgb, var(--accent) 55%, #000); transition:transform .12s, box-shadow .12s; }
#abcit-lead .al-go:active { transform:translateY(4px); box-shadow:0 1px 0 color-mix(in srgb, var(--accent) 55%, #000); }
#abcit-lead .al-go:disabled { opacity:.7; cursor:progress; }
#abcit-lead .al-note { margin:0; font-size:.8125rem; color:var(--muted); }
#abcit-lead .al-note a { color:var(--accent-text); }
/* fereastra de chat (iframe) + buton de mărire */
#abcit-chat-box { position:fixed; right:max(14px, env(safe-area-inset-right, 0px)); bottom:calc(14px + env(safe-area-inset-bottom, 0px)); z-index:2147483001; width:380px; height:min(580px, calc(100vh - 28px - 50px)); transition:width .28s cubic-bezier(.2,.8,.2,1), height .28s cubic-bezier(.2,.8,.2,1); }
#abcit-chat-box.is-big { width:min(840px, calc(100vw - 28px)); height:calc(100vh - 28px - 50px); }
#abcit-chat-frame { display:block; width:100%; height:100%; border:0; border-radius:16px; box-shadow:0 14px 44px rgba(0,0,0,.34); background:#fff; }
.abcit-big { appearance:none; position:absolute; top:-44px; right:0; width:38px; height:38px; padding:0; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--ink); display:grid; place-items:center; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.25); transition:transform .15s, background .15s; }
.abcit-big:hover { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); transform:scale(1.08); }
.abcit-big:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
@media (max-width:480px) {
  #abcit-lead { right:0; bottom:0; width:100%; max-height:none; border-radius:0; height:100%; border:0; }
  #abcit-chat-box, #abcit-chat-box.is-big { right:0; bottom:0; width:100%; height:100%; transition:none; }
  #abcit-chat-frame { border-radius:0; box-shadow:none; }
  .abcit-big { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .abcit-pc-svg, .abcit-cursor, .abcit-t1, .abcit-t2, .abcit-sweep, .abcit-screen, .abcit-led, .abcit-keys rect, .abcit-bubble.is-in { animation:none !important; }
  .abcit-pc, #abcit-lead .al-go, #abcit-chat-box, .abcit-big { transition:none; }
}
