


.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: flex; align-items: center; gap: 10px; padding: 9px 18px 9px 10px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--brand-600), var(--brand)); color: #fff; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 16px 34px -14px rgba(31, 77, 58, .55), 0 2px 6px rgba(24, 36, 32, .12); transition: transform .18s ease, box-shadow .18s ease; }
.chat-fab::before { content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid rgba(196, 112, 58, .5); animation: chatpulse 2.6s ease-out infinite; pointer-events: none; }
@keyframes chatpulse { 0% { transform: scale(.97); opacity: .9 } 70% { transform: scale(1.12); opacity: 0 } 100% { transform: scale(1.12); opacity: 0 } }
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(31, 77, 58, .6), 0 2px 6px rgba(24, 36, 32, .14); }
.chat-fab-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.chat-fab-icon svg { width: 20px; height: 20px; }
.chat-fab-text { display: flex; flex-direction: column; line-height: 1.25; }
.chat-fab-text strong { font-size: 14.5px; font-weight: 700; letter-spacing: .2px; }
.chat-fab-text em { font-style: normal; font-size: 11.5px; opacity: .8; margin-top: 2px; }
.chat-panel { position: fixed; right: 22px; bottom: 88px; z-index: 71; width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 130px); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.chat-head strong { font-size: 14px; }
.chat-head span { font-size: 12px; color: var(--ink-3); flex: 1; min-width: 0; }
.chat-close { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 0 2px; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.chat-msg { max-width: 86%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.chat-msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.bot a { color: var(--brand, #b4521f); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.chat-msg.bot a:hover { opacity: .82; }
.chat-msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.sys { align-self: stretch; max-width: 100%; background: var(--clay-50); border: 1px solid #f0d9c8; font-size: 12.5px; color: var(--ink-2); }
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; background: var(--card); }
.chat-quick button { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 12.5px; padding: 6px 11px; border-radius: 999px; cursor: pointer; }
.chat-quick button:hover { border-color: var(--ink-3); color: var(--ink); }
.chat-sug { align-self: stretch; display: flex; flex-wrap: wrap; gap: 6px; margin: -1px 0 3px; }
.chat-sug a, .chat-sug button { border: 1px solid var(--clay); background: #fff; color: var(--clay); font-size: 12.5px; line-height: 1.4; padding: 6px 11px; border-radius: 999px; cursor: pointer; text-decoration: none; font-family: inherit; }
.chat-sug a:hover, .chat-sug button:hover { background: var(--clay-50); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--paper); }
.chat-input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13.5px; font-family: inherit; background: #fff; }
.chat-input:focus { outline: 2px solid var(--brand-50); border-color: var(--ink-3); }
.chat-foot { padding: 8px 12px 11px; font-size: 12px; color: var(--ink-3); text-align: center; background: var(--paper); }
.chat-foot a { color: var(--ink-2); text-decoration: underline; }
.chat-dots span { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: var(--ink-3); animation: chatblink 1.1s infinite; }
.chat-dots span:nth-child(2) { animation-delay: .18s; }
.chat-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes chatblink { 0%, 60%, 100% { opacity: .25 } 30% { opacity: 1 } }
.chat-dots { display: flex; align-items: center; gap: 4px; }
.chat-dots::before {
  content: '';
  width: 11px; height: 11px; margin-right: 2px;
  border: 2px solid var(--line);
  border-top-color: var(--ink-3);
  border-radius: 50%;
  animation: chatspin .8s linear infinite;
}
@keyframes chatspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .chat-fab::before { animation: none; }
}
@media (max-width: 560px) {
  .chat-panel { right: 10px; left: 10px; bottom: 84px; width: auto; height: 66vh; }
  .chat-fab { right: 12px; bottom: 12px; gap: 8px; padding: 8px 15px 8px 8px; }
  .chat-fab-icon { width: 30px; height: 30px; }
  .chat-fab-text strong { font-size: 13.5px; }
  .chat-fab-text em { font-size: 11px; }
}


.chat-widget{
  --brand-600: var(--brand2);
  --brand-50:  var(--acc3);
  --card:      var(--bg);
  --paper:     var(--bg2);
  --radius:    var(--rd);
  --radius-sm: var(--rd-s);
  --shadow-lg: var(--sh3);
  --ink-2:     var(--ink2);
  --ink-3:     var(--ink3);
  --clay:      var(--acc);
  --clay-50:   var(--acc2);
}


.fabs{ bottom: calc(var(--s8) + 66px); }
@media (max-width:860px){
  .fabs{ bottom: calc(var(--s5) + 62px); }
}
