.chat-launch, #cima-chat button { font: inherit; cursor: pointer; }
.chat-launch {
  position: fixed;
  z-index: 8;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  width: 78.4px;
  height: 78.4px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
.chat-orb {
  display: block;
  width: 72.8px;
  height: 72.8px;
  object-fit: contain;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .chat-orb { animation: orb-bounce 2.8s ease-in-out infinite; }
  @keyframes orb-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
  }
}
#cima-chat {
  position:fixed; inset:auto max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) auto;
  width:min(400px,calc(100vw - 32px)); max-width:none; height:min(510px,calc(100dvh - 32px));
  max-height:calc(100dvh - 32px); margin:0; padding:0; overflow:hidden; border-radius:24px;
  color:var(--ink); background:var(--bg);
}
#cima-chat[open] { display:flex; flex-direction:column; }
#cima-chat::backdrop { background:#2037381c; backdrop-filter:blur(2px); }
.chat-head { display:flex; align-items:center; justify-content:space-between; padding:18px 22px 15px; border-bottom:1px solid var(--line); }
.chat-brand { font-weight:400; letter-spacing:.18em; font-size:11px; }
#chat-name { margin:4px 0 0; font:400 24px/1.15 var(--reading); }
#chat-close { border:0; background:transparent; color:var(--ink); font-size:25px!important; width:38px; height:38px; border-radius:50%; }
.chat-log { flex:1; min-height:65px; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:12px; padding:18px; }
#cima-chat .chat-message { flex:none; max-width:92%; align-self:flex-start; white-space:pre-wrap; overflow-wrap:anywhere; background:white; color:var(--ink); border-radius:15px 15px 15px 4px; font-size:15px; line-height:1.45; margin:0; padding:10px 14px; }
#cima-chat .outgoing { background:#cef8f6; align-self:flex-end; border-radius:15px 15px 4px 15px; }
.chat-suggestions { display:flex; flex-wrap:wrap; gap:5px; padding:4px 18px 8px; }
.chat-suggestions[hidden] { display:none; }
.chat-suggestions button { background:transparent; border:1px solid #bbc9c8; color:var(--ink); border-radius:14px; padding:5px 9px; font-size:12px!important; }
.chat-feedback { font-size:12px; color:var(--muted); padding:0 18px; }
.chat-compose { display:flex; gap:6px; margin:9px 16px; }
#chat-input { min-width:0; flex:1; padding:11px 13px; border:1px solid #cbd8d7; border-radius:15px; font-size:16px; background:white; }
.chat-compose button { border:0; border-radius:13px; padding:0 13px; color:var(--ink); background:var(--teal); }
.chat-bottom { display:flex; align-items:center; justify-content:space-between; margin:0 16px 12px; }
.chat-bottom button { border:0; background:transparent; color:#405454; padding:5px 2px; font-size:12px!important; }
#cima-chat button { transition:transform .24s,opacity .24s; }
#cima-chat button:active { transform:scale(.97); }
#cima-chat button:disabled { opacity:.42; cursor:default; }
.chat-sr { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
@media(prefers-reduced-motion:no-preference) {
  .chat-message { animation:chat-enter .23s ease-out; }
  @keyframes chat-enter { from {opacity:0; transform:translateY(4px)} to {opacity:1; transform:none} }
}

#cima-chat [hidden] { display: none; }
.chat-setup { margin: 8px 18px; }
.chat-setup p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
.chat-setup button { background: var(--teal); color: var(--ink); border: 0; border-radius: 14px; padding: 10px 16px; }
.chat-feedback:not(:empty) { padding-block: 6px; }

.chat-privacy{font-size:10px;line-height:1.35;color:#82918e;padding:0 18px;margin:5px 0 0}

.chat-typing-dots{display:inline-flex;align-items:center;gap:3px;margin-left:7px;vertical-align:middle}
.chat-typing-dots i{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.3;animation:cima-typing 1.2s ease-in-out infinite}
.chat-typing-dots i:nth-child(2){animation-delay:.2s}
.chat-typing-dots i:nth-child(3){animation-delay:.4s}
@keyframes cima-typing{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.chat-typing-dots i{animation:none;opacity:.65}}
