/* Terra Hibachi chat widget v3 — refined "noir + gold" launcher, mobile-first */
#th-chat-btn{position:fixed;right:20px;bottom:20px;width:62px;height:62px;border-radius:50%;
  background:radial-gradient(circle at 50% 28%,#2c221a 0%,#171209 55%,#0c0906 100%);
  border:1px solid rgba(201,162,95,.9);cursor:pointer;z-index:99990;display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 30px rgba(0,0,0,.55),inset 0 1px 1px rgba(243,237,225,.09);
  transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
#th-chat-btn:hover{transform:translateY(-2px);border-color:#c9a25f;
  box-shadow:0 14px 34px rgba(0,0,0,.6),0 0 22px rgba(201,162,95,.22),inset 0 1px 1px rgba(243,237,225,.12)}
#th-chat-btn:active{transform:translateY(0) scale(.97)}
#th-chat-btn svg{width:28px;height:28px;fill:none;stroke:#c9a25f;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#th-chat-btn .th-badge{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:10px;
  background:#c9a25f;color:#14110d;font:700 11px/20px Arial,sans-serif;text-align:center;padding:0 5px;display:none}
#th-chat-panel{position:fixed;right:20px;bottom:94px;width:380px;max-width:calc(100vw - 24px);
  height:580px;max-height:calc(100dvh - 130px);background:#14110d;border:1px solid #c9a25f;border-radius:18px;
  z-index:99991;display:none;flex-direction:column;overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.6);
  font-family:'Jost',Arial,sans-serif}
#th-chat-panel.th-open{display:flex;animation:th-rise .22s ease}
@keyframes th-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.th-head{background:#0d0b09;padding:14px 16px;border-bottom:1px solid #3a2c1a;display:flex;align-items:center;gap:10px}
.th-avatar{width:40px;height:40px;border-radius:50%;background:radial-gradient(circle at 50% 28%,#2c221a,#0c0906);
  display:flex;align-items:center;justify-content:center;flex:none;border:1px solid rgba(201,162,95,.9)}
.th-avatar svg{width:22px;height:22px;fill:none;stroke:#c9a25f;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.th-title{font-size:16px;font-weight:600;color:#f3ede1;letter-spacing:.3px}
.th-status{font-size:12px;color:#9db89a;display:flex;align-items:center;gap:6px;margin-top:2px}
.th-status .dot{width:8px;height:8px;border-radius:50%;background:#4caf50;display:inline-block}
.th-close{margin-left:auto;background:none;border:none;color:#a89d8b;font-size:22px;cursor:pointer;line-height:1;padding:4px}
#th-chat-msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;-webkit-overflow-scrolling:touch}
.th-msg{max-width:82%;padding:10px 13px;border-radius:14px;font-size:14.5px;line-height:1.55;word-wrap:break-word}
.th-bot{background:#241c12;color:#f3ede1;border:1px solid #3a2c1a;border-bottom-left-radius:4px;align-self:flex-start}
.th-bot a{color:#c9a25f}
.th-user{background:#c9a25f;color:#14110d;border-bottom-right-radius:4px;align-self:flex-end;font-weight:500}
.th-typing{align-self:flex-start;background:#241c12;border:1px solid #3a2c1a;border-radius:14px;padding:12px 16px;display:flex;gap:5px}
.th-typing span{width:7px;height:7px;border-radius:50%;background:#c9a25f;animation:th-blink 1.2s infinite}
.th-typing span:nth-child(2){animation-delay:.2s}.th-typing span:nth-child(3){animation-delay:.4s}
@keyframes th-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}
.th-chips{display:flex;flex-wrap:wrap;gap:8px;padding:4px 14px 10px}
.th-chip{background:transparent;border:1px solid #c9a25f;color:#c9a25f;border-radius:999px;
  font-size:13px;padding:7px 13px;cursor:pointer;font-family:inherit;transition:background .15s}
.th-chip:hover{background:rgba(201,162,95,.15)}
.th-lead{background:#1a1510;border:1px solid #c9a25f;border-radius:14px;padding:14px;align-self:stretch}
.th-lead h4{margin:0 0 4px;color:#f3ede1;font-size:15px}
.th-lead p{margin:0 0 10px;color:#a89d8b;font-size:13px;line-height:1.5}
.th-lead input,.th-lead textarea{width:100%;box-sizing:border-box;background:#0d0b09;border:1px solid #3a2c1a;
  border-radius:10px;color:#f3ede1;font-size:14px;padding:10px 12px;margin-bottom:8px;font-family:inherit}
.th-lead input:focus,.th-lead textarea:focus{outline:none;border-color:#c9a25f}
.th-lead textarea{resize:vertical;min-height:56px}
.th-lead .th-hp{position:absolute;left:-9999px;opacity:0;height:0}
.th-lead button{width:100%;background:linear-gradient(180deg,#c9120c,#8f0a06);color:#fff;border:none;
  border-radius:999px;font-size:15px;font-weight:600;padding:12px;cursor:pointer;font-family:inherit}
.th-lead button:disabled{opacity:.6;cursor:default}
.th-lead .th-err{color:#e88;font-size:12.5px;margin:-4px 0 8px;display:none}
.th-inputbar{display:flex;gap:8px;padding:12px 14px;border-top:1px solid #3a2c1a;background:#0d0b09}
.th-inputbar input{flex:1;background:#1a1510;border:1px solid #3a2c1a;border-radius:999px;color:#f3ede1;
  font-size:14.5px;padding:11px 15px;font-family:inherit}
.th-inputbar input:focus{outline:none;border-color:#c9a25f}
.th-inputbar button{width:44px;height:44px;flex:none;border-radius:50%;border:none;cursor:pointer;
  background:linear-gradient(180deg,#c9120c,#8f0a06);display:flex;align-items:center;justify-content:center}
.th-inputbar button svg{width:20px;height:20px;fill:#fff}
@media (max-width:768px){
  /* sticky bottom CTA bar (~66px) is visible on mobile: float the launcher above it */
  #th-chat-btn{right:14px;bottom:calc(82px + env(safe-area-inset-bottom,0px))}
  #th-chat-panel{right:12px;bottom:calc(152px + env(safe-area-inset-bottom,0px))}
}
@media (max-width:480px){
  #th-chat-btn{width:58px;height:58px}
  #th-chat-panel{height:66dvh;max-height:calc(100dvh - 176px)}
}
/* proactive teaser: teaches guests the button is a chat assistant */
#th-chat-teaser{position:fixed;right:20px;bottom:94px;z-index:99989;max-width:250px;
  background:#14110d;border:1px solid rgba(201,162,95,.85);border-radius:14px;border-bottom-right-radius:4px;
  padding:11px 32px 11px 14px;color:#f3ede1;font-size:13.5px;line-height:1.5;font-family:'Jost',Arial,sans-serif;
  box-shadow:0 12px 34px rgba(0,0,0,.55);cursor:pointer;display:none}
#th-chat-teaser.th-show{display:block;animation:th-teaser-in .35s ease}
@keyframes th-teaser-in{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
#th-chat-teaser .th-teaser-x{position:absolute;top:4px;right:6px;background:none;border:none;color:#a89d8b;
  font-size:16px;cursor:pointer;line-height:1;padding:4px}
#th-chat-teaser .th-teaser-x:hover{color:#f3ede1}
#th-chat-teaser b{color:#c9a25f;font-weight:600}
@media (max-width:768px){
  #th-chat-teaser{right:14px;bottom:calc(152px + env(safe-area-inset-bottom,0px))}
}
