/* CSS Variables */
:root {
  --tj6h7-od2x: #4f46e5;
  --pgw58-px: #ffffff;
  --u98zue-l5x: #f9fafb;
  --rid6w-lt: #0f172a;
  --g2m0-jhf5: #6b7280;
  --qwm4w-iyyp: #e5e7eb;
  --n53-hw4c: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --qxf55p-fv: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --b49nw-ba: 16px;
  --wj97-f83b: 56px;
  --fip-a1y: 12px;
  --b6u-gi: 999999;
}

/* Base Reset */
.w41n,
.w41n * { box-sizing: border-box; margin: 0; padding: 0; }

/* Main Container */
.w41n {
  position: fixed; bottom: 24px; right: 24px; z-index: var(--b6u-gi);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--rid6w-lt);
}
.w41n.wql99f { right: auto; left: 24px; }

/* Floating Panel - Buttons */
.w7e1 { display: flex; flex-direction: column-reverse; gap: var(--fip-a1y); align-items: center; }
.jydt8c {
  width: var(--wj97-f83b); height: var(--wj97-f83b); min-width: var(--wj97-f83b); min-height: var(--wj97-f83b);
  border-radius: 50%; border: none; background: var(--tj6h7-od2x); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--n53-hw4c);
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: visible;
}
.jydt8c:hover { transform: scale(1.05); box-shadow: var(--qxf55p-fv); }
.jydt8c:active { transform: scale(0.95); }
.jydt8c:focus { outline: 2px solid var(--tj6h7-od2x); outline-offset: 2px; }
.jydt8c svg { width: 24px; height: 24px; fill: currentColor; }

/* Messenger Buttons - Specific Colors */
.jydt8c[data-jy2azq="telegram"]{ background:#0088cc; }
.jydt8c[data-jy2azq="whatsapp"]{ background:#25d366; }
.jydt8c[data-jy2azq="viber"]{ background:#7360f2; }
.jydt8c[data-jy2azq="messenger"]{ background:#0084ff; }

/* Pulse Animation */
@keyframes pulse { 0%,100%{ transform:scale(1); opacity:1;} 50%{ transform:scale(1.05); opacity:.9;} }
.jydt8c.opg06{ animation:pulse 2s ease-in-out infinite; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .jydt8c.opg06{ animation:none; }
  .jydt8c,.sh2w,.chic{ transition:none!important; animation:none!important; }
}

/* Chat Window (animate with visibility/pointer-events, not display) */
.sh2w{
  position: fixed; bottom: 96px; right: 24px; width: 360px; height: 480px;
  background: var(--pgw58-px); border-radius: var(--b49nw-ba); box-shadow: var(--qxf55p-fv);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(20px) scale(0.95); transition: opacity .2s ease, transform .2s ease;
  visibility: hidden; pointer-events: none;
}
.w41n.wql99f .sh2w{ right:auto; left:24px; }
.sh2w.iok42f{ opacity:1; transform:translateY(0) scale(1); visibility:visible; pointer-events:auto; }

/* Header */
.uy2re6{
  padding:16px 20px; background:var(--pgw58-px); border-bottom:1px solid var(--qwm4w-iyyp);
  display:flex; align-items:center; gap:12px; min-height:64px;
}
.uh35il{ width:10px; height:10px; border-radius:50%; background:var(--tj6h7-od2x); flex-shrink:0; }
.cwjtd{ flex:1; min-width:0; }
.ag8s{ font-size:16px; font-weight:600; color:var(--rid6w-lt); margin:0 0 2px 0; }
.tuc6u{ font-size:13px; color:var(--g2m0-jhf5); margin:0; }
.fe345{
  width:32px; height:32px; min-width:32px; border:none; background:transparent; color:var(--g2m0-jhf5);
  cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, color .2s ease; flex-shrink:0;
}
.fe345:hover{ background:var(--u98zue-l5x); color:var(--rid6w-lt); }
.fe345:focus{ outline:2px solid var(--tj6h7-od2x); outline-offset:2px; }
.fe345 svg{ width:20px; height:20px; }

/* Body */
.zmcpel{
  flex:1; overflow-y:auto; padding:16px; background:var(--u98zue-l5x);
  display:flex; flex-direction:column; gap:12px;
}
.zmcpel::-webkit-scrollbar{ width:6px; }
.zmcpel::-webkit-scrollbar-track{ background:transparent; }
.zmcpel::-webkit-scrollbar-thumb{ background:var(--qwm4w-iyyp); border-radius:3px; }
.zmcpel::-webkit-scrollbar-thumb:hover{ background:var(--g2m0-jhf5); }

/* Messages */
.chic{ display:flex; gap:8px; animation:slideIn .2s ease; }
@keyframes slideIn{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
.chic.azsnx8{ flex-direction:row-reverse; }
.e6hki{
  max-width:75%; padding:10px 14px; border-radius:12px; word-wrap:break-word; word-break:break-word;
}
.e6hki a{ color:inherit; }
.chic.qd34w9 .e6hki{ background:var(--pgw58-px); color:var(--rid6w-lt); border-bottom-left-radius:4px; }
.chic.azsnx8 .e6hki{ background:var(--tj6h7-od2x); color:#fff; border-bottom-right-radius:4px; }
.kpwf{ font-size:11px; color:var(--g2m0-jhf5); margin-top:4px; display:block; }

/* Typing Indicator */
.sox9{
  display:flex; gap:8px; padding:10px 14px; background:var(--pgw58-px);
  border-radius:12px; border-bottom-left-radius:4px; max-width:fit-content;
}
.q0hx2{ width:8px; height:8px; border-radius:50%; background:var(--g2m0-jhf5); animation:typingDot 1.4s infinite; }
.q0hx2:nth-child(2){ animation-delay:.2s; }
.q0hx2:nth-child(3){ animation-delay:.4s; }
@keyframes typingDot{ 0%,60%,100%{ transform:translateY(0); opacity:.5;} 30%{ transform:translateY(-8px); opacity:1;} }

/* Quick Replies (chips) */
.fe7fsn{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 0; padding:0 2px;
}
.ju5v{
  border:0; border-radius:999px; padding:8px 12px; background:var(--tj6h7-od2x); color:#fff; cursor:pointer;
  font:inherit; line-height:1; transition:transform .08s ease, background .2s ease, color .2s ease, border-color .2s ease;
  box-shadow: var(--n53-hw4c);
}
.ju5v:is(:hover,:focus){ transform:translateY(-1px); }
a.ju5v{ text-decoration:none; display:inline-block; }
a.ju5v:link, a.ju5v:visited{ color:#fff; }
a.ju5v:hover, a.ju5v:focus{ color:#fff; }

/* Error Banner */
.db0iw3{
  padding:12px 16px; background:#fee; color:#c00; border-radius:8px; font-size:13px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.o8l2{
  padding:6px 12px; background:#c00; color:#fff; border:none; border-radius:6px; font-size:12px; cursor:pointer; white-space:nowrap;
}

/* Footer */
.jnlmy{
  padding:16px; background:var(--pgw58-px); border-top:1px solid var(--qwm4w-iyyp);
  display:flex; gap:12px; align-items:flex-end; position:relative;
}
.fsbts{
  flex:1; padding:10px 14px; border:1px solid var(--qwm4w-iyyp); border-radius:20px;
  font-family:inherit; font-size:14px; line-height:1.5; color:var(--rid6w-lt);
  background:var(--u98zue-l5x); resize:none; max-height:96px; min-height:40px; outline:none; transition:border-color .2s ease;
}
.fsbts:focus{ border-color:var(--tj6h7-od2x); }
.fsbts::placeholder{ color:var(--g2m0-jhf5); }
.fsbts.pmlgr{ border-color:#c00; }
.k39p{
  width:40px; height:40px; min-width:40px; border:none; background:var(--tj6h7-od2x); color:#fff;
  border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .2s ease, opacity .2s ease;
}
.k39p:disabled{ opacity:.5; cursor:not-allowed; }
.k39p:not(:disabled):hover{ transform:scale(1.05); }
.k39p:not(:disabled):active{ transform:scale(0.95); }
.k39p:focus{ outline:2px solid var(--tj6h7-od2x); outline-offset:2px; }
.k39p svg{ width:20px; height:20px; }

/* Character Counter */
.zm7eg{ position:absolute; bottom:4px; right:52px; font-size:11px; color:var(--g2m0-jhf5); }
.zm7eg.tmm1c{ color:#c00; font-weight:600; }

/* ---- INLINE CTA BUTTONS ("buttons" payload) ---- */
/* Looks like an operator bubble with pill buttons inside */
.uwqfqk{
  align-self:flex-start;
  max-width:75%;
  background: var(--pgw58-px);
  color: var(--rid6w-lt);
  border-radius:12px; border-bottom-left-radius:4px;
  padding:10px 12px;
  box-shadow: var(--n53-hw4c);
}
.k4k4{ display:flex; flex-wrap:wrap; gap:8px; }

/* Solid pill buttons */
.rzpm5{
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:999px;
  background: var(--tj6h7-od2x); color:#fff; border:1px solid transparent;
  font-size:13px; line-height:1; text-decoration:none;
  box-shadow: var(--n53-hw4c);
  transition: transform .08s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.rzpm5:link, .rzpm5:visited{ color:#fff; }
.rzpm5:hover{ transform:translateY(-1px); box-shadow: var(--qxf55p-fv); }
.rzpm5:active{ transform:translateY(0); }
.rzpm5:focus-visible{ outline:2px solid var(--tj6h7-od2x); outline-offset:2px; }

/* Optional outline variant */
.rzpm5.d6dj1{
  background: transparent; color: var(--rid6w-lt); border-color: var(--qwm4w-iyyp);
}
.rzpm5.d6dj1:hover{
  background: var(--tj6h7-od2x); color:#fff; border-color: var(--tj6h7-od2x);
}

/* Mobile */
@media (max-width: 768px){
  .w41n{ bottom:16px; right:16px; }
  .w41n.wql99f{ left:16px; }
  .jydt8c{ --wj97-f83b:60px; }
  .sh2w{
    position:fixed; bottom:0; right:0; left:0; width:100%; height:65vh; max-height:65vh;
    border-radius: var(--b49nw-ba) var(--b49nw-ba) 0 0; transform: translateY(100%);
  }
  .sh2w.iok42f{ transform: translateY(0); }
  .uy2re6{ padding:20px; }
  .jnlmy{ padding:16px; padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

/* High Contrast */
@media (prefers-contrast: high){ .jydt8c, .sh2w{ border:2px solid currentColor; } }

/* Focus Visible */
.w41n :focus-visible{ outline:2px solid var(--tj6h7-od2x); outline-offset:2px; }

/* SR-only */
.mwdm{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border-width:0;
}

/* Hidden */
.gmlz{ display:none !important; }
