/* CSS Variables */
:root {
  --x8h61o-udm: #4f46e5;
  --asl25r-wp: #ffffff;
  --t8h-ls: #f9fafb;
  --zmc1y-k6: #0f172a;
  --msq-md: #6b7280;
  --h0w-pmav: #e5e7eb;
  --vk6dv-ur3x: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --yqc-wo: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --z0c9-rksq: 16px;
  --ssm-ydm: 56px;
  --yazz-akr: 12px;
  --cpo3-izt: 999999;
}

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

/* Main Container */
.hj5mq5 {
  position: fixed; bottom: 24px; right: 24px; z-index: var(--cpo3-izt);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--zmc1y-k6);
}
.hj5mq5.nn2bc9 { right: auto; left: 24px; }

/* Floating Panel - Buttons */
.n541 { display: flex; flex-direction: column-reverse; gap: var(--yazz-akr); align-items: center; }
.x8jes {
  width: var(--ssm-ydm); height: var(--ssm-ydm); min-width: var(--ssm-ydm); min-height: var(--ssm-ydm);
  border-radius: 50%; border: none; background: var(--x8h61o-udm); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--vk6dv-ur3x);
  transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: visible;
}
.x8jes:hover { transform: scale(1.05); box-shadow: var(--yqc-wo); }
.x8jes:active { transform: scale(0.95); }
.x8jes:focus { outline: 2px solid var(--x8h61o-udm); outline-offset: 2px; }
.x8jes svg { width: 24px; height: 24px; fill: currentColor; }

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .x8jes.mdbk{ animation:none; }
  .x8jes,.ldb088,.knhy{ transition:none!important; animation:none!important; }
}

/* Chat Window (animate with visibility/pointer-events, not display) */
.ldb088{
  position: fixed; bottom: 96px; right: 24px; width: 360px; height: 480px;
  background: var(--asl25r-wp); border-radius: var(--z0c9-rksq); box-shadow: var(--yqc-wo);
  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;
}
.hj5mq5.nn2bc9 .ldb088{ right:auto; left:24px; }
.ldb088.she3o{ opacity:1; transform:translateY(0) scale(1); visibility:visible; pointer-events:auto; }

/* Header */
.ijbfzw{
  padding:16px 20px; background:var(--asl25r-wp); border-bottom:1px solid var(--h0w-pmav);
  display:flex; align-items:center; gap:12px; min-height:64px;
}
.zkjn2y{ width:10px; height:10px; border-radius:50%; background:var(--x8h61o-udm); flex-shrink:0; }
.mpd9e{ flex:1; min-width:0; }
.ddrx9{ font-size:16px; font-weight:600; color:var(--zmc1y-k6); margin:0 0 2px 0; }
.h956a3{ font-size:13px; color:var(--msq-md); margin:0; }
.ctpc3{
  width:32px; height:32px; min-width:32px; border:none; background:transparent; color:var(--msq-md);
  cursor:pointer; border-radius:8px; display:flex; align-items:center; justify-content:center;
  transition: background .2s ease, color .2s ease; flex-shrink:0;
}
.ctpc3:hover{ background:var(--t8h-ls); color:var(--zmc1y-k6); }
.ctpc3:focus{ outline:2px solid var(--x8h61o-udm); outline-offset:2px; }
.ctpc3 svg{ width:20px; height:20px; }

/* Body */
.z0i7u{
  flex:1; overflow-y:auto; padding:16px; background:var(--t8h-ls);
  display:flex; flex-direction:column; gap:12px;
}
.z0i7u::-webkit-scrollbar{ width:6px; }
.z0i7u::-webkit-scrollbar-track{ background:transparent; }
.z0i7u::-webkit-scrollbar-thumb{ background:var(--h0w-pmav); border-radius:3px; }
.z0i7u::-webkit-scrollbar-thumb:hover{ background:var(--msq-md); }

/* Messages */
.knhy{ display:flex; gap:8px; animation:slideIn .2s ease; }
@keyframes slideIn{ from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }
.knhy.tymd{ flex-direction:row-reverse; }
.n0l2l{
  max-width:75%; padding:10px 14px; border-radius:12px; word-wrap:break-word; word-break:break-word;
}
.n0l2l a{ color:inherit; }
.knhy.cpr1 .n0l2l{ background:var(--asl25r-wp); color:var(--zmc1y-k6); border-bottom-left-radius:4px; }
.knhy.tymd .n0l2l{ background:var(--x8h61o-udm); color:#fff; border-bottom-right-radius:4px; }
.ss8si{ font-size:11px; color:var(--msq-md); margin-top:4px; display:block; }

/* Typing Indicator */
.ueog{
  display:flex; gap:8px; padding:10px 14px; background:var(--asl25r-wp);
  border-radius:12px; border-bottom-left-radius:4px; max-width:fit-content;
}
.wgi8{ width:8px; height:8px; border-radius:50%; background:var(--msq-md); animation:typingDot 1.4s infinite; }
.wgi8:nth-child(2){ animation-delay:.2s; }
.wgi8: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) */
.vmvpq{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 0; padding:0 2px;
}
.mg1lv{
  border:0; border-radius:999px; padding:8px 12px; background:var(--x8h61o-udm); 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(--vk6dv-ur3x);
}
.mg1lv:is(:hover,:focus){ transform:translateY(-1px); }
a.mg1lv{ text-decoration:none; display:inline-block; }
a.mg1lv:link, a.mg1lv:visited{ color:#fff; }
a.mg1lv:hover, a.mg1lv:focus{ color:#fff; }

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

/* Footer */
.ngh5{
  padding:16px; background:var(--asl25r-wp); border-top:1px solid var(--h0w-pmav);
  display:flex; gap:12px; align-items:flex-end; position:relative;
}
.fza8cq{
  flex:1; padding:10px 14px; border:1px solid var(--h0w-pmav); border-radius:20px;
  font-family:inherit; font-size:14px; line-height:1.5; color:var(--zmc1y-k6);
  background:var(--t8h-ls); resize:none; max-height:96px; min-height:40px; outline:none; transition:border-color .2s ease;
}
.fza8cq:focus{ border-color:var(--x8h61o-udm); }
.fza8cq::placeholder{ color:var(--msq-md); }
.fza8cq.dz442y{ border-color:#c00; }
.tz5bg{
  width:40px; height:40px; min-width:40px; border:none; background:var(--x8h61o-udm); color:#fff;
  border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .2s ease, opacity .2s ease;
}
.tz5bg:disabled{ opacity:.5; cursor:not-allowed; }
.tz5bg:not(:disabled):hover{ transform:scale(1.05); }
.tz5bg:not(:disabled):active{ transform:scale(0.95); }
.tz5bg:focus{ outline:2px solid var(--x8h61o-udm); outline-offset:2px; }
.tz5bg svg{ width:20px; height:20px; }

/* Character Counter */
.zlli{ position:absolute; bottom:4px; right:52px; font-size:11px; color:var(--msq-md); }
.zlli.agnf{ color:#c00; font-weight:600; }

/* ---- INLINE CTA BUTTONS ("buttons" payload) ---- */
/* Looks like an operator bubble with pill buttons inside */
.bhk2ua{
  align-self:flex-start;
  max-width:75%;
  background: var(--asl25r-wp);
  color: var(--zmc1y-k6);
  border-radius:12px; border-bottom-left-radius:4px;
  padding:10px 12px;
  box-shadow: var(--vk6dv-ur3x);
}
.ceg8{ display:flex; flex-wrap:wrap; gap:8px; }

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

/* Optional outline variant */
.f0lv.v4xazw{
  background: transparent; color: var(--zmc1y-k6); border-color: var(--h0w-pmav);
}
.f0lv.v4xazw:hover{
  background: var(--x8h61o-udm); color:#fff; border-color: var(--x8h61o-udm);
}

/* Mobile */
@media (max-width: 768px){
  .hj5mq5{ bottom:16px; right:16px; }
  .hj5mq5.nn2bc9{ left:16px; }
  .x8jes{ --ssm-ydm:60px; }
  .ldb088{
    position:fixed; bottom:0; right:0; left:0; width:100%; height:65vh; max-height:65vh;
    border-radius: var(--z0c9-rksq) var(--z0c9-rksq) 0 0; transform: translateY(100%);
  }
  .ldb088.she3o{ transform: translateY(0); }
  .ijbfzw{ padding:20px; }
  .ngh5{ padding:16px; padding-bottom:max(16px, env(safe-area-inset-bottom)); }
}

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

/* Focus Visible */
.hj5mq5 :focus-visible{ outline:2px solid var(--x8h61o-udm); outline-offset:2px; }

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