/* CSS Variables */
:root {
  --lrg-zquo: #4f46e5;
  --b3s-lc: #ffffff;
  --glf-t11: #f9fafb;
  --ytqyh-wl: #0f172a;
  --s4m82-w7: #6b7280;
  --rv873-nkky: #e5e7eb;
  --j3da-flh7: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --tp25q-mm: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --suocuh-pf76: 16px;
  --yob0l1-m7mj: 56px;
  --e2guy-ne: 12px;
  --j2ef-ia: 999999;
}

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

/* Main Container */
.jm727z {
  position: fixed; bottom: 24px; right: 24px; z-index: var(--j2ef-ia);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--ytqyh-wl);
}
.jm727z.v7z6 { right: auto; left: 24px; }

/* Floating Panel - Buttons */
.wetc { display: flex; flex-direction: column-reverse; gap: var(--e2guy-ne); align-items: center; }
.csz6r {
  width: var(--yob0l1-m7mj); height: var(--yob0l1-m7mj); min-width: var(--yob0l1-m7mj); min-height: var(--yob0l1-m7mj);
  border-radius: 50%; border: none; background: var(--lrg-zquo); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--j3da-flh7);
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: visible;
}
.csz6r:hover { transform: scale(1.05); box-shadow: var(--tp25q-mm); }
.csz6r:active { transform: scale(0.95); }
.csz6r:focus { outline: 2px solid var(--lrg-zquo); outline-offset: 2px; }
.csz6r svg { width: 24px; height: 24px; fill: currentColor; }

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .csz6r.qks31r{ animation:none; }
  .csz6r,.ohdy,.zn4m{ transition:none!important; animation:none!important; }
}

/* Chat Window (animate with visibility/pointer-events, not display) */
.ohdy{
  position: fixed; bottom: 96px; right: 24px; width: 360px; height: 480px;
  background: var(--b3s-lc); border-radius: var(--suocuh-pf76); box-shadow: var(--tp25q-mm);
  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;
}
.jm727z.v7z6 .ohdy{ right:auto; left:24px; }
.ohdy.j3er{ opacity:1; transform:translateY(0) scale(1); visibility:visible; pointer-events:auto; }

/* Header */
.fj1brw{
  padding:16px 20px; background:var(--b3s-lc); border-bottom:1px solid var(--rv873-nkky);
  display:flex; align-items:center; gap:12px; min-height:64px;
}
.bqa062{ width:10px; height:10px; border-radius:50%; background:var(--lrg-zquo); flex-shrink:0; }
.d96j{ flex:1; min-width:0; }
.an65um{ font-size:16px; font-weight:600; color:var(--ytqyh-wl); margin:0 0 2px 0; }
.vabse{ font-size:13px; color:var(--s4m82-w7); margin:0; }
.gk084b{
  width:32px; height:32px; min-width:32px; border:none; background:transparent; color:var(--s4m82-w7);
  cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, color .2s ease; flex-shrink:0;
}
.gk084b:hover{ background:var(--glf-t11); color:var(--ytqyh-wl); }
.gk084b:focus{ outline:2px solid var(--lrg-zquo); outline-offset:2px; }
.gk084b svg{ width:20px; height:20px; }

/* Body */
.wqow{
  flex:1; overflow-y:auto; padding:16px; background:var(--glf-t11);
  display:flex; flex-direction:column; gap:12px;
}
.wqow::-webkit-scrollbar{ width:6px; }
.wqow::-webkit-scrollbar-track{ background:transparent; }
.wqow::-webkit-scrollbar-thumb{ background:var(--rv873-nkky); border-radius:3px; }
.wqow::-webkit-scrollbar-thumb:hover{ background:var(--s4m82-w7); }

/* Messages */
.zn4m{ display:flex; gap:8px; animation:slideIn .2s ease; }
@keyframes slideIn{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
.zn4m.n2s0g{ flex-direction:row-reverse; }
.ugz6{
  max-width:75%; padding:10px 14px; border-radius:12px; word-wrap:break-word; word-break:break-word;
}
.ugz6 a{ color:inherit; }
.zn4m.r9qa .ugz6{ background:var(--b3s-lc); color:var(--ytqyh-wl); border-bottom-left-radius:4px; }
.zn4m.n2s0g .ugz6{ background:var(--lrg-zquo); color:#fff; border-bottom-right-radius:4px; }
.kmx3{ font-size:11px; color:var(--s4m82-w7); margin-top:4px; display:block; }

/* Typing Indicator */
.y1m9j4{
  display:flex; gap:8px; padding:10px 14px; background:var(--b3s-lc);
  border-radius:12px; border-bottom-left-radius:4px; max-width:fit-content;
}
.eqxlu{ width:8px; height:8px; border-radius:50%; background:var(--s4m82-w7); animation:typingDot 1.4s infinite; }
.eqxlu:nth-child(2){ animation-delay:.2s; }
.eqxlu: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) */
.ws4uq3{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 0; padding:0 2px;
}
.h641n9{
  border:0; border-radius:999px; padding:8px 12px; background:var(--lrg-zquo); 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(--j3da-flh7);
}
.h641n9:is(:hover,:focus){ transform:translateY(-1px); }
a.h641n9{ text-decoration:none; display:inline-block; }
a.h641n9:link, a.h641n9:visited{ color:#fff; }
a.h641n9:hover, a.h641n9:focus{ color:#fff; }

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

/* Footer */
.a60v{
  padding:16px; background:var(--b3s-lc); border-top:1px solid var(--rv873-nkky);
  display:flex; gap:12px; align-items:flex-end; position:relative;
}
.yd6p8{
  flex:1; padding:10px 14px; border:1px solid var(--rv873-nkky); border-radius:20px;
  font-family:inherit; font-size:14px; line-height:1.5; color:var(--ytqyh-wl);
  background:var(--glf-t11); resize:none; max-height:96px; min-height:40px; outline:none; transition:border-color .2s ease;
}
.yd6p8:focus{ border-color:var(--lrg-zquo); }
.yd6p8::placeholder{ color:var(--s4m82-w7); }
.yd6p8.gsw3{ border-color:#c00; }
.yls8ki{
  width:40px; height:40px; min-width:40px; border:none; background:var(--lrg-zquo); color:#fff;
  border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .2s ease, opacity .2s ease;
}
.yls8ki:disabled{ opacity:.5; cursor:not-allowed; }
.yls8ki:not(:disabled):hover{ transform:scale(1.05); }
.yls8ki:not(:disabled):active{ transform:scale(0.95); }
.yls8ki:focus{ outline:2px solid var(--lrg-zquo); outline-offset:2px; }
.yls8ki svg{ width:20px; height:20px; }

/* Character Counter */
.fm5s{ position:absolute; bottom:4px; right:52px; font-size:11px; color:var(--s4m82-w7); }
.fm5s.dhw39h{ color:#c00; font-weight:600; }

/* ---- INLINE CTA BUTTONS ("buttons" payload) ---- */
/* Looks like an operator bubble with pill buttons inside */
.u3t8f{
  align-self:flex-start;
  max-width:75%;
  background: var(--b3s-lc);
  color: var(--ytqyh-wl);
  border-radius:12px; border-bottom-left-radius:4px;
  padding:10px 12px;
  box-shadow: var(--j3da-flh7);
}
.rpi1w{ display:flex; flex-wrap:wrap; gap:8px; }

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

/* Optional outline variant */
.hcduvv.ljqe{
  background: transparent; color: var(--ytqyh-wl); border-color: var(--rv873-nkky);
}
.hcduvv.ljqe:hover{
  background: var(--lrg-zquo); color:#fff; border-color: var(--lrg-zquo);
}

/* Mobile */
@media (max-width: 768px){
  .jm727z{ bottom:16px; right:16px; }
  .jm727z.v7z6{ left:16px; }
  .csz6r{ --yob0l1-m7mj:60px; }
  .ohdy{
    position:fixed; bottom:0; right:0; left:0; width:100%; height:65vh; max-height:65vh;
    border-radius: var(--suocuh-pf76) var(--suocuh-pf76) 0 0; transform: translateY(100%);
  }
  .ohdy.j3er{ transform: translateY(0); }
  .fj1brw{ padding:20px; }
  .a60v{ padding:16px; padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

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

/* Focus Visible */
.jm727z :focus-visible{ outline:2px solid var(--lrg-zquo); outline-offset:2px; }

/* SR-only */
.n3f2{
  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 */
.f5n3r8{ display:none !important; }
