/* A stitched support patch that joins the footer instead of covering its links. */
.chat-dock{min-height:72px;margin-bottom:24px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.chat-dock-caption{font-family:var(--f-display);font-size:clamp(1.1rem,2vw,1.45rem);color:var(--ink)}
.chat-fab{padding:9px 16px 9px 10px;min-height:62px;gap:10px;border:1px solid var(--pink);border-radius:22px 9px 22px 9px;background:var(--card);color:var(--ink);box-shadow:0 8px 30px -12px color-mix(in srgb,var(--pink) 45%,transparent),var(--shadow-sm);isolation:isolate;transition:transform .2s,box-shadow .2s}
.chat-fab::before{content:"";position:absolute;inset:4px;border:1px solid color-mix(in srgb,var(--pink) 48%,transparent);border-radius:17px 5px 17px 5px;pointer-events:none}
.chat-fab:hover{transform:translateY(-3px) rotate(-1deg);box-shadow:0 12px 32px -12px color-mix(in srgb,var(--pink) 60%,transparent)}
.chat-fab:focus-visible{outline:3px solid var(--pink);outline-offset:5px}
.chat-patch-icon{display:grid;place-items:center;color:var(--pink);width:38px;height:42px;flex:none}
.chat-fab .chat-patch-icon svg{width:36px;height:40px}
.chat-fab .t{display:grid;text-align:left;gap:2px;line-height:1.2}
.chat-fab .t b{font-family:var(--f-body);font-size:.88rem;font-weight:800}
.chat-fab .t small{font-size:.72rem;font-weight:500;color:var(--muted)}
.chat-fab .dot{top:-3px;right:4px;width:10px;height:10px;animation:none;border-color:var(--card)}
.chat-fab.has-unread .dot{background:var(--pink);animation:pulse 2s 3}
.footer-chat-docked .chat-fab{position:relative;right:auto;bottom:auto;z-index:1;flex:none}
.footer-chat-docked .chat-tease,.footer-chat-docked .contact-bubble,.footer-chat-docked .cb-patch{display:none!important}
@media(max-width:900px){
  .chat-fab{width:52px;height:56px;min-height:56px;padding:8px;border-radius:19px 8px 19px 8px}
  .chat-fab::before{border-radius:14px 4px 14px 4px}
  .chat-fab .chat-patch-icon{width:32px;height:36px}
  .chat-fab .chat-patch-icon svg{width:30px;height:34px}
  .chat-fab .t{display:none}
  .chat-tease{bottom:calc(154px + env(safe-area-inset-bottom,0px))}
  .chat-dock{min-height:64px;gap:10px}
  .footer-chat-docked .chat-fab{width:auto;padding:9px 14px 9px 10px}
  .footer-chat-docked .chat-fab .t{display:grid}
  .footer-chat-docked .chat-dock-caption{max-width:12ch;font-size:1.1rem}
}
@media(prefers-reduced-motion:reduce){.chat-fab,.chat-fab .dot{transition:none;animation:none!important}.chat-fab:hover{transform:none}}
/* Live chat: status, typing, files, seen, rating */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#chat-status{display:inline-flex;align-items:center;gap:6px}
#chat-status.away::before{background:#F59E0B}
.chat-typing{display:flex;align-items:center;gap:4px;padding:2px 16px 6px;font-size:.76rem;color:var(--muted)}
.chat-typing[hidden]{display:none}
.chat-typing i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:blink 1s infinite}
.chat-typing i:nth-child(2){animation-delay:.15s}.chat-typing i:nth-child(3){animation-delay:.3s}
.chat-typing span{margin-left:6px}
.chat-attach{width:44px;height:44px;flex:none;border-radius:50%;display:grid;place-items:center;color:var(--muted);cursor:pointer;border:1px solid var(--line);background:var(--card)}
.chat-attach:hover{color:var(--pink);border-color:var(--pink)}
.chat-file{display:flex;align-items:center;gap:8px;margin:0 12px 6px;padding:7px 10px;border-radius:12px;background:var(--card2);font-size:.82rem;font-weight:700}
.chat-file[hidden]{display:none}
.chat-file button{margin-left:auto;border:0;background:transparent;color:var(--pink);font-size:1.1rem;cursor:pointer;width:auto;height:auto}
.msg .who{display:block;font-size:.72rem;font-weight:800;color:var(--pink);margin-bottom:2px}
.msg .mfile{display:inline-flex;align-items:center;gap:6px;font-weight:700;text-decoration:underline}
.msg .mfile img{display:block;max-width:200px;max-height:200px;border-radius:12px;margin-top:2px}
.msg.me .mfile{color:#fff}
.chat-seen{align-self:flex-end;font-size:.7rem;color:var(--muted);margin:-4px 4px 0}
.chat-rate{align-self:stretch;display:grid;gap:8px;justify-items:center;padding:12px;border:1px dashed var(--line);border-radius:16px;font-size:.88rem;text-align:center}
.chat-rate div{display:flex;gap:8px}
.chat-rate button{min-width:64px;min-height:40px;border-radius:999px;border:1px solid var(--line);background:var(--card);font-size:1.2rem;cursor:pointer}
.chat-rate button:hover{border-color:var(--pink)}
.chat-note{align-self:center;font-size:.74rem;color:var(--muted);text-align:center;padding:2px 10px}
