/* Assistant robot Puls: pinned bottom left, chat panel above it (markup and answers: inc/assistant.php, behaviour: assets/js/assistant.js). Colors from robot/Main.dc.html. */
.hmb{position:fixed;left:16px;bottom:14px;z-index:899;--lx:0;--ly:0;--tilt:0deg}
.hmb-bot{display:block;width:104px;padding:0;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent;filter:drop-shadow(0 10px 16px rgba(0,0,0,.5));transition:transform .25s cubic-bezier(.2,.9,.3,1.3)}
.hmb-bot:hover{transform:scale(1.07)}
.hmb-bot:focus-visible{outline:2px solid #FFDA75;outline-offset:4px;border-radius:26px}
.hmb-svg{display:block;width:100%;height:auto;overflow:visible}

/* life of the robot: every part moves on its own rhythm so it never loops visibly */
.hmb-float{animation:hmb-float 3.4s ease-in-out infinite}
@keyframes hmb-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px)}}
.hmb-floor{transform-box:fill-box;transform-origin:center;animation:hmb-floor 3.4s ease-in-out infinite}
@keyframes hmb-floor{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.8);opacity:.65}}
.hmb-glow{transform-box:fill-box;transform-origin:center;animation:hmb-glow 3.4s ease-in-out infinite}
@keyframes hmb-glow{0%,100%{opacity:.55;transform:scaleX(1)}50%{opacity:.9;transform:scaleX(1.25)}}

.hmb-head{transform-box:view-box;transform-origin:180px 212px;transform:rotate(var(--tilt));transition:transform .55s cubic-bezier(.2,.8,.2,1);animation:hmb-sway 5.2s ease-in-out infinite}
@keyframes hmb-sway{0%,100%{rotate:-1.3deg}50%{rotate:1.5deg}}
.hmb-eyes{transform:translate(calc(var(--lx) * 1px),calc(var(--ly) * 1px));transition:transform .2s ease-out}
.hmb-eye{transform-box:fill-box;transform-origin:center;transition:transform .07s ease-in}
.hmb-svg.blink .hmb-eye{transform:scaleY(.08)}
.hmb-mouth{transform-box:fill-box;transform-origin:center;vector-effect:non-scaling-stroke;transition:transform .2s}
.hmb-cheek{transition:opacity .3s}
.hmb.talk .hmb-mouth{animation:hmb-talk .26s ease-in-out infinite}
@keyframes hmb-talk{0%,100%{transform:scaleY(.55)}50%{transform:scaleY(1.9)}}
.hmb.think .hmb-mouth{transform:scaleY(.2)}
.hmb.happy .hmb-cheek{opacity:.75}

.hmb-aura{transform-box:fill-box;transform-origin:center;animation:hmb-aura 1.9s ease-in-out infinite}
@keyframes hmb-aura{0%,100%{transform:scale(1);opacity:.95}50%{transform:scale(1.4);opacity:.35}}
.hmb-ball{animation:hmb-ball 1.9s ease-in-out infinite}
@keyframes hmb-ball{0%,100%{opacity:1}50%{opacity:.7}}
.hmb.think .hmb-aura,.hmb.think .hmb-ball{animation-duration:.55s}

.hmb-armL{transform-box:view-box;transform-origin:100px 252px;animation:hmb-wave 9s ease-in-out infinite}
@keyframes hmb-wave{0%,50%{transform:rotate(0)}54%{transform:rotate(-15deg)}59%{transform:rotate(9deg)}64%{transform:rotate(-15deg)}69%{transform:rotate(9deg)}74%{transform:rotate(-11deg)}80%,100%{transform:rotate(0)}}
.hmb-marks{animation:hmb-marks 9s ease-in-out infinite}
@keyframes hmb-marks{0%,50%{opacity:.2}54%,76%{opacity:1}82%,100%{opacity:.2}}
.hmb-bot:hover .hmb-armL,.hmb.wave .hmb-armL{animation:hmb-wave-fast .55s ease-in-out infinite}
.hmb-bot:hover .hmb-marks,.hmb.wave .hmb-marks{animation:none;opacity:1}
@keyframes hmb-wave-fast{0%,100%{transform:rotate(-14deg)}50%{transform:rotate(10deg)}}

.hmb-lens{transform-box:fill-box;transform-origin:center;animation:hmb-lens 3.2s ease-in-out infinite}
@keyframes hmb-lens{0%,100%{transform:scale(1)}50%{transform:scale(1.09)}}
.hmb-tick{stroke-dasharray:40;animation:hmb-tick 3.2s ease-in-out infinite}
@keyframes hmb-tick{0%{stroke-dashoffset:40}25%,78%{stroke-dashoffset:0}95%,100%{stroke-dashoffset:40}}

.hmb-ecg{stroke-dasharray:24 76;animation:hmb-ecg 2.1s linear infinite}
@keyframes hmb-ecg{from{stroke-dashoffset:24}to{stroke-dashoffset:-76}}
.hmb.think .hmb-ecg{animation-duration:.7s}
.hmb-led{animation:hmb-led 2.4s ease-in-out infinite}
.hmb-led2{animation-delay:.3s}.hmb-led3{animation-delay:.6s}.hmb-led4{animation-delay:.9s}
@keyframes hmb-led{0%,100%{opacity:.35}50%{opacity:1}}
.hmb.hop .hmb-bot{animation:hmb-hop .5s cubic-bezier(.3,1.4,.5,1)}
@keyframes hmb-hop{0%{transform:translateY(0) scale(1,1)}30%{transform:translateY(-16px) scale(.96,1.05)}60%{transform:translateY(0) scale(1.05,.95)}100%{transform:none}}

/* speech bubble over the robot */
.hmb-bubble{position:absolute;left:6px;bottom:calc(100% + 2px);width:max-content;max-width:min(250px,calc(100vw - 32px));padding:12px 30px 12px 16px;border-radius:16px 16px 16px 4px;background:rgba(27,32,35,.95);border:1px solid rgba(255,218,117,.4);color:#E8ECEE;font-size:14px;line-height:1.45;box-shadow:0 10px 30px rgba(0,0,0,.45);transform-origin:bottom left;animation:hmb-pop .38s cubic-bezier(.2,1.25,.3,1) both}
.hmb-bubble[hidden]{display:none}
.hmb-bx{position:absolute;top:3px;right:5px;padding:4px 6px;border:0;background:none;color:#8A969C;font-size:18px;line-height:1;cursor:pointer}
.hmb-bx:hover{color:#fff}
@keyframes hmb-pop{from{opacity:0;transform:translateY(8px) scale(.85)}to{opacity:1;transform:none}}

/* chat panel */
.hmb-panel{position:absolute;left:0;bottom:calc(100% + 8px);width:min(380px,calc(100vw - 24px));height:min(540px,calc(100vh - 200px));min-height:320px;display:flex;flex-direction:column;border-radius:20px;overflow:hidden;background:rgba(22,26,28,.97);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.1);box-shadow:0 24px 60px rgba(0,0,0,.6);color:#E6ECE8;opacity:0;visibility:hidden;transform:translateY(14px) scale(.96);transform-origin:bottom left;transition:opacity .22s,transform .26s cubic-bezier(.2,.9,.3,1.08),visibility .22s}
.hmb.open .hmb-panel{opacity:1;visibility:visible;transform:none}
.hmb-head-bar{display:flex;align-items:center;gap:11px;padding:12px 14px;background:linear-gradient(135deg,rgba(104,123,91,.4),rgba(135,153,126,.12));border-bottom:1px solid rgba(255,255,255,.08)}
.hmb-ava,.hmb-mini{flex:none;display:flex;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,#687B5B,#87997E)}
.hmb-ava{width:40px;height:40px;box-shadow:0 0 0 4px rgba(135,153,126,.25)}
.hmb-mini{width:28px;height:28px}.hmb-mini svg{width:20px;height:20px}
.hmb-who{display:flex;flex-direction:column;gap:3px;line-height:1.1;flex:1;min-width:0}
.hmb-who b{font-size:15px;font-weight:800;color:#fff}
.hmb-who small{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#8FD19E}
.hmb-pulse{width:8px;height:8px;border-radius:50%;background:#8FD19E;box-shadow:0 0 0 0 rgba(143,209,158,.6);animation:hmb-ping 1.8s ease-out infinite}
@keyframes hmb-ping{0%{box-shadow:0 0 0 0 rgba(143,209,158,.55)}100%{box-shadow:0 0 0 8px rgba(143,209,158,0)}}
.hmb-x{flex:none;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.07);color:#cfd6d2;cursor:pointer}
.hmb-x:hover{background:rgba(255,255,255,.14);color:#fff}

.hmb-log{flex:1;min-height:0;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain}
.hmb-m{display:flex;gap:8px;align-items:flex-end;animation:hmb-in .26s ease both}
@keyframes hmb-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.hmb-m--u{justify-content:flex-end}
.hmb-col{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:86%}
.hmb-b{padding:10px 14px;border-radius:4px 16px 16px 16px;background:rgba(255,255,255,.05);border:1px solid rgba(255,218,117,.35);font-size:14px;line-height:1.5;color:rgba(230,236,232,.95);white-space:pre-line;overflow-wrap:anywhere}
.hmb-m--u .hmb-b{max-width:80%;border:0;border-radius:16px 16px 4px 16px;background:linear-gradient(135deg,#687B5B,#87997E);color:#fff}
.hmb-dots i{display:inline-block;width:6px;height:6px;margin:0 2px;border-radius:50%;background:#8FD19E;animation:hmb-dot 1s ease-in-out infinite}
.hmb-dots i:nth-child(2){animation-delay:.15s}.hmb-dots i:nth-child(3){animation-delay:.3s}
@keyframes hmb-dot{0%,80%,100%{transform:translateY(0);opacity:.4}40%{transform:translateY(-5px);opacity:1}}

.hmb-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"t s" "m m";gap:3px 10px;align-items:center;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);color:#fff;text-decoration:none;transition:background .15s,transform .15s}
.hmb-card:hover{background:rgba(135,153,126,.2);transform:translateX(2px)}
.hmb-card-t{grid-area:t;font-weight:700;font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hmb-card-s{grid-area:s;font-size:11px;font-weight:700;padding:3px 10px;border-radius:20px;background:rgba(135,153,126,.25);color:#cfe0c8}
.hmb-card-s.st-waiting{background:rgba(255,196,87,.18);color:#ffd27a}
.hmb-card-s.st-problem{background:rgba(240,138,71,.2);color:#ffb27a}
.hmb-card-s.st-scam{background:rgba(240,98,122,.2);color:#ff9aaa}
.hmb-card-m{grid-area:m;font-size:12px;color:#8A969C}
.hmb-links{display:flex;flex-wrap:wrap;gap:6px}
.hmb-link{display:inline-flex;align-items:center;padding:6px 12px;border-radius:20px;border:1px solid rgba(255,218,117,.4);color:#FFDA75;font-size:12.5px;font-weight:600;text-decoration:none}
.hmb-link:hover{background:rgba(255,218,117,.12);color:#FFDA75}

.hmb-chips{display:flex;flex-wrap:wrap;gap:6px;padding:2px 12px 8px;max-height:104px;overflow-y:auto}
.hmb-chips:empty{display:none}
.hmb-chip{padding:5px 11px;border-radius:20px;border:1px solid rgba(135,153,126,.45);background:rgba(135,153,126,.16);color:#cfe0c8;font:inherit;font-size:12.5px;font-weight:600;line-height:1.3;cursor:pointer;text-align:left;transition:background .15s,transform .15s}
.hmb-chip:hover{background:rgba(135,153,126,.32);transform:translateY(-1px)}
.hmb-form{display:flex;gap:8px;padding:8px 12px 6px}
.hmb-form input{flex:1;min-width:0;height:42px;padding:0 16px;border-radius:40px;border:1px solid rgba(255,255,255,.1);background:rgba(0,0,0,.3);color:#fff;font:inherit;font-size:16px}
.hmb-form input:focus{outline:none;border-color:#87997E}
.hmb-form button{flex:none;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border:0;border-radius:50%;background:linear-gradient(135deg,#687B5B,#87997E);color:#fff;cursor:pointer;transition:transform .15s}
.hmb-form button:hover{transform:scale(1.08)}
.hmb-form button:disabled{opacity:.5;cursor:default;transform:none}
.hmb-note{margin:0;padding:0 14px 10px;font-size:11px;line-height:1.35;color:#8A969C;text-align:center}

/* phone: a small button folds the robot into a round tab, the choice is remembered (localStorage hmb_min) */
.hmb-hide,.hmb-tab{display:none}
@media (max-width:640px){
	.hmb-hide{display:flex;position:absolute;right:-6px;top:6px;z-index:2;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.2);background:rgba(27,32,35,.92);color:#cfd6d2;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.4)}
	.hmb-tab{align-items:center;justify-content:center;width:42px;height:42px;padding:0;border:0;border-radius:50%;background:linear-gradient(135deg,#687B5B,#87997E);box-shadow:0 6px 18px rgba(0,0,0,.45),0 0 0 3px rgba(135,153,126,.25);opacity:.92;cursor:pointer}
	.hmb.min .hmb-tab{display:flex}
	.hmb.min .hmb-bot,.hmb.min .hmb-hide,.hmb.min .hmb-bubble,.hmb.min .hmb-panel{display:none!important}
	.hmb{left:8px;bottom:calc(8px + env(safe-area-inset-bottom,0px))}
	.hmb-bot{width:76px}
	.hmb-panel{position:fixed;left:8px;right:8px;bottom:calc(104px + env(safe-area-inset-bottom,0px));width:auto;height:min(72vh,540px)}
	.hmb-bubble{max-width:calc(100vw - 24px)}
}
@media (prefers-reduced-motion:reduce){.hmb *,.hmb *::before{animation:none!important;transition:none!important}}
@media print{.hmb{display:none}}
