/* CSS Variables */
:root {
  --y2y5qk-rgmj: #4f46e5;
  --lpb-h6we: #ffffff;
  --q6q-hmqx: #f9fafb;
  --nvc6et-p93: #0f172a;
  --qgzivz-k8g: #6b7280;
  --l4z-zjdf: #e5e7eb;
  --c4nik-gyvt: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --g7b-an2: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --rgkgl8-o4sz: 16px;
  --tau-tk88: 56px;
  --z7kh-f8i: 12px;
  --h0h-on: 999999;
}

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

/* Main Container */
.kahf {
  position: fixed; bottom: 24px; right: 24px; z-index: var(--h0h-on);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--nvc6et-p93);
}
.kahf.ydz45o { right: auto; left: 24px; }

/* Floating Panel - Buttons */
.nj271 { display: flex; flex-direction: column-reverse; gap: var(--z7kh-f8i); align-items: center; }
.msmqq {
  width: var(--tau-tk88); height: var(--tau-tk88); min-width: var(--tau-tk88); min-height: var(--tau-tk88);
  border-radius: 50%; border: none; background: var(--y2y5qk-rgmj); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--c4nik-gyvt);
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: visible;
}
.msmqq:hover { transform: scale(1.05); box-shadow: var(--g7b-an2); }
.msmqq:active { transform: scale(0.95); }
.msmqq:focus { outline: 2px solid var(--y2y5qk-rgmj); outline-offset: 2px; }
.msmqq svg { width: 24px; height: 24px; fill: currentColor; }

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .msmqq.gceikf{ animation:none; }
  .msmqq,.jbrz,.m68jj5{ transition:none!important; animation:none!important; }
}

/* Chat Window (animate with visibility/pointer-events, not display) */
.jbrz{
  position: fixed; bottom: 96px; right: 24px; width: 360px; height: 480px;
  background: var(--lpb-h6we); border-radius: var(--rgkgl8-o4sz); box-shadow: var(--g7b-an2);
  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;
}
.kahf.ydz45o .jbrz{ right:auto; left:24px; }
.jbrz.osoe6{ opacity:1; transform:translateY(0) scale(1); visibility:visible; pointer-events:auto; }

/* Header */
.p5r3e{
  padding:16px 20px; background:var(--lpb-h6we); border-bottom:1px solid var(--l4z-zjdf);
  display:flex; align-items:center; gap:12px; min-height:64px;
}
.qcog{ width:10px; height:10px; border-radius:50%; background:var(--y2y5qk-rgmj); flex-shrink:0; }
.o0oh1{ flex:1; min-width:0; }
.k2uui{ font-size:16px; font-weight:600; color:var(--nvc6et-p93); margin:0 0 2px 0; }
.oo0p1z{ font-size:13px; color:var(--qgzivz-k8g); margin:0; }
.ln0a{
  width:32px; height:32px; min-width:32px; border:none; background:transparent; color:var(--qgzivz-k8g);
  cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, color .2s ease; flex-shrink:0;
}
.ln0a:hover{ background:var(--q6q-hmqx); color:var(--nvc6et-p93); }
.ln0a:focus{ outline:2px solid var(--y2y5qk-rgmj); outline-offset:2px; }
.ln0a svg{ width:20px; height:20px; }

/* Body */
.nwllk{
  flex:1; overflow-y:auto; padding:16px; background:var(--q6q-hmqx);
  display:flex; flex-direction:column; gap:12px;
}
.nwllk::-webkit-scrollbar{ width:6px; }
.nwllk::-webkit-scrollbar-track{ background:transparent; }
.nwllk::-webkit-scrollbar-thumb{ background:var(--l4z-zjdf); border-radius:3px; }
.nwllk::-webkit-scrollbar-thumb:hover{ background:var(--qgzivz-k8g); }

/* Messages */
.m68jj5{ display:flex; gap:8px; animation:slideIn .2s ease; }
@keyframes slideIn{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
.m68jj5.ipj83r{ flex-direction:row-reverse; }
.oss8e9{
  max-width:75%; padding:10px 14px; border-radius:12px; word-wrap:break-word; word-break:break-word;
}
.oss8e9 a{ color:inherit; }
.m68jj5.hctu4 .oss8e9{ background:var(--lpb-h6we); color:var(--nvc6et-p93); border-bottom-left-radius:4px; }
.m68jj5.ipj83r .oss8e9{ background:var(--y2y5qk-rgmj); color:#fff; border-bottom-right-radius:4px; }
.p0gt{ font-size:11px; color:var(--qgzivz-k8g); margin-top:4px; display:block; }

/* Typing Indicator */
.yepaxz{
  display:flex; gap:8px; padding:10px 14px; background:var(--lpb-h6we);
  border-radius:12px; border-bottom-left-radius:4px; max-width:fit-content;
}
.zljeow{ width:8px; height:8px; border-radius:50%; background:var(--qgzivz-k8g); animation:typingDot 1.4s infinite; }
.zljeow:nth-child(2){ animation-delay:.2s; }
.zljeow: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) */
.k2aq1e{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 0; padding:0 2px;
}
.ee9fd8{
  border:0; border-radius:999px; padding:8px 12px; background:var(--y2y5qk-rgmj); 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(--c4nik-gyvt);
}
.ee9fd8:is(:hover,:focus){ transform:translateY(-1px); }
a.ee9fd8{ text-decoration:none; display:inline-block; }
a.ee9fd8:link, a.ee9fd8:visited{ color:#fff; }
a.ee9fd8:hover, a.ee9fd8:focus{ color:#fff; }

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

/* Footer */
.xrfr{
  padding:16px; background:var(--lpb-h6we); border-top:1px solid var(--l4z-zjdf);
  display:flex; gap:12px; align-items:flex-end; position:relative;
}
.rcvh{
  flex:1; padding:10px 14px; border:1px solid var(--l4z-zjdf); border-radius:20px;
  font-family:inherit; font-size:14px; line-height:1.5; color:var(--nvc6et-p93);
  background:var(--q6q-hmqx); resize:none; max-height:96px; min-height:40px; outline:none; transition:border-color .2s ease;
}
.rcvh:focus{ border-color:var(--y2y5qk-rgmj); }
.rcvh::placeholder{ color:var(--qgzivz-k8g); }
.rcvh.liy43u{ border-color:#c00; }
.ujts7l{
  width:40px; height:40px; min-width:40px; border:none; background:var(--y2y5qk-rgmj); color:#fff;
  border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .2s ease, opacity .2s ease;
}
.ujts7l:disabled{ opacity:.5; cursor:not-allowed; }
.ujts7l:not(:disabled):hover{ transform:scale(1.05); }
.ujts7l:not(:disabled):active{ transform:scale(0.95); }
.ujts7l:focus{ outline:2px solid var(--y2y5qk-rgmj); outline-offset:2px; }
.ujts7l svg{ width:20px; height:20px; }

/* Character Counter */
.lznek9{ position:absolute; bottom:4px; right:52px; font-size:11px; color:var(--qgzivz-k8g); }
.lznek9.tbkh{ color:#c00; font-weight:600; }

/* ---- INLINE CTA BUTTONS ("buttons" payload) ---- */
/* Looks like an operator bubble with pill buttons inside */
.l8kh9r{
  align-self:flex-start;
  max-width:75%;
  background: var(--lpb-h6we);
  color: var(--nvc6et-p93);
  border-radius:12px; border-bottom-left-radius:4px;
  padding:10px 12px;
  box-shadow: var(--c4nik-gyvt);
}
.qjwp{ display:flex; flex-wrap:wrap; gap:8px; }

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

/* Optional outline variant */
.e2s541.vc54{
  background: transparent; color: var(--nvc6et-p93); border-color: var(--l4z-zjdf);
}
.e2s541.vc54:hover{
  background: var(--y2y5qk-rgmj); color:#fff; border-color: var(--y2y5qk-rgmj);
}

/* Mobile */
@media (max-width: 768px){
  .kahf{ bottom:16px; right:16px; }
  .kahf.ydz45o{ left:16px; }
  .msmqq{ --tau-tk88:60px; }
  .jbrz{
    position:fixed; bottom:0; right:0; left:0; width:100%; height:65vh; max-height:65vh;
    border-radius: var(--rgkgl8-o4sz) var(--rgkgl8-o4sz) 0 0; transform: translateY(100%);
  }
  .jbrz.osoe6{ transform: translateY(0); }
  .p5r3e{ padding:20px; }
  .xrfr{ padding:16px; padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

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

/* Focus Visible */
.kahf :focus-visible{ outline:2px solid var(--y2y5qk-rgmj); outline-offset:2px; }

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