/* Thermo Engineering Works chatbot — every class starts with thermo-chat
   Palette: ink #0c0a1a (logo ground) · signal red #f10020 (logo red, actions only) · steel #eef0f5 / #dcdfe9 */
.thermo-chat-root{--tc-ink:#0c0a1a;--tc-ink2:#1d1a3a;--tc-red:#f10020;--tc-red-d:#c9001a;--tc-steel:#eef0f5;--tc-line:#dcdfe9;--tc-card:#fff;--tc-text:#14122b;--tc-mute:#62617c;--tc-wa:#128c4a;
  font-family:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Roboto,"Helvetica Neue",Arial,sans-serif;font-size:14px;line-height:1.5;color:var(--tc-text);-webkit-font-smoothing:antialiased}
.thermo-chat-root *{box-sizing:border-box;margin:0;padding:0}
.thermo-chat-root svg{width:20px;height:20px;fill:currentColor;display:block;flex:none}
.thermo-chat-root button{font-family:inherit; margin-top: 10px;}
.thermo-chat-root :focus-visible{outline:2px solid var(--tc-red);outline-offset:2px}

/* ---------- Desktop dock: one capsule on the right wall; every button is fixed-size ---------- */
.thermo-chat-dock{position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:99990;display:flex;flex-direction:column;gap:8px;width:58px;padding: 2px 8px 10px 9px;background:var(--tc-ink);border-radius:30px 0 0 30px;box-shadow:-6px 8px 28px rgba(12,10,26,.38)}
.thermo-chat-dock-btn{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;border:0;border-radius:50%;cursor:pointer;color:#fff;text-decoration:none;background:#66656e;transition:background-color .2s}
.thermo-chat-dock-btn:hover,.thermo-chat-dock-btn:focus-visible{background:#2d2a52}
.thermo-chat-dock-chat{background:var(--tc-red)}.thermo-chat-dock-chat:hover,.thermo-chat-dock-chat:focus-visible{background:var(--tc-red-d)}
.thermo-chat-dock-wa{background:var(--tc-wa)}.thermo-chat-dock-wa:hover,.thermo-chat-dock-wa:focus-visible{background:#0e7340}
.thermo-chat-dock-top{visibility:hidden;opacity:0;transition:opacity .2s,background-color .2s}.thermo-chat-dock-top.thermo-chat-show{visibility:visible;opacity:1}
.thermo-chat-tip{position:absolute;right:52px;top:50%;transform:translateY(-50%);white-space:nowrap;background:var(--tc-ink);color:#fff;font-size:12px;font-weight:500;padding:5px 10px;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .15s}
.thermo-chat-dock-btn:hover .thermo-chat-tip,.thermo-chat-dock-btn:focus-visible .thermo-chat-tip{opacity:1}
.thermo-chat-badge{position:absolute;top:1px;right:1px;width:11px;height:11px;border-radius:50%;background:#fff;border:2px solid var(--tc-red);animation:thermo-chat-pulse 2s infinite}
@keyframes thermo-chat-pulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.65)}70%{box-shadow:0 0 0 8px rgba(255,255,255,0)}100%{box-shadow:0 0 0 0 rgba(255,255,255,0)}}

/* greeting bubble */
.thermo-chat-nudge{position:fixed;right:70px;top:calc(50% - 96px);z-index:99989;max-width:230px;background:#fff;color:var(--tc-text);border-left:3px solid var(--tc-red);border-radius:12px;padding:11px 30px 11px 13px;font-size:13px;font-weight:500;box-shadow:0 10px 30px rgba(12,10,26,.25);display:none;cursor:pointer}
.thermo-chat-nudge.thermo-chat-show{display:block;animation:thermo-chat-in .3s ease}
.thermo-chat-nudge-x{position:absolute;top:3px;right:6px;background:none;border:0;color:var(--tc-mute);font-size:18px;cursor:pointer;line-height:1}

/* ---------- Chat window ---------- */
.thermo-chat-window{position:fixed;right:72px;top:50%;width:400px;max-width:calc(100vw - 90px);height:640px;max-height:calc(100vh - 32px);z-index:99995;display:flex;flex-direction:column;background:var(--tc-steel);border-radius:20px;box-shadow:0 28px 70px rgba(12,10,26,.4),0 0 0 1px rgba(12,10,26,.08);overflow:hidden;opacity:0;visibility:hidden;transform:translateY(-47%) scale(.97);transform-origin:right center;transition:opacity .22s,transform .28s cubic-bezier(.2,.9,.3,1.1),visibility .22s}
.thermo-chat-window.thermo-chat-open{opacity:1;visibility:visible;transform:translateY(-50%) scale(1)}

/* header: the logo's double red rule, reused as the frame */
.thermo-chat-header{position:relative;display:flex;align-items:center;gap:10px;padding:16px 14px 16px 16px;background:var(--tc-ink);flex:0 0 auto}

.thermo-chat-header::before{top:7px}.thermo-chat-header::after{bottom:7px}
.thermo-chat-logo{height:38px;width:auto;max-width:130px;object-fit:contain;flex:none;overflow:hidden;font-size:11px;color:#fff;line-height:1.2}
.thermo-chat-title{flex:1;min-width:0;font-size:12px;color:#b9b8d0;line-height:1.3;padding-left:10px;border-left:1px solid rgba(255,255,255,.18)}
.thermo-chat-title b{display:block;color:#fff;font-size:14px;font-weight:600}
.thermo-chat-title i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2fd573;margin-right:6px;vertical-align:1px}
.thermo-chat-hbtn{background:rgba(255,255,255,.1);border:0;color:#fff;width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:0 0 32px;transition:background-color .2s}
.thermo-chat-hbtn:hover{background:rgba(255,255,255,.22)}.thermo-chat-hbtn svg{width:17px;height:17px}

.thermo-chat-body{position:relative;flex:1;overflow-y:auto;overflow-x:hidden;padding:16px 14px 6px;scroll-behavior:smooth;overscroll-behavior:contain}
.thermo-chat-body::-webkit-scrollbar{width:6px}.thermo-chat-body::-webkit-scrollbar-thumb{background:#c5c9d8;border-radius:3px}
.thermo-chat-down{position:absolute;right:16px;bottom:118px;width:34px;height:34px;border-radius:50%;border:0;background:var(--tc-ink);color:#fff;font-size:17px;cursor:pointer;box-shadow:0 4px 12px rgba(12,10,26,.3);display:none}
.thermo-chat-down.thermo-chat-show{display:block}

/* messages */
.thermo-chat-msg{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:12px;animation:thermo-chat-in .22s ease}
@keyframes thermo-chat-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.thermo-chat-msg-user{align-items:flex-end}
.thermo-chat-bubble{max-width:92%;padding:10px 13px;border-radius:4px 16px 16px 16px;word-wrap:break-word;overflow-wrap:anywhere;background:var(--tc-card);color:var(--tc-text);border:1px solid var(--tc-line)}
.thermo-chat-msg-user .thermo-chat-bubble{background:var(--tc-ink);color:#fff;border-color:var(--tc-ink);border-radius:16px 4px 16px 16px;max-width:82%}
.thermo-chat-time{font-size:11px;color:var(--tc-mute);margin:3px 4px 0}
.thermo-chat-bubble a{color:var(--tc-red-d);font-weight:600;text-decoration:underline;text-underline-offset:2px}
.thermo-chat-bubble ul{margin:6px 0 4px 18px}.thermo-chat-bubble li{margin:3px 0}
.thermo-chat-typing{display:inline-flex;gap:4px;padding:3px 0}
.thermo-chat-typing i{width:7px;height:7px;border-radius:50%;background:#9a99b3;animation:thermo-chat-bounce 1s infinite}
.thermo-chat-typing i:nth-child(2){animation-delay:.15s}.thermo-chat-typing i:nth-child(3){animation-delay:.3s}
@keyframes thermo-chat-bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)}}

/* icon lists (menu + products) */
.thermo-chat-list{margin:10px -4px -4px;display:flex;flex-direction:column}
.thermo-chat-row{display:flex;align-items:center;gap:11px;width:100%;padding:7px 4px;background:none;border:0;border-top:1px solid var(--tc-line);text-align:left;color:var(--tc-text);cursor:pointer}
button.thermo-chat-row:hover .thermo-chat-row-label{color:var(--tc-red-d)}
.thermo-chat-ico{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex:0 0 32px;border-radius:10px;background:rgba(241,0,32,.08);color:var(--tc-red)}
.thermo-chat-row-text{flex:1;min-width:0}
.thermo-chat-row-label{display:block;font-weight:600;font-size:14px}
.thermo-chat-row-sub{display:block;font-size:12px;color:var(--tc-mute);line-height:1.35}
.thermo-chat-row-go{width:16px;height:16px;color:#a2a1b8}
.thermo-chat-row-act{flex:none;display:flex;gap:6px;align-items:center}
.thermo-chat-row-act a,.thermo-chat-row-act button{font-size:12px;font-weight:600;border-radius:14px;padding:5px 11px;cursor:pointer;text-decoration:none;border:1px solid var(--tc-line);background:#fff;color:var(--tc-text)}
.thermo-chat-row-act a{color:var(--tc-text)}
.thermo-chat-row-act a:hover{border-color:var(--tc-ink)}
.thermo-chat-row-act button{background:var(--tc-red);border-color:var(--tc-red);color:#fff}
.thermo-chat-row-act button:hover{background:var(--tc-red-d);border-color:var(--tc-red-d)}

/* quick replies */
.thermo-chat-chips{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 14px}
.thermo-chat-chip{background:#fff;color:var(--tc-text);border:1px solid var(--tc-line);border-radius:20px;padding:7px 14px;font-size:13px;font-weight:600;cursor:pointer;transition:border-color .15s,background-color .15s,color .15s}
.thermo-chat-chip:hover{border-color:var(--tc-ink)}
.thermo-chat-chip-hot{background:var(--tc-red);border-color:var(--tc-red);color:#fff}.thermo-chat-chip-hot:hover{background:var(--tc-red-d);border-color:var(--tc-red-d)}

/* input bar */
.thermo-chat-inputbar{display:flex;gap:8px;padding:10px 12px;background:#fff;border-top:1px solid var(--tc-line);flex:0 0 auto}
.thermo-chat-input{flex:1;min-width:0;background:var(--tc-steel);border:1px solid transparent;border-radius:22px;color:var(--tc-text);padding:10px 16px;font-size:14px;font-family:inherit;outline:0;transition:border-color .15s,background-color .15s}
.thermo-chat-input::placeholder{color:#7d7c96}
.thermo-chat-input:focus,.thermo-chat-input:focus-visible{background:#fff;border-color:var(--tc-ink);outline:0}
.thermo-chat-send{width:42px;height:42px;flex:0 0 42px;border:0;border-radius:50%;background:var(--tc-red);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s}
.thermo-chat-send:hover{background:var(--tc-red-d)}.thermo-chat-send svg{width:18px;height:18px;margin-left:2px}
.thermo-chat-foot{text-align:center;font-size:11px;color:var(--tc-mute);padding:0 8px 9px;background:#fff}

/* forms */
.thermo-chat-form{background:#fff;color:var(--tc-text);border:1px solid var(--tc-line);border-radius:16px;padding:16px;margin:2px 0 14px;animation:thermo-chat-in .22s ease}
.thermo-chat-form h4{font-size:16px;font-weight:700;color:var(--tc-ink)}
.thermo-chat-form p{font-size:12.5px;color:var(--tc-mute);margin:2px 0 12px}
.thermo-chat-field{margin-bottom:11px}
.thermo-chat-field label{display:block;font-size:12.5px;font-weight:600;margin-bottom:4px;color:var(--tc-text)}
.thermo-chat-field input,.thermo-chat-field select,.thermo-chat-field textarea{width:100%;border:1px solid #c9cddc;border-radius:10px;padding:9px 12px;font-size:14px;font-family:inherit;color:var(--tc-text);background:#fff;outline:0;transition:border-color .15s,box-shadow .15s}
.thermo-chat-field textarea{min-height:70px;resize:vertical}
.thermo-chat-field input:focus,.thermo-chat-field select:focus,.thermo-chat-field textarea:focus{outline:0;border-color:var(--tc-ink);box-shadow:0 0 0 3px rgba(12,10,26,.1)}
.thermo-chat-count{font-size:11px;color:var(--tc-mute);text-align:right;margin-top:2px}
.thermo-chat-err{display:none;font-size:12px;color:#c9001a;margin-top:3px}
.thermo-chat-invalid input,.thermo-chat-invalid select{border-color:#c9001a}.thermo-chat-invalid .thermo-chat-err{display:block}
.thermo-chat-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
.thermo-chat-submit{width:100%;border:0;border-radius:12px;background:var(--tc-red);color:#fff;font-size:15px;font-weight:700;padding:12px;cursor:pointer;transition:background-color .2s}
.thermo-chat-submit:hover{background:var(--tc-red-d)}.thermo-chat-submit:disabled{opacity:.6;cursor:default}
.thermo-chat-status{font-size:12.5px;margin-top:9px}.thermo-chat-bad{color:#c9001a}.thermo-chat-status a{color:#c9001a;font-weight:600}

/* ---------- Mobile: floating bottom navbar + full-screen chat ---------- */
.thermo-chat-navbar,.thermo-chat-nav-top{display:none}
@media (max-width:767px){
  body{padding-bottom:86px}
  .thermo-chat-dock,.thermo-chat-nudge{display:none!important}
  .thermo-chat-navbar{display:flex;position:fixed;left:0px;right:0px;bottom:calc(0px + env(safe-area-inset-bottom,0px));z-index:99990;height:85px;background:var(--tc-ink);box-shadow:0 10px 30px rgba(12,10,26,.45)}
  .thermo-chat-nav-item{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:none;border:0;color:#d6d5e6;text-decoration:none;font-size:10.5px;font-weight:500;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .thermo-chat-nav-item:active{color:#fff}
  .thermo-chat-nav-wa{color:#3ddc84}
  .thermo-chat-nav-chat{justify-content:flex-start;color:#fff}
  .thermo-chat-nav-ico{display:flex;align-items:center;justify-content:center;width:54px;height:54px;margin-top:-22px;border-radius:50%;background:var(--tc-red);border:4px solid var(--tc-ink);box-shadow:0 6px 16px rgba(241,0,32,.5);color:#fff}
  .thermo-chat-nav-ico svg{width:24px;height:24px}
  .thermo-chat-nav-chat .thermo-chat-nav-lbl{margin-top:-1px}
  .thermo-chat-nav-top{position:fixed;right:14px;bottom:88px;z-index:99989;width:40px;height:40px;border-radius:50%;border:0;background:var(--tc-ink);color:#fff;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(12,10,26,.4)}
  .thermo-chat-nav-top.thermo-chat-show{display:flex}
  .thermo-chat-window{right:0;left:0;top:0;bottom:0;width:100%;max-width:100%;height:100%;max-height:100%;border-radius:0;transform:translateY(24px);transform-origin:center bottom}
  .thermo-chat-window.thermo-chat-open{transform:none;z-index: 9999999;}
  .thermo-chat-header{padding-top:calc(16px + env(safe-area-inset-top,0px))}
  .thermo-chat-header::before{top:calc(7px + env(safe-area-inset-top,0px))}
  .thermo-chat-inputbar{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  .thermo-chat-foot{display:none}
  .thermo-chat-bubble{max-width:94%}
  .thermo-chat-down{bottom:76px}
  .thermo-chat-input,.thermo-chat-field input,.thermo-chat-field select,.thermo-chat-field textarea{font-size:16px}
}
@media (prefers-reduced-motion:reduce){.thermo-chat-root *{animation:none!important;transition:none!important}}