/* CSS Variables */
:root {
  --qi4-k2m: #4f46e5;
  --hisen-w1: #ffffff;
  --fy32-oj: #f9fafb;
  --fu7c-j4oc: #0f172a;
  --qqn-erq: #6b7280;
  --o4k-oq: #e5e7eb;
  --t96rpm-hb05: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ciimrm-w9o7: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --z44dn9-jblr: 16px;
  --tpw-bq: 56px;
  --n2ryu-pme: 12px;
  --ci1x6-nmn8: 999999;
}

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

/* Main Container */
.h7xk39 {
  position: fixed; bottom: 24px; right: 24px; z-index: var(--ci1x6-nmn8);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--fu7c-j4oc);
}
.h7xk39.vslrd { right: auto; left: 24px; }

/* Floating Panel - Buttons */
.y4nr65 { display: flex; flex-direction: column-reverse; gap: var(--n2ryu-pme); align-items: center; }
.lu9tv {
  width: var(--tpw-bq); height: var(--tpw-bq); min-width: var(--tpw-bq); min-height: var(--tpw-bq);
  border-radius: 50%; border: none; background: var(--qi4-k2m); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--t96rpm-hb05);
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: visible;
}
.lu9tv:hover { transform: scale(1.05); box-shadow: var(--ciimrm-w9o7); }
.lu9tv:active { transform: scale(0.95); }
.lu9tv:focus { outline: 2px solid var(--qi4-k2m); outline-offset: 2px; }
.lu9tv svg { width: 24px; height: 24px; fill: currentColor; }

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .lu9tv.n9ebk{ animation:none; }
  .lu9tv,.cfmv,.qxfinb{ transition:none!important; animation:none!important; }
}

/* Chat Window (animate with visibility/pointer-events, not display) */
.cfmv{
  position: fixed; bottom: 96px; right: 24px; width: 360px; height: 480px;
  background: var(--hisen-w1); border-radius: var(--z44dn9-jblr); box-shadow: var(--ciimrm-w9o7);
  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;
}
.h7xk39.vslrd .cfmv{ right:auto; left:24px; }
.cfmv.yhe9f{ opacity:1; transform:translateY(0) scale(1); visibility:visible; pointer-events:auto; }

/* Header */
.b849vm{
  padding:16px 20px; background:var(--hisen-w1); border-bottom:1px solid var(--o4k-oq);
  display:flex; align-items:center; gap:12px; min-height:64px;
}
.djlg{ width:10px; height:10px; border-radius:50%; background:var(--qi4-k2m); flex-shrink:0; }
.akgl{ flex:1; min-width:0; }
.o6f1ba{ font-size:16px; font-weight:600; color:var(--fu7c-j4oc); margin:0 0 2px 0; }
.ddv4{ font-size:13px; color:var(--qqn-erq); margin:0; }
.n72bgd{
  width:32px; height:32px; min-width:32px; border:none; background:transparent; color:var(--qqn-erq);
  cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, color .2s ease; flex-shrink:0;
}
.n72bgd:hover{ background:var(--fy32-oj); color:var(--fu7c-j4oc); }
.n72bgd:focus{ outline:2px solid var(--qi4-k2m); outline-offset:2px; }
.n72bgd svg{ width:20px; height:20px; }

/* Body */
.wum3ji{
  flex:1; overflow-y:auto; padding:16px; background:var(--fy32-oj);
  display:flex; flex-direction:column; gap:12px;
}
.wum3ji::-webkit-scrollbar{ width:6px; }
.wum3ji::-webkit-scrollbar-track{ background:transparent; }
.wum3ji::-webkit-scrollbar-thumb{ background:var(--o4k-oq); border-radius:3px; }
.wum3ji::-webkit-scrollbar-thumb:hover{ background:var(--qqn-erq); }

/* Messages */
.qxfinb{ display:flex; gap:8px; animation:slideIn .2s ease; }
@keyframes slideIn{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
.qxfinb.exg7d3{ flex-direction:row-reverse; }
.f3lvg{
  max-width:75%; padding:10px 14px; border-radius:12px; word-wrap:break-word; word-break:break-word;
}
.f3lvg a{ color:inherit; }
.qxfinb.zq1vho .f3lvg{ background:var(--hisen-w1); color:var(--fu7c-j4oc); border-bottom-left-radius:4px; }
.qxfinb.exg7d3 .f3lvg{ background:var(--qi4-k2m); color:#fff; border-bottom-right-radius:4px; }
.e4264z{ font-size:11px; color:var(--qqn-erq); margin-top:4px; display:block; }

/* Typing Indicator */
.ji44ap{
  display:flex; gap:8px; padding:10px 14px; background:var(--hisen-w1);
  border-radius:12px; border-bottom-left-radius:4px; max-width:fit-content;
}
.s5gc{ width:8px; height:8px; border-radius:50%; background:var(--qqn-erq); animation:typingDot 1.4s infinite; }
.s5gc:nth-child(2){ animation-delay:.2s; }
.s5gc: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) */
.s9n9{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 0; padding:0 2px;
}
.wb8c{
  border:0; border-radius:999px; padding:8px 12px; background:var(--qi4-k2m); 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(--t96rpm-hb05);
}
.wb8c:is(:hover,:focus){ transform:translateY(-1px); }
a.wb8c{ text-decoration:none; display:inline-block; }
a.wb8c:link, a.wb8c:visited{ color:#fff; }
a.wb8c:hover, a.wb8c:focus{ color:#fff; }

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

/* Footer */
.kdwb{
  padding:16px; background:var(--hisen-w1); border-top:1px solid var(--o4k-oq);
  display:flex; gap:12px; align-items:flex-end; position:relative;
}
.z1q1{
  flex:1; padding:10px 14px; border:1px solid var(--o4k-oq); border-radius:20px;
  font-family:inherit; font-size:14px; line-height:1.5; color:var(--fu7c-j4oc);
  background:var(--fy32-oj); resize:none; max-height:96px; min-height:40px; outline:none; transition:border-color .2s ease;
}
.z1q1:focus{ border-color:var(--qi4-k2m); }
.z1q1::placeholder{ color:var(--qqn-erq); }
.z1q1.o9vic{ border-color:#c00; }
.vlv0ll{
  width:40px; height:40px; min-width:40px; border:none; background:var(--qi4-k2m); color:#fff;
  border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .2s ease, opacity .2s ease;
}
.vlv0ll:disabled{ opacity:.5; cursor:not-allowed; }
.vlv0ll:not(:disabled):hover{ transform:scale(1.05); }
.vlv0ll:not(:disabled):active{ transform:scale(0.95); }
.vlv0ll:focus{ outline:2px solid var(--qi4-k2m); outline-offset:2px; }
.vlv0ll svg{ width:20px; height:20px; }

/* Character Counter */
.hch75{ position:absolute; bottom:4px; right:52px; font-size:11px; color:var(--qqn-erq); }
.hch75.s4cz{ color:#c00; font-weight:600; }

/* ---- INLINE CTA BUTTONS ("buttons" payload) ---- */
/* Looks like an operator bubble with pill buttons inside */
.px5mb{
  align-self:flex-start;
  max-width:75%;
  background: var(--hisen-w1);
  color: var(--fu7c-j4oc);
  border-radius:12px; border-bottom-left-radius:4px;
  padding:10px 12px;
  box-shadow: var(--t96rpm-hb05);
}
.hrya{ display:flex; flex-wrap:wrap; gap:8px; }

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

/* Optional outline variant */
.deeqi.lt3bz{
  background: transparent; color: var(--fu7c-j4oc); border-color: var(--o4k-oq);
}
.deeqi.lt3bz:hover{
  background: var(--qi4-k2m); color:#fff; border-color: var(--qi4-k2m);
}

/* Mobile */
@media (max-width: 768px){
  .h7xk39{ bottom:16px; right:16px; }
  .h7xk39.vslrd{ left:16px; }
  .lu9tv{ --tpw-bq:60px; }
  .cfmv{
    position:fixed; bottom:0; right:0; left:0; width:100%; height:65vh; max-height:65vh;
    border-radius: var(--z44dn9-jblr) var(--z44dn9-jblr) 0 0; transform: translateY(100%);
  }
  .cfmv.yhe9f{ transform: translateY(0); }
  .b849vm{ padding:20px; }
  .kdwb{ padding:16px; padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

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

/* Focus Visible */
.h7xk39 :focus-visible{ outline:2px solid var(--qi4-k2m); outline-offset:2px; }

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