/* Taskelio Core: "Tasko" support bot. */
.tkc-bot{--tb-bg:#121216;--tb-line:rgba(255,255,255,.09);--tb-text:#F3EFE7;--tb-muted:#A6A6B0;--tb-gold:linear-gradient(135deg,#F8E6BF 0%,#E7C27D 50%,#C7895A 100%);position:fixed;right:22px;bottom:22px;z-index:9990;font-family:var(--sans,Inter,system-ui,sans-serif);color:var(--tb-text);transition:opacity .4s,transform .4s}
body.admin-bar .tkc-bot{bottom:86px}
body:has(.t-cc.is-visible) .tkc-bot{opacity:0;pointer-events:none;transform:translateY(16px)}
.tkc-bot,.tkc-bot *{box-sizing:border-box}
.tkc-hp,.tkc-sr{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* Launcher */
.tkc-bot__launcher{position:relative;width:64px;height:64px;border-radius:22px;border:0;padding:0;cursor:pointer;display:grid;place-items:center;background:radial-gradient(120% 120% at 30% 15%,#24242c 0%,#0d0d10 70%);box-shadow:0 18px 44px -14px rgba(0,0,0,.75),0 0 0 1px rgba(231,194,125,.28),inset 0 1px 0 rgba(255,255,255,.08);transition:transform .5s cubic-bezier(.2,.7,.2,1),border-radius .5s,box-shadow .4s}
.tkc-bot__launcher::before{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1px;background:var(--tb-gold);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.55;transition:opacity .4s}
.tkc-bot__launcher:hover{transform:translateY(-3px) rotate(-3deg);box-shadow:0 24px 50px -14px rgba(0,0,0,.8),0 0 30px -6px rgba(231,194,125,.45)}
.tkc-bot__launcher:hover::before{opacity:1}
.tkc-bot__launcher:focus-visible{outline:2px solid #E7C27D;outline-offset:4px}
.tkc-bot__x{position:absolute;inset:0;display:grid;place-items:center;color:#F3EFE7;opacity:0;transform:rotate(-90deg) scale(.6);transition:all .4s cubic-bezier(.2,.7,.2,1)}
.tkc-bot.is-open .tkc-bot__launcher{border-radius:50%}
.tkc-bot.is-open .tkc-head--launcher{opacity:0;transform:scale(.4) rotate(20deg)}
.tkc-bot.is-open .tkc-bot__x{opacity:1;transform:none}
.tkc-head--launcher{transition:opacity .3s,transform .45s cubic-bezier(.2,.7,.2,1)}

/* Tooltip */
.tkc-bot__tip{position:absolute;right:76px;bottom:14px;white-space:nowrap;padding:10px 14px;border-radius:14px 14px 4px 14px;background:#F3EFE7;color:#0A0A0C;font-size:14px;box-shadow:0 14px 34px -12px rgba(0,0,0,.6);opacity:0;transform:translateX(8px) scale(.96);transform-origin:right bottom;pointer-events:none;transition:all .45s cubic-bezier(.2,.7,.2,1)}
.tkc-bot__tip.is-on{opacity:1;transform:none}

/* Animated head */
.tkc-head{overflow:visible;--ex:0px;--ey:0px;--tilt:0deg}
.tkc-head__body{transform-box:view-box;transform-origin:32px 40px;animation:tkc-float 4.2s ease-in-out infinite;transform:rotate(var(--tilt))}
.tkc-head__eyes{transform:translate(var(--ex),var(--ey));transition:transform .18s ease-out}
.tkc-head__eye{transform-box:fill-box;transform-origin:center;animation:tkc-blink 5.2s infinite}
.tkc-head__eye:nth-child(2){animation-delay:.04s}
.tkc-head__bulb{animation:tkc-bulb 2.6s ease-in-out infinite}
@keyframes tkc-float{0%,100%{translate:0 0;rotate:0deg}30%{translate:0 -1.6px;rotate:-4deg}65%{translate:0 .4px;rotate:3deg}}
@keyframes tkc-blink{0%,90%,100%{transform:scaleY(1)}93%{transform:scaleY(.08)}96%{transform:scaleY(1)}}
@keyframes tkc-bulb{0%,100%{opacity:1}50%{opacity:.45}}
.tkc-bot__launcher:hover .tkc-head__eye,.tkc-bot.is-happy .tkc-head__eye{animation:none;transform:scaleY(.45) translateY(1px)}
.tkc-bot__launcher:hover .tkc-head__body{animation:tkc-wiggle .7s ease-in-out}
@keyframes tkc-wiggle{0%,100%{rotate:0deg}25%{rotate:-9deg}60%{rotate:7deg}}
.tkc-bot.is-talking .tkc-head--panel .tkc-head__mouth{animation:tkc-talk .28s ease-in-out infinite alternate}
@keyframes tkc-talk{from{d:path("M28.5 40.2q3.5 2.4 7 0")}to{d:path("M28.5 39.6q3.5 4.4 7 0")}}
.tkc-bot.is-happy .tkc-head--panel .tkc-head__body{animation:tkc-hop .6s cubic-bezier(.3,1.6,.5,1) 2}
@keyframes tkc-hop{0%,100%{translate:0 0}40%{translate:0 -5px}}

/* Panel */
.tkc-bot__panel{position:absolute;right:0;bottom:80px;width:min(392px,calc(100vw - 28px));height:min(620px,calc(100vh - 140px));display:flex;flex-direction:column;border-radius:26px;background:rgba(18,18,22,.96);backdrop-filter:blur(22px) saturate(140%);-webkit-backdrop-filter:blur(22px) saturate(140%);border:1px solid var(--tb-line);box-shadow:0 50px 100px -30px rgba(0,0,0,.85),0 0 0 1px rgba(231,194,125,.08);overflow:hidden;transform-origin:right bottom;opacity:0;transform:translateY(14px) scale(.96);transition:opacity .3s ease,transform .45s cubic-bezier(.2,.7,.2,1)}
body.admin-bar .tkc-bot__panel{height:min(620px,calc(100vh - 210px))}
.tkc-bot.is-open .tkc-bot__panel{opacity:1;transform:none}
.tkc-bot__panel::before{content:"";position:absolute;top:-120px;right:-80px;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle,rgba(231,194,125,.16),transparent 65%);pointer-events:none}
.tkc-bot__head{position:relative;display:flex;align-items:center;gap:12px;padding:18px 18px 16px;border-bottom:1px solid var(--tb-line)}
.tkc-bot__avatar{position:relative;flex:none;width:52px;height:52px;border-radius:17px;display:grid;place-items:center;background:radial-gradient(120% 120% at 30% 15%,#26262e,#0d0d10);box-shadow:inset 0 0 0 1px rgba(231,194,125,.25)}
.tkc-bot__online{position:absolute;right:-2px;bottom:-2px;width:13px;height:13px;border-radius:50%;background:#7ED6A8;border:3px solid #121216}
.tkc-bot__head h2{margin:0!important;font-size:16px!important;font-weight:600;letter-spacing:-.01em;color:#F3EFE7!important;font-family:var(--sans,inherit)!important}
.tkc-bot__head h2 span{color:var(--tb-muted);font-weight:500}
.tkc-bot__head p{margin:2px 0 0!important;font-size:12.5px!important;line-height:1.4;color:var(--tb-muted)}
.tkc-bot__close{margin-left:auto;align-self:flex-start;width:34px;height:34px;border-radius:10px;border:0;background:transparent;color:var(--tb-muted);cursor:pointer;display:grid;place-items:center}
.tkc-bot__close:hover{background:rgba(255,255,255,.07);color:#F3EFE7}

/* Log */
.tkc-bot__log{flex:1;overflow-y:auto;padding:18px 16px 8px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth;overscroll-behavior:contain}
.tkc-bot__log::-webkit-scrollbar{width:6px}
.tkc-bot__log::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:6px}
.tkc-msg{display:flex;gap:8px;align-items:flex-end;max-width:88%;animation:tkc-in .35s cubic-bezier(.2,.7,.2,1) both}
@keyframes tkc-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.tkc-msg__av{flex:none;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#1d1d23;box-shadow:inset 0 0 0 1px rgba(231,194,125,.18)}
.tkc-bubble{padding:11px 14px;border-radius:18px;font-size:14.5px;line-height:1.5;word-wrap:break-word}
.tkc-msg--bot .tkc-bubble{background:#1d1d23;border:1px solid var(--tb-line);border-bottom-left-radius:6px;color:#E9E5DD}
.tkc-msg--bot .tkc-bubble a{color:#F2CF8C;text-decoration:underline;text-underline-offset:2px}
.tkc-msg--me{align-self:flex-end}
.tkc-msg--me .tkc-bubble{background:var(--tb-gold);color:#0A0A0C;border-bottom-right-radius:6px;font-weight:500}
.tkc-typing .tkc-bubble{display:flex;gap:4px;padding:15px 16px}
.tkc-typing .tkc-bubble i{width:6px;height:6px;border-radius:50%;background:#A6A6B0;animation:tkc-dot 1.1s infinite}
.tkc-typing .tkc-bubble i:nth-child(2){animation-delay:.15s}
.tkc-typing .tkc-bubble i:nth-child(3){animation-delay:.3s}
@keyframes tkc-dot{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}
.tkc-chips{display:flex;flex-wrap:wrap;gap:7px;padding:2px 0 4px 38px;animation:tkc-in .35s cubic-bezier(.2,.7,.2,1) both}
.tkc-chip{border:1px solid rgba(231,194,125,.35);background:rgba(231,194,125,.06);color:#F3EFE7;border-radius:99px;padding:8px 14px;font:inherit;font-size:13.5px;cursor:pointer;transition:background .25s,border-color .25s,transform .25s;text-align:left;line-height:1.3}
.tkc-chip:hover{background:rgba(231,194,125,.16);border-color:#E7C27D;transform:translateY(-1px)}
.tkc-chip:focus-visible{outline:2px solid #E7C27D;outline-offset:2px}
.tkc-chip--primary{background:var(--tb-gold);color:#0A0A0C;border-color:transparent;font-weight:600}
.tkc-chip--primary:hover{background:var(--tb-gold);filter:brightness(1.05)}
.tkc-sum{display:grid;gap:6px;margin:10px 0 8px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid var(--tb-line)}
.tkc-sum div{display:flex;justify-content:space-between;gap:10px;font-size:13px}
.tkc-sum span{color:var(--tb-muted)}
.tkc-sum b{font-weight:600;text-align:right;word-break:break-all}
.tkc-bubble small{display:block;font-size:12px;color:var(--tb-muted)}

/* Composer */
.tkc-bot__composer{display:flex;align-items:flex-end;gap:8px;padding:12px 12px 14px;border-top:1px solid var(--tb-line);background:rgba(10,10,12,.4)}
.tkc-bot__composer textarea{flex:1;resize:none;min-height:46px;max-height:140px;padding:12px 14px;border-radius:15px;border:1px solid rgba(255,255,255,.12);background:#0d0d10;color:#F3EFE7;font:inherit;font-size:14.5px;line-height:1.45;transition:border-color .2s,box-shadow .2s}
.tkc-bot__composer textarea:focus{outline:none;border-color:#E7C27D;box-shadow:0 0 0 3px rgba(231,194,125,.2)}
.tkc-bot__composer textarea:disabled{opacity:.55;cursor:not-allowed}
.tkc-bot__composer textarea::placeholder{color:#7d7d87}
.tkc-bot__send{flex:none;width:46px;height:46px;border-radius:15px;border:0;background:var(--tb-gold);color:#0A0A0C;cursor:pointer;display:grid;place-items:center;transition:transform .25s,opacity .25s}
.tkc-bot__send:hover:not(:disabled){transform:translateY(-1px) rotate(-6deg)}
.tkc-bot__send:disabled{opacity:.35;cursor:not-allowed}

/* Mobile: full-width sheet */
@media (max-width:520px){
	.tkc-bot{right:14px;bottom:14px}
	.tkc-bot__launcher{width:58px;height:58px;border-radius:20px}
	.tkc-bot__panel{position:fixed;left:8px;right:8px;bottom:84px;width:auto;height:calc(100dvh - 100px)}
	.tkc-bot__tip{display:none}
}
@media (prefers-reduced-motion:reduce){
	.tkc-bot *,.tkc-bot{animation:none!important;transition:none!important}
}
@media print{.tkc-bot{display:none}}

/* Closed panel must not catch taps or swipes (it was invisible but still on top). */
.tkc-bot__panel[hidden]{display:none!important}
.tkc-bot:not(.is-open) .tkc-bot__panel{pointer-events:none!important}

.tkc-bot{pointer-events:none}
.tkc-bot__launcher,.tkc-bot.is-open .tkc-bot__panel{pointer-events:auto}
/* Phones/touch: drop the full-screen blended grain layer (costly to repaint while scrolling). */
@media (hover:none),(pointer:coarse),(max-width:860px){.t-grain{display:none!important}}
