/* CSS Variables */
:root {
  --y47b4v-ih8p: #4f46e5;
  --woeqy-w6jn: #ffffff;
  --ony1v-zv: #f9fafb;
  --tjbkhy-jdql: #0f172a;
  --bj0b3l-h4i5: #6b7280;
  --h26-y9: #e5e7eb;
  --t7f0z-wvy3: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ngfsov-c2s: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --xoh-b8x: 16px;
  --ixw-q9mz: 56px;
  --z0o-pr: 12px;
  --kob-un: 999999;
}

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

/* Main Container */
.xigy4 {
  position: fixed; bottom: 24px; right: 24px; z-index: var(--kob-un);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--tjbkhy-jdql);
}
.xigy4.y2mkj2 { right: auto; left: 24px; }

/* Floating Panel - Buttons */
.ebj6 { display: flex; flex-direction: column-reverse; gap: var(--z0o-pr); align-items: center; }
.u81k1 {
  width: var(--ixw-q9mz); height: var(--ixw-q9mz); min-width: var(--ixw-q9mz); min-height: var(--ixw-q9mz);
  border-radius: 50%; border: none; background: var(--y47b4v-ih8p); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--t7f0z-wvy3);
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: visible;
}
.u81k1:hover { transform: scale(1.05); box-shadow: var(--ngfsov-c2s); }
.u81k1:active { transform: scale(0.95); }
.u81k1:focus { outline: 2px solid var(--y47b4v-ih8p); outline-offset: 2px; }
.u81k1 svg { width: 24px; height: 24px; fill: currentColor; }

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .u81k1.twsf5{ animation:none; }
  .u81k1,.fyc704,.dx5sf{ transition:none!important; animation:none!important; }
}

/* Chat Window (animate with visibility/pointer-events, not display) */
.fyc704{
  position: fixed; bottom: 96px; right: 24px; width: 360px; height: 480px;
  background: var(--woeqy-w6jn); border-radius: var(--xoh-b8x); box-shadow: var(--ngfsov-c2s);
  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;
}
.xigy4.y2mkj2 .fyc704{ right:auto; left:24px; }
.fyc704.rhy0{ opacity:1; transform:translateY(0) scale(1); visibility:visible; pointer-events:auto; }

/* Header */
.qg9q3{
  padding:16px 20px; background:var(--woeqy-w6jn); border-bottom:1px solid var(--h26-y9);
  display:flex; align-items:center; gap:12px; min-height:64px;
}
.zzly{ width:10px; height:10px; border-radius:50%; background:var(--y47b4v-ih8p); flex-shrink:0; }
.ywmdn{ flex:1; min-width:0; }
.opmd7d{ font-size:16px; font-weight:600; color:var(--tjbkhy-jdql); margin:0 0 2px 0; }
.n8nc{ font-size:13px; color:var(--bj0b3l-h4i5); margin:0; }
.ccnd{
  width:32px; height:32px; min-width:32px; border:none; background:transparent; color:var(--bj0b3l-h4i5);
  cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, color .2s ease; flex-shrink:0;
}
.ccnd:hover{ background:var(--ony1v-zv); color:var(--tjbkhy-jdql); }
.ccnd:focus{ outline:2px solid var(--y47b4v-ih8p); outline-offset:2px; }
.ccnd svg{ width:20px; height:20px; }

/* Body */
.j7am{
  flex:1; overflow-y:auto; padding:16px; background:var(--ony1v-zv);
  display:flex; flex-direction:column; gap:12px;
}
.j7am::-webkit-scrollbar{ width:6px; }
.j7am::-webkit-scrollbar-track{ background:transparent; }
.j7am::-webkit-scrollbar-thumb{ background:var(--h26-y9); border-radius:3px; }
.j7am::-webkit-scrollbar-thumb:hover{ background:var(--bj0b3l-h4i5); }

/* Messages */
.dx5sf{ display:flex; gap:8px; animation:slideIn .2s ease; }
@keyframes slideIn{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
.dx5sf.m89s{ flex-direction:row-reverse; }
.lfriz{
  max-width:75%; padding:10px 14px; border-radius:12px; word-wrap:break-word; word-break:break-word;
}
.lfriz a{ color:inherit; }
.dx5sf.xr17 .lfriz{ background:var(--woeqy-w6jn); color:var(--tjbkhy-jdql); border-bottom-left-radius:4px; }
.dx5sf.m89s .lfriz{ background:var(--y47b4v-ih8p); color:#fff; border-bottom-right-radius:4px; }
.l94kil{ font-size:11px; color:var(--bj0b3l-h4i5); margin-top:4px; display:block; }

/* Typing Indicator */
.odqoah{
  display:flex; gap:8px; padding:10px 14px; background:var(--woeqy-w6jn);
  border-radius:12px; border-bottom-left-radius:4px; max-width:fit-content;
}
.gefeby{ width:8px; height:8px; border-radius:50%; background:var(--bj0b3l-h4i5); animation:typingDot 1.4s infinite; }
.gefeby:nth-child(2){ animation-delay:.2s; }
.gefeby: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) */
.wc2kv{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 0; padding:0 2px;
}
.qrb7{
  border:0; border-radius:999px; padding:8px 12px; background:var(--y47b4v-ih8p); 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(--t7f0z-wvy3);
}
.qrb7:is(:hover,:focus){ transform:translateY(-1px); }
a.qrb7{ text-decoration:none; display:inline-block; }
a.qrb7:link, a.qrb7:visited{ color:#fff; }
a.qrb7:hover, a.qrb7:focus{ color:#fff; }

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

/* Footer */
.o9fsyh{
  padding:16px; background:var(--woeqy-w6jn); border-top:1px solid var(--h26-y9);
  display:flex; gap:12px; align-items:flex-end; position:relative;
}
.yng0x{
  flex:1; padding:10px 14px; border:1px solid var(--h26-y9); border-radius:20px;
  font-family:inherit; font-size:14px; line-height:1.5; color:var(--tjbkhy-jdql);
  background:var(--ony1v-zv); resize:none; max-height:96px; min-height:40px; outline:none; transition:border-color .2s ease;
}
.yng0x:focus{ border-color:var(--y47b4v-ih8p); }
.yng0x::placeholder{ color:var(--bj0b3l-h4i5); }
.yng0x.ntjfhj{ border-color:#c00; }
.vvjjy{
  width:40px; height:40px; min-width:40px; border:none; background:var(--y47b4v-ih8p); color:#fff;
  border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .2s ease, opacity .2s ease;
}
.vvjjy:disabled{ opacity:.5; cursor:not-allowed; }
.vvjjy:not(:disabled):hover{ transform:scale(1.05); }
.vvjjy:not(:disabled):active{ transform:scale(0.95); }
.vvjjy:focus{ outline:2px solid var(--y47b4v-ih8p); outline-offset:2px; }
.vvjjy svg{ width:20px; height:20px; }

/* Character Counter */
.so2a8{ position:absolute; bottom:4px; right:52px; font-size:11px; color:var(--bj0b3l-h4i5); }
.so2a8.f2gy{ color:#c00; font-weight:600; }

/* ---- INLINE CTA BUTTONS ("buttons" payload) ---- */
/* Looks like an operator bubble with pill buttons inside */
.mhcc4z{
  align-self:flex-start;
  max-width:75%;
  background: var(--woeqy-w6jn);
  color: var(--tjbkhy-jdql);
  border-radius:12px; border-bottom-left-radius:4px;
  padding:10px 12px;
  box-shadow: var(--t7f0z-wvy3);
}
.tgnec{ display:flex; flex-wrap:wrap; gap:8px; }

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

/* Optional outline variant */
.tjajd.u02lx{
  background: transparent; color: var(--tjbkhy-jdql); border-color: var(--h26-y9);
}
.tjajd.u02lx:hover{
  background: var(--y47b4v-ih8p); color:#fff; border-color: var(--y47b4v-ih8p);
}

/* Mobile */
@media (max-width: 768px){
  .xigy4{ bottom:16px; right:16px; }
  .xigy4.y2mkj2{ left:16px; }
  .u81k1{ --ixw-q9mz:60px; }
  .fyc704{
    position:fixed; bottom:0; right:0; left:0; width:100%; height:65vh; max-height:65vh;
    border-radius: var(--xoh-b8x) var(--xoh-b8x) 0 0; transform: translateY(100%);
  }
  .fyc704.rhy0{ transform: translateY(0); }
  .qg9q3{ padding:20px; }
  .o9fsyh{ padding:16px; padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

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

/* Focus Visible */
.xigy4 :focus-visible{ outline:2px solid var(--y47b4v-ih8p); outline-offset:2px; }

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