/* ============ Inovetics AI Assistant — widget styles ============ */
#iv-chat-root{position:fixed;z-index:9500;right:26px;bottom:26px;font-family:'Space Grotesk',sans-serif;}
#iv-chat-root *{box-sizing:border-box;}

/* ---- launcher button ---- */
.iv-launcher{
  width:64px;height:64px;border-radius:50%;background:var(--yellow,#f3e600);
  display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;
  box-shadow:0 10px 30px -8px rgba(243,230,0,.55);position:relative;
  transition:transform .3s cubic-bezier(.2,.9,.3,1);
}
.iv-launcher:hover{transform:translateY(-3px) scale(1.04);}
.iv-launcher svg{width:26px;height:26px;color:#0a0a0a;transition:opacity .2s, transform .3s;}
.iv-launcher .iv-close-ic{position:absolute;opacity:0;transform:rotate(-45deg) scale(.6);}
#iv-chat-root.iv-open .iv-launcher .iv-chat-ic{opacity:0;transform:rotate(45deg) scale(.6);}
#iv-chat-root.iv-open .iv-launcher .iv-close-ic{opacity:1;transform:rotate(0) scale(1);}
.iv-ping{position:absolute;top:-3px;right:-3px;width:16px;height:16px;border-radius:50%;background:#8a5cff;border:2px solid #0a0a0a;}
.iv-ping::after{content:'';position:absolute;inset:0;border-radius:50%;background:#8a5cff;animation:iv-pulse 1.8s infinite;}
@keyframes iv-pulse{0%{opacity:.9;transform:scale(1);}100%{opacity:0;transform:scale(2.4);}}

/* ---- teaser bubble ---- */
.iv-teaser{
  display:none;position:absolute;bottom:76px;right:0;background:#161616;color:#f6f3ea;
  padding:14px 16px;border-radius:14px 14px 4px 14px;font-size:13.5px;
  width: 280px; max-width: calc(100vw - 60px);
  box-shadow:0 12px 30px -10px rgba(0,0,0,.6);border:1px solid #2e2e2e;
  line-height:1.5;
}
.iv-teaser button{position:absolute;top:6px;right:8px;background:none;border:none;color:#969696;font-size:14px;cursor:pointer;}
#iv-chat-root.iv-teaser-show .iv-teaser{display:block;animation:iv-fadein .4s ease forwards;}
#iv-chat-root.iv-open .iv-teaser,#iv-chat-root.iv-teaser-dismissed .iv-teaser{display:none;}
@keyframes iv-fadein{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}

/* ---- panel ---- */
.iv-panel{
  position:absolute;bottom:80px;right:0;width:378px;max-width:calc(100vw - 32px);
  height:min(600px, calc(100vh - 130px));background:#0f0f0f;border-radius:20px;
  border:1px solid #2e2e2e;overflow:hidden;display:flex;flex-direction:column;
  box-shadow:0 30px 70px -20px rgba(0,0,0,.7);
  opacity:0;transform:translateY(16px) scale(.98);pointer-events:none;
  transition:opacity .28s ease, transform .28s cubic-bezier(.2,.9,.3,1);
}
#iv-chat-root.iv-open .iv-panel{opacity:1;transform:translateY(0) scale(1);pointer-events:all;}

/* header */
.iv-head{
  padding:18px 20px;display:flex;align-items:center;gap:12px;
  background:linear-gradient(135deg,#161616,#1c1c1c);border-bottom:1px solid #2e2e2e;flex-shrink:0;
}
.iv-avatar{
  width:38px;height:38px;border-radius:50%;background:var(--yellow,#f3e600);
  display:flex;align-items:center;justify-content:center;font-family:'Bricolage Grotesque',sans-serif;
  font-weight:800;color:#0a0a0a;font-size:14px;flex-shrink:0;
}
.iv-head-txt{flex:1;min-width:0;}
.iv-head-txt h4{font-family:'Bricolage Grotesque',sans-serif;font-size:15px;color:#f6f3ea;font-weight:700;margin:0;}
.iv-head-status{font-size:12px;color:#8a5cff;display:flex;align-items:center;gap:6px;margin-top:2px;}
.iv-head-status i{width:6px;height:6px;border-radius:50%;background:#3ddc84;display:block;}
.iv-head-close{background:none;border:none;color:#969696;cursor:pointer;padding:6px;border-radius:8px;transition:.2s;}
.iv-head-close:hover{background:#2e2e2e;color:#f6f3ea;}

/* messages */
.iv-body{flex:1;overflow-y:auto;padding:20px 16px;display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth;}
.iv-body::-webkit-scrollbar{width:6px;}
.iv-body::-webkit-scrollbar-thumb{background:#2e2e2e;border-radius:6px;}
.iv-row{display:flex;gap:9px;align-items:flex-end;max-width:100%;}
.iv-row.iv-user{flex-direction:row-reverse;}
.iv-row .iv-mini-av{width:26px;height:26px;border-radius:50%;background:var(--yellow,#f3e600);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#0a0a0a;font-family:'Bricolage Grotesque',sans-serif;}
.iv-bubble{
  padding:11px 14px;border-radius:16px;font-size:14px;line-height:1.55;max-width:78%;
  white-space:pre-wrap;word-wrap:break-word;
}
.iv-row.iv-bot .iv-bubble{background:#1c1c1c;color:#f6f3ea;border:1px solid #2e2e2e;border-bottom-left-radius:4px;}
.iv-row.iv-user .iv-bubble{background:var(--yellow,#f3e600);color:#0a0a0a;font-weight:500;border-bottom-right-radius:4px;}
.iv-row.iv-bot .iv-bubble a{color:#8a5cff;text-decoration:underline;}

/* typing dots */
.iv-typing{display:flex;gap:4px;padding:14px 16px;}
.iv-typing span{width:6px;height:6px;border-radius:50%;background:#8a5cff;animation:iv-bounce 1.1s infinite;}
.iv-typing span:nth-child(2){animation-delay:.15s;}
.iv-typing span:nth-child(3){animation-delay:.3s;}
@keyframes iv-bounce{0%,60%,100%{transform:translateY(0);opacity:.5;}30%{transform:translateY(-5px);opacity:1;}}

/* quick chips */
.iv-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 14px;flex-shrink:0;}
.iv-chip{
  border:1px solid #2e2e2e;color:#f6f3ea;background:#161616;padding:8px 13px;border-radius:20px;
  font-size:12.5px;cursor:pointer;transition:.25s;white-space:nowrap;
}
.iv-chip:hover{border-color:var(--yellow,#f3e600);color:var(--yellow,#f3e600);}

/* convert bar */
.iv-convert{display:flex;gap:8px;padding:12px 16px;border-top:1px solid #2e2e2e;background:#141414;flex-shrink:0;}
.iv-convert a{
  flex:1;display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:12.5px;font-weight:600;padding:10px 8px;border-radius:12px;text-align:center;transition:.25s;
}
.iv-convert .iv-wa{background:#25D366;color:#04220f;}
.iv-convert .iv-call{background:#1c1c1c;color:#f6f3ea;border:1px solid #2e2e2e;}
.iv-convert a:hover{transform:translateY(-2px);}

/* input */
.iv-inputwrap{display:flex;gap:8px;padding:14px 16px;border-top:1px solid #2e2e2e;background:#0f0f0f;flex-shrink:0;}
.iv-input{
  flex:1;background:#1c1c1c;border:1px solid #2e2e2e;border-radius:14px;padding:11px 14px;
  color:#f6f3ea;font-family:'Space Grotesk',sans-serif;font-size:13.5px;outline:none;resize:none;max-height:90px;transition:.2s;
}
.iv-input:focus{border-color:var(--yellow,#f3e600);}
.iv-send{
  width:42px;height:42px;border-radius:12px;background:var(--yellow,#f3e600);border:none;
  display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:.2s;
}
.iv-send:hover{transform:translateY(-2px);}
.iv-send:disabled{opacity:.4;cursor:not-allowed;transform:none;}
.iv-send svg{width:17px;height:17px;color:#0a0a0a;}

@media(max-width:480px){
  #iv-chat-root{right:14px;bottom:14px;}
  .iv-panel{width:calc(100vw - 24px);right:-8px;height:min(78vh,600px);}
  .iv-launcher{width:58px;height:58px;}
  .iv-teaser{width:calc(100vw - 40px);right:0;}
}
