/* Servant Hands — web chat widget. Brand: primary #8b4513, accent #d97706,
   surface #ffffff, bg #fffbf5, text #1a1208. No dependencies, mobile-first.
   Every path ends in a confirmed callback lead OR a one-tap click-to-call. */

.sh-chat-bubble {
  position: fixed; right: 16px; bottom: 84px; z-index: 9999;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: #8b4513; color: #fff; box-shadow: 0 8px 24px rgba(26,18,8,.28);
  display: grid; place-items: center; padding: 0;
}
.sh-chat-bubble:hover { background: #5c2e0c; }
.sh-chat-bubble .sh-close-x { display: none; }
.sh-chat-bubble.is-open .sh-chat-ico { display: none; }
.sh-chat-bubble.is-open .sh-close-x { display: block; }
.sh-chat-badge {
  position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%;
  background: #d97706; border: 2px solid #fff;
}
.sh-chat-panel {
  position: fixed; right: 16px; bottom: 156px; z-index: 9999;
  width: min(372px, calc(100vw - 24px)); height: min(560px, calc(100dvh - 210px));
  background: #fffbf5; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(26,18,8,.32); border: 1px solid rgba(26,18,8,.08);
  display: flex; flex-direction: column;
  transform: translateY(12px); opacity: 0; pointer-events: none; transition: transform .18s ease, opacity .18s ease;
}
.sh-chat-panel.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.sh-chat-head {
  background: #1a1208; color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 10px;
}
.sh-chat-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #8b4513;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none;
}
.sh-chat-head .t { font-size: 14px; font-weight: 700; line-height: 1.2; }
.sh-chat-head .s { font-size: 12px; color: #f59e0b; display: flex; align-items: center; gap: 5px; }
.sh-chat-head .s .dot { width: 7px; height: 7px; border-radius: 50%; background: #2fd272; display: inline-block; }
.sh-chat-head a {
  margin-left: auto; background: #8b4513; color: #fff; text-decoration: none;
  font-size: 12px; font-weight: 700; padding: 7px 10px; border-radius: 100px; white-space: nowrap;
}
.sh-chat-body {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  background: #fffbf5;
}
.sh-msg { max-width: 85%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.sh-msg.bot { background: #fff; color: #1a1208; border: 1px solid rgba(26,18,8,.1); border-bottom-left-radius: 4px; align-self: flex-start; }
.sh-msg.user { background: #8b4513; color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.sh-msg .fine { font-size: 12px; color: #4a3f35; margin-top: 6px; }
.sh-msg a { color: inherit; }
.sh-msg.user a { color: #fff; text-decoration: underline; }
.sh-chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; max-width: 100%; }
.sh-chip {
  background: #fff; border: 1.5px solid #8b4513; color: #8b4513; border-radius: 100px;
  font-size: 13.5px; font-weight: 600; padding: 8px 13px; cursor: pointer;
}
.sh-chip:hover { background: #fff5eb; }
.sh-inputrow { display: flex; gap: 8px; align-self: stretch; }
.sh-inputrow input {
  flex: 1; border: 1.5px solid rgba(26,18,8,.18); border-radius: 100px; padding: 10px 14px;
  font-size: 15px; background: #fff; color: #1a1208; min-width: 0;
}
.sh-inputrow input:focus { outline: none; border-color: #d97706; }
.sh-send {
  border: none; background: #8b4513; color: #fff; border-radius: 50%; width: 42px; height: 42px;
  cursor: pointer; display: grid; place-items: center; flex: none;
}
.sh-send:disabled { background: #b9c6d8; cursor: default; }
.sh-chat-foot { padding: 8px 12px 10px; border-top: 1px solid rgba(26,18,8,.08); background: #fff; }
.sh-footnote { font-size: 11px; color: #4a3f35; text-align: center; }
.sh-typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.sh-typing i { width: 7px; height: 7px; border-radius: 50%; background: #d4c5b0; animation: shdot 1s infinite; }
.sh-typing i:nth-child(2) { animation-delay: .15s; }
.sh-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes shdot { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
@media (max-width: 480px) {
  .sh-chat-panel { right: 12px; left: 12px; width: auto; bottom: 152px; height: min(520px, calc(100dvh - 190px)); }
  .sh-chat-bubble { right: 12px; }
}
