/* Rooted Being chatbot: floating button + chat window (site colours: orange / espresso / cream) */
.rbc,.rbc *{box-sizing:border-box}
.rbc-fab{position:fixed;right:20px;bottom:20px;z-index:70;width:58px;height:58px;border:0;border-radius:50%;cursor:pointer;color:#fff;background:linear-gradient(135deg,#f28a1e,#d96d08);display:grid;place-items:center;box-shadow:0 14px 28px -10px rgba(217,109,8,.85);transition:transform .3s cubic-bezier(.2,.8,.2,1),box-shadow .3s}
.rbc-fab:hover{transform:scale(1.08);animation:none}
.rbc-fab{animation:rbcShake 5s ease-in-out 2s infinite}
.rbc-fab.on{animation:none}
.rbc-fab .ring{position:absolute;inset:0;border-radius:50%;border:2px solid #f28a1e;opacity:0;animation:rbcRing 2.6s ease-out infinite;pointer-events:none}
.rbc-fab.on .ring{display:none}
.rbc-fab svg circle{fill:currentColor;stroke:currentColor;stroke-width:1.6}
.rbc-fab svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;grid-area:1/1;transition:transform .3s,opacity .25s}
.rbc-fab .x{opacity:0;transform:rotate(-90deg) scale(.6)}
.rbc-fab.on .x{opacity:1;transform:none}
.rbc-fab.on .c{opacity:0;transform:rotate(90deg) scale(.6)}
.rbc-fab .dot{position:absolute;top:2px;right:2px;width:14px;height:14px;border-radius:50%;background:#2fbf71;border:2px solid #fff}
.rbc-fab.on .dot,.rbc-fab.seen .dot{display:none}

.rbc{position:fixed;right:20px;bottom:92px;z-index:71;width:385px;height:min(620px,calc(100vh - 120px));height:min(620px,calc(100dvh - 120px));display:flex;flex-direction:column;background:#fffaf3;border-radius:22px;overflow:hidden;font-family:'Inter',system-ui,-apple-system,'Segoe UI','Noto Sans Devanagari',sans-serif;color:#1f1b18;text-align:left;box-shadow:0 30px 70px -20px rgba(60,30,0,.55),0 0 0 1px rgba(240,227,210,.9);opacity:0;visibility:hidden;transform:translateY(16px) scale(.97);transform-origin:100% 100%;transition:opacity .28s,transform .35s cubic-bezier(.2,.8,.2,1),visibility .28s}
.rbc.on{opacity:1;visibility:visible;transform:none}
.rbc-h{display:flex;align-items:center;gap:12px;padding:16px 18px;color:#fff;background:linear-gradient(135deg,#f28a1e,#d96d08)}
.rbc-av{flex:none;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.2);display:grid;place-items:center;overflow:hidden}
.rbc-av img{width:30px;height:auto}
.rbc-ht{flex:1;min-width:0;line-height:1.25}
.rbc-ht b{display:block;font-size:1.02rem;font-weight:600}
.rbc-ht span{display:flex;align-items:center;gap:6px;font-size:.78rem;opacity:.92}
.rbc-ht span:before{content:"";width:8px;height:8px;border-radius:50%;background:#7dffb3;box-shadow:0 0 0 3px rgba(125,255,179,.25)}
.rbc-x{flex:none;width:34px;height:34px;border:0;border-radius:50%;cursor:pointer;color:#fff;background:rgba(255,255,255,.2);display:grid;place-items:center;transition:background .2s}
.rbc-x:hover{background:rgba(255,255,255,.34)}
.rbc-x svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}

.rbc-b{flex:1;overflow-y:auto;padding:18px 16px 8px;display:flex;flex-direction:column;gap:6px;scroll-behavior:smooth;overscroll-behavior:contain}
.rbc-b::-webkit-scrollbar{width:6px}.rbc-b::-webkit-scrollbar-thumb{background:#ecd9c0;border-radius:6px}
.rbc-m{max-width:84%;padding:11px 15px;border-radius:18px;font-size:.93rem;line-height:1.5;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;animation:rbcIn .3s cubic-bezier(.2,.8,.2,1) both}
.rbc-m.bot{align-self:flex-start;background:#fff;border:1px solid #f0e3d2;border-bottom-left-radius:6px;box-shadow:0 8px 16px -14px rgba(120,60,0,.5)}
.rbc-m.me{align-self:flex-end;color:#fff;background:linear-gradient(135deg,#f28a1e,#d96d08);border-bottom-right-radius:6px}
.rbc-t{align-self:flex-start;font-size:.7rem;color:#a39485;margin:0 6px 8px}
.rbc-t.me{align-self:flex-end}
.rbc-q{align-self:flex-start;display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 10px;max-width:96%}
.rbc-q button,.rbc-q a{font-family:inherit;font-weight:600;font-size:.86rem;line-height:1.2;color:#d96d08;background:#fff;border:1.5px solid #f28a1e;border-radius:99px;padding:9px 15px;cursor:pointer;text-decoration:none;transition:background .2s,color .2s,transform .2s;text-align:left}
.rbc-q button:hover,.rbc-q a:hover{background:#f28a1e;color:#fff;transform:translateY(-1px)}
.rbc-q .pri{background:#f28a1e;color:#fff}.rbc-q .pri:hover{background:#d96d08}
.rbc-typing{align-self:flex-start;display:flex;gap:4px;padding:13px 16px;background:#fff;border:1px solid #f0e3d2;border-radius:18px;border-bottom-left-radius:6px;margin-bottom:8px}
.rbc-typing i{width:7px;height:7px;border-radius:50%;background:#f28a1e;opacity:.4;animation:rbcDot 1.1s infinite}
.rbc-typing i:nth-child(2){animation-delay:.18s}.rbc-typing i:nth-child(3){animation-delay:.36s}

.rbc-f{display:flex;align-items:center;gap:10px;padding:12px 14px 6px;background:#fffaf3}
.rbc-f input{flex:1;min-width:0;font:inherit;font-size:.93rem;color:#1f1b18;background:#fff;border:1.5px solid #f28a1e;border-radius:99px;padding:12px 18px;outline:0;transition:box-shadow .2s}
.rbc-f input:focus{box-shadow:0 0 0 4px rgba(242,138,30,.18)}
.rbc-f input::placeholder{color:#a39485}
.rbc-f button{flex:none;width:46px;height:46px;border:0;border-radius:50%;cursor:pointer;color:#fff;background:linear-gradient(135deg,#f28a1e,#d96d08);display:grid;place-items:center;box-shadow:0 10px 18px -10px rgba(217,109,8,.9);transition:transform .2s}
.rbc-f button:hover{transform:scale(1.07)}
.rbc-f button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.rbc-ft{text-align:center;font-size:.72rem;color:#a39485;padding:2px 12px 12px}

@keyframes rbcShake{0%,78%,100%{transform:none}80%{transform:rotate(-14deg) scale(1.06)}84%{transform:rotate(12deg) scale(1.06)}88%{transform:rotate(-9deg)}92%{transform:rotate(6deg)}96%{transform:rotate(-3deg)}}
@keyframes rbcRing{0%{transform:scale(1);opacity:.55}100%{transform:scale(1.65);opacity:0}}
@keyframes rbcIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes rbcDot{0%,60%,100%{transform:none;opacity:.4}30%{transform:translateY(-4px);opacity:1}}

/* ---------- all screen sizes ---------- */
.rbc-q{max-width:100%}
.rbc-q button,.rbc-q a{max-width:100%}
.rbc-m{-webkit-text-size-adjust:100%}
/* big screens: slightly larger window */
@media(min-width:1600px){.rbc{width:410px}}
/* tablets and small laptops: floating window, never taller than the screen */
@media(max-width:900px){.rbc{max-height:calc(100vh - 110px);max-height:calc(100dvh - 110px)}}
/* shop page has a sticky buy bar on small screens: lift the button above it */
@media(max-width:960px){body.sb .rbc-fab{bottom:calc(84px + env(safe-area-inset-bottom))}body.sb .rbc{bottom:calc(156px + env(safe-area-inset-bottom))}}
/* phones (and phones turned sideways): the chat opens full screen like a messaging app */
@media(max-width:520px),(max-height:520px) and (max-width:950px){
  .rbc-fab{right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));width:54px;height:54px}
  body.sb .rbc-fab{bottom:calc(84px + env(safe-area-inset-bottom))}
  .rbc{top:var(--rbc-t,0px);left:0;right:0;bottom:auto;width:100%;height:100vh;height:var(--rbc-h,100dvh);max-height:none;border-radius:0;box-shadow:none;transform:translateY(28px)}
  body.sb .rbc{bottom:auto}
  .rbc.on{transform:none}
  .rbc-fab.on{opacity:0;visibility:hidden;pointer-events:none}
  .rbc-h{padding:calc(12px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left))}
  .rbc-x{width:40px;height:40px}
  .rbc-b{padding:14px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left))}
  .rbc-m{max-width:88%;font-size:.95rem}
  .rbc-f{padding:10px max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left))}
  .rbc-f input{font-size:16px;padding:13px 18px}   /* 16px stops iPhones zooming into the box */
  .rbc-ft{padding:2px 12px calc(8px + env(safe-area-inset-bottom))}
}
/* very short screens (phone sideways): tighter header and footer */
@media(max-height:520px){.rbc-av{width:34px;height:34px}.rbc-h{padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:8px}.rbc-ft{display:none}.rbc-f button{width:42px;height:42px}}
/* small phones */
@media(max-width:360px){.rbc-q button,.rbc-q a{font-size:.8rem;padding:8px 12px}.rbc-ht b{font-size:.95rem}}
body.rbc-lock{overflow:hidden;touch-action:none}
body.rbc-lock .rbc{touch-action:auto}
@media(prefers-reduced-motion:reduce){.rbc,.rbc-fab,.rbc-m,.rbc-typing i{animation:none!important;transition:none!important}}
