.shakpb__sr{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

/* Floating button */
.shakpb-float{position:fixed;right:18px;bottom:18px;z-index:99999;font-family:inherit}
.shakpb-float__btn{position:relative;width:64px;height:64px;border-radius:999px;border:1px solid rgba(0,0,0,.10);background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 10px 28px rgba(0,0,0,.14);transform:translateZ(0)}
.shakpb-float__img{width:46px;height:46px;border-radius:999px;object-fit:cover}
.shakpb-float__pulse{position:absolute;inset:-6px;border-radius:999px;border:2px solid rgba(0,0,0,.10);opacity:0;pointer-events:none}
.shakpb-float__badge{position:absolute;top:6px;right:6px;width:10px;height:10px;border-radius:50%;background:#ff3b30;box-shadow:0 0 0 3px rgba(255,59,48,.18);opacity:0}

/* Default attention animations (stop after first open) */
.shakpb-float:not(.is-seen) .shakpb-float__btn{animation:shakpb-bounce 5.5s ease-in-out infinite}
.shakpb-float:not(.is-seen) .shakpb-float__pulse{animation:shakpb-pulse 2.4s ease-out infinite;opacity:1}
@keyframes shakpb-bounce{
  0%,80%,100%{transform:translateY(0)}
  84%{transform:translateY(-6px)}
  88%{transform:translateY(0)}
  92%{transform:translateY(-3px)}
  96%{transform:translateY(0)}
}
@keyframes shakpb-pulse{
  0%{transform:scale(.92);opacity:0}
  15%{opacity:.55}
  60%{transform:scale(1.08);opacity:0}
  100%{transform:scale(1.08);opacity:0}
}

/* On-entry nudge (stronger shake + badge + tooltip) */
.shakpb-float.is-nudge .shakpb-float__btn{animation:shakpb-shake .9s ease-in-out 2}
.shakpb-float.is-nudge .shakpb-float__pulse{animation:shakpb-pulse 1.3s ease-out infinite;opacity:1}
.shakpb-float.is-nudge .shakpb-float__badge{opacity:1;animation:shakpb-badge 1.2s ease-in-out infinite}
@keyframes shakpb-shake{
  0%,100%{transform:translateX(0)}
  15%{transform:translateX(-3px)}
  30%{transform:translateX(3px)}
  45%{transform:translateX(-2px)}
  60%{transform:translateX(2px)}
  75%{transform:translateX(-1px)}
  90%{transform:translateX(1px)}
}
@keyframes shakpb-badge{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.18)}
}

/* Nudge tooltip */
.shakpb-nudge{position:absolute;right:74px;bottom:10px;max-width:220px;background:#111;color:#fff;padding:10px 12px;border-radius:14px;font-size:13px;line-height:1.35;box-shadow:0 14px 34px rgba(0,0,0,.22);opacity:0;transform:translateY(6px);animation:shakpb-tip-in .22s ease forwards}
.shakpb-nudge:after{content:"";position:absolute;right:-6px;bottom:14px;width:12px;height:12px;background:#111;transform:rotate(45deg);border-radius:3px}
@keyframes shakpb-tip-in{to{opacity:1;transform:translateY(0)}}

/* Backdrop */
.shakpb-drawer__backdrop{position:fixed;inset:0;background:rgba(0,0,0,.28);opacity:0;pointer-events:none;transition:opacity .22s ease}
.shakpb-float.is-open .shakpb-drawer__backdrop{opacity:1;pointer-events:auto}

/* Drawer */
.shakpb-drawer{position:fixed;right:0;bottom:0;width:min(420px, 100vw);height:min(78vh, 720px);background:#fff;border-left:1px solid rgba(0,0,0,.10);border-top-left-radius:18px;box-shadow:-14px 0 40px rgba(0,0,0,.18);transform:translateX(102%);transition:transform .26s ease;display:flex;flex-direction:column;overflow:hidden}
.shakpb-float.is-open .shakpb-drawer{transform:translateX(0)}

/* Header */
.shakpb__header{padding:12px 14px;border-bottom:1px solid rgba(0,0,0,.08);display:flex;align-items:center;justify-content:space-between;gap:12px}
.shakpb__brand{display:flex;gap:10px;align-items:center}
.shakpb__brandimg{width:40px;height:40px;border-radius:999px;object-fit:cover;border:1px solid rgba(0,0,0,.08)}
.shakpb__brandtxt{display:flex;flex-direction:column;gap:2px}
.shakpb__title{font-weight:800;font-size:14.5px}
.shakpb__subtitle{opacity:.72;font-size:12.5px}

/* Actions */
.shakpb__actions{display:flex;gap:8px;align-items:center}
.shakpb__iconbtn{border:1px solid rgba(0,0,0,.12);background:#fff;border-radius:12px;width:38px;height:38px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;box-shadow:0 6px 16px rgba(0,0,0,.06)}
.shakpb__iconbtn:disabled{opacity:.6;cursor:not-allowed}

/* Chat */
.shakpb__chat{flex:1;overflow:auto;background:linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.03));padding:14px;display:flex;flex-direction:column;gap:10px}

/* Nicer Arabic font for assistant replies */
.shakpb__msg--assistant .shakpb__bubble{font-family:"Cairo","Tajawal",system-ui,-apple-system,"Segoe UI",Arial,sans-serif}

.shakpb__msg{display:flex}
.shakpb__msg--user{justify-content:flex-end}
.shakpb__msg--assistant{justify-content:flex-start}
.shakpb__bubble{max-width:82%;padding:10px 12px;border-radius:16px;white-space:pre-wrap;word-break:break-word;font-size:14px;line-height:1.45}
.shakpb__msg--user .shakpb__bubble{background:rgba(0,0,0,.10)}
.shakpb__msg--assistant .shakpb__bubble{background:#fff;border:1px solid rgba(0,0,0,.10);box-shadow:0 10px 22px rgba(0,0,0,.06)}

/* Typing dots */
.shakpb__bubble--typing{padding:10px 12px}
.shakpb__dots{display:inline-flex;gap:6px;align-items:center}
.shakpb__dot{width:7px;height:7px;border-radius:50%;background:rgba(0,0,0,.35);animation:shakpb-dot 1s infinite ease-in-out}
.shakpb__dot:nth-child(2){animation-delay:.15s}
.shakpb__dot:nth-child(3){animation-delay:.3s}
@keyframes shakpb-dot{
  0%,80%,100%{transform:translateY(0);opacity:.45}
  40%{transform:translateY(-4px);opacity:1}
}

/* Composer */
.shakpb__composer{display:flex;gap:10px;padding:12px 14px;border-top:1px solid rgba(0,0,0,.08);background:#fff}
.shakpb__input{flex:1;min-height:44px;border-radius:14px;border:1px solid rgba(0,0,0,.15);padding:10px 12px;resize:none}
.shakpb__send{border-radius:14px;border:1px solid rgba(0,0,0,.15);padding:10px 16px;background:#111;color:#fff;cursor:pointer}
.shakpb__send:disabled{opacity:.6;cursor:not-allowed}

/* Note */
.shakpb__note{margin:0;padding:10px 14px;opacity:.72;font-size:12.5px;background:#fff;border-top:1px solid rgba(0,0,0,.06)}

@media (max-width: 520px){
  .shakpb-float{right:12px;bottom:12px}
  .shakpb-drawer{height:82vh;border-top-left-radius:16px}
  .shakpb-float__btn{width:60px;height:60px}
  .shakpb-float__img{width:44px;height:44px}
  .shakpb-nudge{right:70px;max-width:200px}
}