/* Telegram Woo Connect – bong bóng chat (v1.1) */
.tgwc-root{
  --tgwc-primary:#d32f2f;--tgwc-primary2:#8e0000;--tgwc-accent:#ffc83d;
  --tgwc-bg:#141519;--tgwc-surface:#23252b;--tgwc-text:#f1f2f4;--tgwc-muted:#9ca1ab;--tgwc-border:#34373f;
  --tgwc-x:20px;--tgwc-y:20px;--tgwc-size:62px;--tgwc-w:380px;--tgwc-h:580px;--tgwc-bubble-radius:50%;
  --tgwc-gap:14px;
  position:fixed;z-index:999990;width:var(--tgwc-size);height:var(--tgwc-size);
  font-family:"Be Vietnam Pro","Segoe UI",Roboto,-apple-system,Arial,sans-serif;font-size:14px;line-height:1.5;color:var(--tgwc-text);
  -webkit-font-smoothing:antialiased;
}
.tgwc-root *,.tgwc-root *::before,.tgwc-root *::after{box-sizing:border-box}
.tgwc-pos-bottom-right{right:var(--tgwc-x);bottom:var(--tgwc-y)}
.tgwc-pos-bottom-left{left:var(--tgwc-x);bottom:var(--tgwc-y)}
.tgwc-pos-top-right{right:var(--tgwc-x);top:var(--tgwc-y)}
.tgwc-pos-top-left{left:var(--tgwc-x);top:var(--tgwc-y)}
.tgwc-pos-middle-right{right:var(--tgwc-x);top:calc(50% - var(--tgwc-size) / 2)}
.tgwc-pos-middle-left{left:var(--tgwc-x);top:calc(50% - var(--tgwc-size) / 2)}

/* ---------- Bong bóng ---------- */
.tgwc-bubble{
  position:relative;width:100%;height:100%;border-radius:var(--tgwc-bubble-radius);border:2px solid var(--tgwc-accent);padding:0;cursor:pointer;
  background:radial-gradient(circle at 30% 25%,color-mix(in srgb,var(--tgwc-primary) 75%,#fff) 0%,var(--tgwc-primary) 45%,var(--tgwc-primary2) 100%);
  color:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 24px rgba(0,0,0,.45),0 0 0 4px color-mix(in srgb,var(--tgwc-accent) 18%,transparent);
  transition:transform .25s cubic-bezier(.3,1.6,.6,1),box-shadow .25s;touch-action:none;user-select:none;-webkit-tap-highlight-color:transparent;
}
.tgwc-bubble:hover{transform:scale(1.08) rotate(-4deg);box-shadow:0 10px 30px rgba(0,0,0,.5),0 0 0 6px color-mix(in srgb,var(--tgwc-accent) 28%,transparent)}
.tgwc-bubble:focus-visible{outline:3px solid var(--tgwc-accent);outline-offset:3px}
.tgwc-bubble svg{width:52%;height:52%;filter:drop-shadow(0 1px 1px rgba(0,0,0,.3));transition:transform .3s,opacity .2s}
.tgwc-bubble img{width:62%;height:62%;object-fit:contain;pointer-events:none}
.tgwc-bubble .tgwc-ic-close{position:absolute;opacity:0;transform:rotate(-90deg) scale(.6)}
.tgwc-open .tgwc-bubble .tgwc-ic-main{opacity:0;transform:rotate(90deg) scale(.6)}
.tgwc-open .tgwc-bubble .tgwc-ic-close{opacity:1;transform:none}
.tgwc-badge{position:absolute;top:-3px;right:-3px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--tgwc-accent);color:#1a1a1a;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid var(--tgwc-bg);animation:tgwc-pop .4s cubic-bezier(.3,1.6,.6,1)}
.tgwc-open .tgwc-badge{display:none}
.tgwc-pulse:not(.tgwc-open) .tgwc-bubble::before{content:"";position:absolute;inset:-2px;border-radius:inherit;border:2px solid var(--tgwc-accent);animation:tgwc-ring 2.4s ease-out infinite;pointer-events:none}
@keyframes tgwc-ring{0%{transform:scale(1);opacity:.7}100%{transform:scale(1.55);opacity:0}}
@keyframes tgwc-pop{0%{transform:scale(0)}100%{transform:scale(1)}}
.tgwc-dragging .tgwc-bubble{cursor:grabbing;transform:scale(1.12);transition:none}
.tgwc-root.tgwc-dragging{transition:none}
.tgwc-can-drag .tgwc-bubble{cursor:grab}

/* ---------- Nhãn & lời mời ---------- */
.tgwc-label,.tgwc-teaser{position:absolute;white-space:nowrap;background:var(--tgwc-surface);color:var(--tgwc-text);border:1px solid var(--tgwc-border);box-shadow:0 6px 18px rgba(0,0,0,.35)}
.tgwc-label{top:50%;transform:translateY(-50%);padding:7px 14px;border-radius:999px;font-size:13px;font-weight:700;pointer-events:none;border-color:color-mix(in srgb,var(--tgwc-accent) 45%,var(--tgwc-border))}
.tgwc-label::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#2ecc71;margin-right:7px;vertical-align:1px;box-shadow:0 0 0 3px rgba(46,204,113,.25)}
[class*="tgwc-pos-"][class*="-left"] .tgwc-label{left:calc(100% + 12px)}
[class*="tgwc-pos-"][class*="-right"] .tgwc-label{right:calc(100% + 12px)}
.tgwc-open .tgwc-label,.tgwc-open .tgwc-teaser{display:none}

.tgwc-teaser{width:250px;white-space:normal;padding:14px 34px 14px 14px;border-radius:16px;font-size:13.5px;cursor:pointer;animation:tgwc-up .45s cubic-bezier(.3,1.4,.6,1)}
.tgwc-teaser b{display:block;color:var(--tgwc-accent);font-size:12px;margin-bottom:3px;letter-spacing:.3px}
.tgwc-teaser .tgwc-tx{position:absolute;top:6px;right:8px;background:none;border:0;color:var(--tgwc-muted);font-size:18px;cursor:pointer;line-height:1;padding:2px}
[class*="tgwc-pos-bottom"] .tgwc-teaser{bottom:calc(100% + 14px)}
[class*="tgwc-pos-top"] .tgwc-teaser,[class*="tgwc-pos-middle"] .tgwc-teaser{top:calc(100% + 14px)}
[class*="tgwc-pos-"][class*="-left"] .tgwc-teaser{left:0}
[class*="tgwc-pos-"][class*="-right"] .tgwc-teaser{right:0}
@keyframes tgwc-up{0%{opacity:0;transform:translateY(10px) scale(.95)}100%{opacity:1;transform:none}}

/* ---------- Khung chat ---------- */
.tgwc-panel{
  position:absolute;width:var(--tgwc-w);height:var(--tgwc-h);max-width:calc(100vw - 24px);max-height:calc(100vh - var(--tgwc-size) - var(--tgwc-y) - 30px);
  background:var(--tgwc-bg);border:1px solid var(--tgwc-border);border-radius:20px;overflow:hidden;
  box-shadow:0 24px 60px rgba(0,0,0,.55),0 0 0 1px color-mix(in srgb,var(--tgwc-accent) 12%,transparent);
  display:flex;flex-direction:column;visibility:hidden;opacity:0;transform:translateY(12px) scale(.97);
  transition:opacity .22s ease,transform .25s cubic-bezier(.3,1.3,.6,1),visibility 0s .25s;
}
.tgwc-open .tgwc-panel{visibility:visible;opacity:1;transform:none;transition:opacity .22s ease,transform .25s cubic-bezier(.3,1.3,.6,1)}
[class*="tgwc-pos-bottom"] .tgwc-panel{bottom:calc(100% + var(--tgwc-gap));transform-origin:bottom}
[class*="tgwc-pos-top"] .tgwc-panel{top:calc(100% + var(--tgwc-gap));transform-origin:top}
[class*="tgwc-pos-middle"] .tgwc-panel{top:50%;margin-top:calc(var(--tgwc-h) / -2)}
.tgwc-pos-middle-left .tgwc-panel{left:calc(100% + var(--tgwc-gap));top:calc(var(--tgwc-size) / 2)}
.tgwc-pos-middle-right .tgwc-panel{right:calc(100% + var(--tgwc-gap));top:calc(var(--tgwc-size) / 2)}
.tgwc-pos-bottom-left .tgwc-panel,.tgwc-pos-top-left .tgwc-panel{left:0}
.tgwc-pos-bottom-right .tgwc-panel,.tgwc-pos-top-right .tgwc-panel{right:0}

/* Đầu khung */
.tgwc-head{
  position:relative;flex:0 0 auto;padding:14px 14px 14px 16px;display:flex;align-items:center;gap:12px;color:#fff;
  background:linear-gradient(120deg,var(--tgwc-primary) 0%,var(--tgwc-primary2) 100%);
  border-bottom:2px solid var(--tgwc-accent);
}
.tgwc-head::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(135deg,rgba(255,255,255,.05) 0 2px,transparent 2px 9px)}
.tgwc-av{position:relative;width:44px;height:44px;flex:0 0 auto;border-radius:50%;background:rgba(0,0,0,.25);border:2px solid var(--tgwc-accent);display:flex;align-items:center;justify-content:center;overflow:visible}
.tgwc-av img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.tgwc-av svg{width:24px;height:24px}
.tgwc-av::after{content:"";position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:#2ecc71;border:2px solid var(--tgwc-primary2)}
.tgwc-ht{min-width:0;flex:1;position:relative;z-index:1}
.tgwc-ht b{display:block;font-size:15.5px;font-weight:800;letter-spacing:.2px;text-shadow:0 1px 2px rgba(0,0,0,.3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tgwc-ht small{display:block;font-size:12px;color:color-mix(in srgb,#fff 80%,var(--tgwc-accent));opacity:.95}
.tgwc-hb{position:relative;z-index:1;display:flex;gap:4px}
.tgwc-hb button,.tgwc-hb a{width:32px;height:32px;border-radius:10px;border:0;background:rgba(0,0,0,.2);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;text-decoration:none;font-size:15px;transition:background .15s}
.tgwc-hb button:hover,.tgwc-hb a:hover{background:rgba(0,0,0,.4)}
.tgwc-hb svg{width:16px;height:16px}

/* Thân */
.tgwc-body{
  flex:1;overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth;
  background:
    radial-gradient(600px 300px at 100% 0%,color-mix(in srgb,var(--tgwc-primary) 10%,transparent),transparent 70%),
    radial-gradient(500px 260px at 0% 100%,color-mix(in srgb,var(--tgwc-accent) 6%,transparent),transparent 70%),
    var(--tgwc-bg);
  scrollbar-width:thin;scrollbar-color:var(--tgwc-border) transparent;
}
.tgwc-body>*{flex-shrink:0}
.tgwc-body::-webkit-scrollbar{width:6px}.tgwc-body::-webkit-scrollbar-thumb{background:var(--tgwc-border);border-radius:3px}
.tgwc-day{align-self:center;font-size:11px;color:var(--tgwc-muted);background:color-mix(in srgb,var(--tgwc-surface) 70%,transparent);padding:3px 10px;border-radius:999px}

.tgwc-row{display:flex;gap:8px;align-items:flex-end;animation:tgwc-in .28s ease both}
.tgwc-row.tgwc-me{justify-content:flex-end}
@keyframes tgwc-in{0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}}
.tgwc-mini{width:26px;height:26px;flex:0 0 auto;border-radius:50%;background:linear-gradient(135deg,var(--tgwc-primary),var(--tgwc-primary2));border:1.5px solid var(--tgwc-accent);display:flex;align-items:center;justify-content:center;overflow:hidden}
.tgwc-mini img{width:100%;height:100%;object-fit:cover}
.tgwc-mini svg{width:14px;height:14px;color:#fff}
.tgwc-msg{max-width:82%;padding:10px 13px;border-radius:16px;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;font-size:14px}
.tgwc-msg a{color:var(--tgwc-accent);text-decoration:underline;text-underline-offset:2px}
.tgwc-bot .tgwc-msg{background:var(--tgwc-surface);border:1px solid var(--tgwc-border);border-bottom-left-radius:5px;color:var(--tgwc-text)}
.tgwc-me .tgwc-msg{background:linear-gradient(135deg,var(--tgwc-primary),var(--tgwc-primary2));color:#fff;border-bottom-right-radius:5px;box-shadow:0 3px 10px color-mix(in srgb,var(--tgwc-primary) 35%,transparent)}
.tgwc-me .tgwc-msg a{color:#fff}
.tgwc-typing{display:inline-flex;gap:4px;padding:3px 0}
.tgwc-typing i{width:7px;height:7px;border-radius:50%;background:var(--tgwc-accent);animation:tgwc-b 1.1s infinite ease-in-out}
.tgwc-typing i:nth-child(2){animation-delay:.15s}.tgwc-typing i:nth-child(3){animation-delay:.3s}
@keyframes tgwc-b{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

/* Thẻ sản phẩm */
.tgwc-cards{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 8px 34px;scroll-snap-type:x mandatory;scrollbar-width:thin;scrollbar-color:var(--tgwc-border) transparent;animation:tgwc-in .3s ease both}
.tgwc-cards::-webkit-scrollbar{height:5px}.tgwc-cards::-webkit-scrollbar-thumb{background:var(--tgwc-border);border-radius:3px}
.tgwc-card{flex:0 0 158px;scroll-snap-align:start;display:flex;flex-direction:column;background:var(--tgwc-surface);border:1px solid var(--tgwc-border);border-radius:14px;overflow:hidden;text-decoration:none!important;color:var(--tgwc-text)!important;transition:transform .18s,border-color .18s,box-shadow .18s}
.tgwc-card:hover{transform:translateY(-3px);border-color:var(--tgwc-accent);box-shadow:0 8px 18px rgba(0,0,0,.35)}
.tgwc-card .tgwc-img{position:relative;aspect-ratio:16/10;background:#000;overflow:hidden}
.tgwc-card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.tgwc-card:hover img{transform:scale(1.06)}
.tgwc-card .tgwc-cb{padding:8px 10px 10px;display:flex;flex-direction:column;gap:6px;flex:1}
.tgwc-card b{font-size:12.5px;line-height:1.35;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tgwc-card .tgwc-cf{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:6px}
.tgwc-card .tgwc-price{color:var(--tgwc-accent);font-weight:800;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.tgwc-card .tgwc-go{flex:0 0 auto;white-space:nowrap;font-size:11px;font-weight:700;padding:3px 8px;border-radius:999px;background:var(--tgwc-primary);color:#fff}

/* Nút link & gợi ý */
.tgwc-btns{display:flex;flex-wrap:wrap;gap:6px;padding-left:34px;animation:tgwc-in .3s ease both}
.tgwc-btns a{display:inline-flex;align-items:center;gap:5px;padding:7px 12px;border-radius:10px;font-size:12.5px;font-weight:700;text-decoration:none!important;
  color:var(--tgwc-accent)!important;background:color-mix(in srgb,var(--tgwc-accent) 10%,var(--tgwc-surface));border:1px solid color-mix(in srgb,var(--tgwc-accent) 45%,transparent);transition:all .15s}
.tgwc-btns a::after{content:"↗";font-size:11px;opacity:.8}
.tgwc-btns a:hover{background:var(--tgwc-accent);color:#1a1a1a!important}
.tgwc-chips{display:flex;flex-wrap:wrap;gap:6px;padding-left:34px;animation:tgwc-in .3s ease both}
.tgwc-chip{border:1px solid var(--tgwc-border);background:var(--tgwc-surface);color:var(--tgwc-text);border-radius:999px;padding:6px 12px;font-size:12.5px;cursor:pointer;font-family:inherit;transition:all .15s}
.tgwc-chip:hover{border-color:var(--tgwc-accent);color:var(--tgwc-accent);transform:translateY(-1px)}

/* Chân */
.tgwc-foot{flex:0 0 auto;background:var(--tgwc-surface);border-top:1px solid var(--tgwc-border);padding:10px 12px 12px}
.tgwc-links{display:flex;gap:6px;margin-bottom:8px}
.tgwc-links a{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;font-weight:700;padding:7px 8px;border-radius:10px;text-decoration:none!important;white-space:nowrap;transition:filter .15s}
.tgwc-links a{background:color-mix(in srgb,var(--tgwc-text) 8%,transparent);color:var(--tgwc-text)!important;min-width:0}
.tgwc-links a span{overflow:hidden;text-overflow:ellipsis}
.tgwc-links a.tgwc-l-telegram{background:linear-gradient(135deg,#2AABEE,#1e88c7);color:#fff!important}
.tgwc-links a.tgwc-l-zalo{background:linear-gradient(135deg,#0a8cff,#0068ff);color:#fff!important}
.tgwc-links a.tgwc-l-form{background:linear-gradient(135deg,var(--tgwc-accent),color-mix(in srgb,var(--tgwc-accent) 70%,#b36b00));color:#1a1a1a!important}
.tgwc-zl{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:4px;background:#fff;color:#0068ff;font-size:11px;font-weight:900;font-family:Arial,sans-serif}
.tgwc-links a:hover{filter:brightness(1.12)}
.tgwc-links svg{width:14px;height:14px}
.tgwc-form{display:flex;gap:8px;align-items:center}
.tgwc-form input{flex:1;min-width:0;height:44px;border:1px solid var(--tgwc-border);border-radius:14px;padding:0 14px;font-size:14px;font-family:inherit;outline:none;color:var(--tgwc-text);background:var(--tgwc-bg);transition:border-color .15s,box-shadow .15s;margin:0}
.tgwc-form input::placeholder{color:var(--tgwc-muted)}
.tgwc-form input:focus{border-color:var(--tgwc-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--tgwc-accent) 18%,transparent)}
.tgwc-form button{width:44px;height:44px;flex:0 0 auto;border-radius:14px;border:0;padding:0;cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,var(--tgwc-primary),var(--tgwc-primary2));box-shadow:0 4px 12px color-mix(in srgb,var(--tgwc-primary) 40%,transparent);transition:transform .15s}
.tgwc-form button:hover{transform:scale(1.06)}
.tgwc-form button:disabled{opacity:.5;cursor:default;transform:none}
.tgwc-form button svg{width:19px;height:19px}

/* Thông báo nhỏ */
.tgwc-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:999999;background:#111;color:#fff;padding:10px 16px;border-radius:12px;font:600 13px/1.4 "Segoe UI",Roboto,Arial,sans-serif;box-shadow:0 8px 24px rgba(0,0,0,.4);border:1px solid var(--tgwc-accent,#ffc83d);animation:tgwc-up .3s ease}

/* Chủ đề sáng */
.tgwc-light .tgwc-bubble{border-color:#fff}
.tgwc-light .tgwc-card .tgwc-img{background:#eee}
.tgwc-light .tgwc-btns a:hover{color:#fff!important}
.tgwc-light .tgwc-badge{color:#fff}

/* Điện thoại */
@media (max-width:520px){
  .tgwc-hide-mobile{display:none!important}
  .tgwc-open .tgwc-panel{position:fixed;left:8px!important;right:8px!important;top:auto!important;bottom:calc(var(--tgwc-y) + var(--tgwc-size) + 10px)!important;width:auto;max-width:none;margin:0;height:min(var(--tgwc-h),calc(100vh - var(--tgwc-size) - var(--tgwc-y) - 30px))}
  [class*="tgwc-pos-top"].tgwc-open .tgwc-panel{top:calc(var(--tgwc-y) + var(--tgwc-size) + 10px)!important;bottom:auto!important}
  .tgwc-label{display:none}
  .tgwc-teaser{width:220px}
  .tgwc-msg{font-size:14.5px}
  .tgwc-form input{font-size:16px}
}
@media (prefers-reduced-motion:reduce){.tgwc-root *{animation:none!important;transition:none!important}}

/* Form yêu cầu tạo mod / đặt hàng */
.tgwc-req{margin-left:34px;background:var(--tgwc-surface);border:1px solid color-mix(in srgb,var(--tgwc-accent) 50%,var(--tgwc-border));border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:8px;animation:tgwc-in .3s ease both;box-shadow:0 6px 18px rgba(0,0,0,.25)}
.tgwc-req-t{font-weight:800;color:var(--tgwc-accent);font-size:14px}
.tgwc-req input,.tgwc-req textarea{width:100%;border:1px solid var(--tgwc-border);background:var(--tgwc-bg);color:var(--tgwc-text);border-radius:10px;padding:9px 11px;font:inherit;font-size:13.5px;outline:none;resize:vertical;margin:0}
.tgwc-req input::placeholder,.tgwc-req textarea::placeholder{color:var(--tgwc-muted)}
.tgwc-req input:focus,.tgwc-req textarea:focus{border-color:var(--tgwc-accent)}
.tgwc-req .tgwc-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
.tgwc-req-e{color:#ff6b6b;font-size:12.5px;min-height:0}
.tgwc-req-e:empty{display:none}
.tgwc-req-a{display:flex;gap:8px;justify-content:flex-end}
.tgwc-req-a button{border:0;border-radius:10px;padding:9px 14px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.tgwc-req-c{background:transparent;color:var(--tgwc-muted);border:1px solid var(--tgwc-border)!important}
.tgwc-req-s{background:linear-gradient(135deg,var(--tgwc-primary),var(--tgwc-primary2));color:#fff}
.tgwc-req-s:disabled{opacity:.6;cursor:default}
.tgwc-req-s svg{width:15px;height:15px}
.tgwc-btns a.tgwc-b-form{background:var(--tgwc-accent);color:#1a1a1a!important;border-color:var(--tgwc-accent)}
.tgwc-btns a.tgwc-b-form::after{content:"›"}
@media (max-width:520px){.tgwc-req{margin-left:0}.tgwc-req input,.tgwc-req textarea{font-size:16px}}
