/* TTX Store Chatbot — WhatsApp-style */
#ttxcb{--ttxcb-head:#075E54;--ttxcb-btn:#25D366;--ttxcb-off:20px;position:fixed!important;bottom:var(--ttxcb-off);right:20px;z-index:2147483000!important;isolation:isolate;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.45;color:#111b21;-webkit-font-smoothing:antialiased;}
#ttxcb.ttxcb--left{right:auto;left:20px;}
#ttxcb *,#ttxcb *::before,#ttxcb *::after{box-sizing:border-box;}

/* theme-proof resets */
#ttxcb button,#ttxcb input,#ttxcb a{font-family:inherit!important;letter-spacing:normal!important;text-transform:none!important;text-shadow:none!important;min-height:0!important;margin:0;}
#ttxcb button{background:none;border:0;padding:0;box-shadow:none;cursor:pointer;color:inherit;line-height:1.2;width:auto;}
#ttxcb svg{display:block;}

/* launcher */
#ttxcb .ttxcb-fab{position:relative;width:60px!important;height:60px!important;border-radius:50%!important;background:var(--ttxcb-btn)!important;color:#fff!important;display:flex!important;align-items:center;justify-content:center;box-shadow:0 8px 24px rgba(0,0,0,.22),0 2px 6px rgba(0,0,0,.12)!important;transition:transform .2s ease,box-shadow .2s ease;padding:0!important;border:0!important;}
#ttxcb .ttxcb-fab:hover{transform:scale(1.06);}
#ttxcb .ttxcb-fab:focus-visible{outline:3px solid rgba(37,211,102,.45);outline-offset:3px;}
#ttxcb .ttxcb-fab svg{width:32px;height:32px;}
#ttxcb .ttxcb-fab::before{content:"";position:absolute;inset:0;border-radius:50%;background:var(--ttxcb-btn);opacity:.45;animation:ttxcbPulse 2.4s ease-out infinite;z-index:-1;}
#ttxcb.is-open .ttxcb-fab::before{animation:none;opacity:0;}
@keyframes ttxcbPulse{0%{transform:scale(1);opacity:.45}80%,100%{transform:scale(1.55);opacity:0}}
#ttxcb .ttxcb-badge{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#ff3b30;color:#fff;font-size:11px;font-weight:700;line-height:20px;text-align:center;border:2px solid #fff;}
#ttxcb.ttxcb--left .ttxcb-badge{right:auto;left:-2px;}

/* hint bubble */
#ttxcb .ttxcb-tip{position:absolute;bottom:72px;right:0;width:max-content;max-width:min(260px,calc(100vw - 40px));background:#fff;color:#111b21;padding:10px 32px 10px 14px;border-radius:14px 14px 4px 14px;box-shadow:0 8px 28px rgba(0,0,0,.16);font-size:13.5px;font-weight:500;cursor:pointer;opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .3s ease,transform .3s ease;}
#ttxcb.ttxcb--left .ttxcb-tip{right:auto;left:0;border-radius:14px 14px 14px 4px;}
#ttxcb .ttxcb-tip.is-show{opacity:1;transform:none;pointer-events:auto;}
#ttxcb .ttxcb-tip__x{position:absolute;top:6px;right:8px;width:20px;height:20px;border-radius:50%;font-size:16px;line-height:18px;color:#667781;text-align:center;}
#ttxcb .ttxcb-tip__x:hover{background:#f0f2f5;}

/* panel */
#ttxcb .ttxcb-panel{position:absolute;bottom:76px;right:0;width:370px;height:min(600px,calc(100vh - 110px));max-height:calc(100dvh - 110px);display:flex;flex-direction:column;background:#efeae2;border-radius:18px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.25),0 4px 12px rgba(0,0,0,.1);opacity:0;visibility:hidden;transform:translateY(16px) scale(.98);transform-origin:bottom right;transition:opacity .22s ease,transform .22s ease,visibility 0s linear .22s;}
#ttxcb.ttxcb--left .ttxcb-panel{right:auto;left:0;transform-origin:bottom left;}
#ttxcb.is-open .ttxcb-panel{opacity:1;visibility:visible;transform:none;transition:opacity .22s ease,transform .22s ease,visibility 0s;}

#ttxcb .ttxcb-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:var(--ttxcb-head);color:#fff;flex:0 0 auto;}
#ttxcb .ttxcb-av{width:42px;height:42px;border-radius:50%;background:#fff;flex:0 0 42px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
#ttxcb .ttxcb-av img{width:100%;height:100%;object-fit:contain;padding:4px;}
#ttxcb .ttxcb-av--txt{font-size:19px;font-weight:700;color:var(--ttxcb-head);}
#ttxcb .ttxcb-who{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;}
#ttxcb .ttxcb-who b{font-size:15.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff;}
#ttxcb .ttxcb-status{font-size:12px;opacity:.85;display:flex;align-items:center;gap:6px;}
#ttxcb .ttxcb-status i{width:7px;height:7px;border-radius:50%;background:#7CFC9A;box-shadow:0 0 0 2px rgba(124,252,154,.25);}
#ttxcb .ttxcb-close{width:34px!important;height:34px!important;border-radius:50%!important;display:flex!important;align-items:center;justify-content:center;color:#fff!important;flex:0 0 34px;}
#ttxcb .ttxcb-close:hover{background:rgba(255,255,255,.14)!important;}
#ttxcb .ttxcb-close svg{width:18px;height:18px;}

/* messages */
#ttxcb .ttxcb-body{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:14px 12px 8px;background-color:#efeae2;background-image:radial-gradient(rgba(0,0,0,.035) 1px,transparent 1.2px),radial-gradient(rgba(0,0,0,.025) 1px,transparent 1.2px);background-size:22px 22px,22px 22px;background-position:0 0,11px 11px;overscroll-behavior:contain;scrollbar-width:thin;}
#ttxcb .ttxcb-row{display:flex;margin:0 0 6px;}
#ttxcb .ttxcb-row--me{justify-content:flex-end;}
#ttxcb .ttxcb-msg{position:relative;max-width:86%;padding:7px 9px 5px 10px;border-radius:10px;background:#fff;box-shadow:0 1px .5px rgba(11,20,26,.13);word-wrap:break-word;overflow-wrap:anywhere;animation:ttxcbIn .18s ease-out;}
#ttxcb .ttxcb-row--bot .ttxcb-msg{border-top-left-radius:0;}
#ttxcb .ttxcb-row--me .ttxcb-msg{background:#d9fdd3;border-top-right-radius:0;}
#ttxcb .ttxcb-row--bot .ttxcb-msg::before,#ttxcb .ttxcb-row--me .ttxcb-msg::before{content:"";position:absolute;top:0;width:8px;height:13px;}
#ttxcb .ttxcb-row--bot .ttxcb-msg::before{left:-8px;background:linear-gradient(to bottom left,#fff 50%,transparent 50%);}
#ttxcb .ttxcb-row--me .ttxcb-msg::before{right:-8px;background:linear-gradient(to bottom right,#d9fdd3 50%,transparent 50%);}
@keyframes ttxcbIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
#ttxcb .ttxcb-txt{white-space:pre-line;font-size:14px;color:#111b21;}
#ttxcb .ttxcb-txt a{color:#027eb5;text-decoration:underline;}
#ttxcb .ttxcb-time{display:block;text-align:right;font-size:10.5px;color:#667781;margin-top:2px;line-height:1;}
#ttxcb .ttxcb-ticks{color:#53bdeb;letter-spacing:-2px;}

#ttxcb .ttxcb-typing .ttxcb-msg{display:flex;gap:4px;padding:12px 14px;}
#ttxcb .ttxcb-typing i{width:7px;height:7px;border-radius:50%;background:#9aa5ab;animation:ttxcbDot 1.1s infinite ease-in-out;}
#ttxcb .ttxcb-typing i:nth-child(2){animation-delay:.15s;}
#ttxcb .ttxcb-typing i:nth-child(3){animation-delay:.3s;}
@keyframes ttxcbDot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* buttons inside messages */
#ttxcb .ttxcb-btns{display:flex;flex-direction:column;gap:6px;margin:8px 0 2px;}
#ttxcb .ttxcb-btn{display:flex!important;align-items:center;justify-content:center;gap:6px;width:100%!important;padding:9px 12px!important;border-radius:8px!important;background:#f0f2f5!important;color:#008069!important;font-size:13.5px!important;font-weight:600!important;text-decoration:none!important;text-align:center;border:0!important;box-shadow:none!important;transition:background .15s ease;}
#ttxcb .ttxcb-btn:hover{background:#e3e7ea!important;}
#ttxcb .ttxcb-btn--wa{background:var(--ttxcb-btn)!important;color:#fff!important;}
#ttxcb .ttxcb-btn--wa:hover{filter:brightness(.95);}

/* product cards */
#ttxcb .ttxcb-prods{display:flex;flex-direction:column;gap:6px;margin:8px 0 2px;}
#ttxcb .ttxcb-prod{display:flex!important;align-items:center;gap:10px;padding:6px!important;border-radius:9px;background:#f7f8fa;text-decoration:none!important;color:#111b21!important;border:1px solid #e9edef;transition:border-color .15s ease,background .15s ease;}
#ttxcb .ttxcb-prod:hover{border-color:var(--ttxcb-btn);background:#fff;}
#ttxcb .ttxcb-prod img,#ttxcb .ttxcb-prod__ph{width:54px;height:54px;flex:0 0 54px;border-radius:7px;object-fit:cover;background:#e9edef;}
#ttxcb .ttxcb-prod__info{display:flex;flex-direction:column;min-width:0;gap:2px;}
#ttxcb .ttxcb-prod__info b{font-size:13px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#111b21;}
#ttxcb .ttxcb-prod__price{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;font-size:13px;}
#ttxcb .ttxcb-prod__price ins{text-decoration:none!important;font-weight:700;color:#008069;background:none;}
#ttxcb .ttxcb-prod__price del{color:#8696a0;font-size:12px;text-decoration:line-through!important;}
#ttxcb .ttxcb-prod__out{font-style:normal;font-size:11px;color:#d93025;font-weight:600;}

/* quick chips */
#ttxcb .ttxcb-chips{display:flex;gap:6px;padding:8px 10px;overflow-x:auto;flex:0 0 auto;background:#efeae2;scrollbar-width:none;border-top:1px solid rgba(0,0,0,.04);}
#ttxcb .ttxcb-chips::-webkit-scrollbar{display:none;}
#ttxcb .ttxcb-chip{flex:0 0 auto;padding:7px 12px!important;border-radius:16px!important;background:#fff!important;color:#008069!important;font-size:12.5px!important;font-weight:600!important;border:1px solid #d1e7dd!important;white-space:nowrap;box-shadow:0 1px .5px rgba(11,20,26,.08)!important;}
#ttxcb .ttxcb-chip:hover{background:#f0fdf4!important;}

/* composer */
#ttxcb .ttxcb-form{display:flex;align-items:center;gap:8px;padding:8px 10px 10px;background:#f0f2f5;flex:0 0 auto;}
#ttxcb .ttxcb-input{flex:1 1 0;width:0!important;min-width:0;height:42px!important;padding:0 16px!important;border-radius:21px!important;border:0!important;background:#fff!important;color:#111b21!important;font-size:15px!important;outline:none!important;box-shadow:none!important;}
#ttxcb .ttxcb-input::placeholder{color:#8696a0;}
#ttxcb .ttxcb-send{width:42px!important;height:42px!important;flex:0 0 42px;border-radius:50%!important;background:var(--ttxcb-head)!important;color:#fff!important;display:flex!important;align-items:center;justify-content:center;}
#ttxcb .ttxcb-send svg{width:20px;height:20px;margin-left:2px;}
#ttxcb .ttxcb-foot{flex:0 0 auto;background:#f0f2f5;text-align:center;padding:0 10px 9px;}
#ttxcb .ttxcb-foot a{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:#667781!important;text-decoration:none!important;font-weight:500;}
#ttxcb .ttxcb-foot a svg{width:15px;height:15px;color:var(--ttxcb-head);}
#ttxcb .ttxcb-foot a:hover{color:#008069!important;}

/* phones: full-width sheet */
@media (max-width:480px){
  #ttxcb{right:14px;bottom:calc(var(--ttxcb-off) - 4px);}
  #ttxcb.ttxcb--left{left:14px;}
  #ttxcb .ttxcb-fab{width:56px!important;height:56px!important;}
  #ttxcb.is-open .ttxcb-fab{display:none!important;}
  #ttxcb.is-open .ttxcb-tip{display:none;}
  #ttxcb .ttxcb-panel{position:fixed;left:0;right:0;bottom:0;top:auto;width:100%;height:88vh;height:88dvh;max-height:none;border-radius:18px 18px 0 0;transform:translateY(30px);}
  #ttxcb.ttxcb--left .ttxcb-panel{left:0;}
}
@media (prefers-reduced-motion:reduce){
  #ttxcb *{animation:none!important;transition:none!important;}
}
@media print{#ttxcb{display:none!important;}}
