/* UK Databases website chat (same widget as CleanMyDatabase / DataMembership, in UKD colours) */
#ukb-chat-launcher, #ukb-chat-panel, #ukb-chat-panel * { box-sizing: border-box; }

#ukb-chat-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483000;
  width: 60px; height: 60px; border-radius: 999px; border: 0;
  background: var(--lime, #C9F51D); color: var(--ink, #0D1009);
  box-shadow: 0 14px 34px -10px rgba(13,16,9,.45), 0 0 0 1px rgba(155,203,18,.6) inset;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), bottom .35s cubic-bezier(.2,.8,.2,1);
}
#ukb-chat-launcher:hover { transform: scale(1.07) rotate(-4deg); }
#ukb-chat-launcher svg { width: 27px; height: 27px; }
#ukb-chat-launcher .ukb-dot { position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 999px; background: var(--ink, #0D1009); border: 2px solid var(--lime, #C9F51D); display: none; }
#ukb-chat-launcher.ukb-has-new .ukb-dot { display: block; }
body.ukb-mbar-up #ukb-chat-launcher { bottom: calc(92px + env(safe-area-inset-bottom)); }

#ukb-chat-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 2147483000;
  width: 372px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 140px);
  background: #fff; border-radius: 22px; border: 1px solid var(--line, #E2E5D9);
  box-shadow: 0 30px 70px -20px rgba(13,16,9,.45);
  display: none; flex-direction: column; overflow: hidden;
  font-family: Geist, system-ui, -apple-system, sans-serif; color: var(--ink, #0D1009);
}
#ukb-chat-panel.ukb-open { display: flex; animation: ukbChatIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes ukbChatIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

#ukb-chat-head { background: var(--ink, #0D1009); color: #fff; padding: 15px 16px 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
#ukb-chat-head .ukb-who { display: flex; align-items: center; gap: 11px; }
#ukb-chat-head .ukb-av { width: 34px; height: 34px; border-radius: 10px; background: var(--lime, #C9F51D); display: grid; place-items: center; flex: 0 0 auto; }
#ukb-chat-head .ukb-av svg { width: 20px; height: 20px; }
#ukb-chat-head strong { font-family: Poppins, Geist, sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
#ukb-chat-head span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.72); margin-top: 1px; }
#ukb-chat-head span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime, #C9F51D); box-shadow: 0 0 0 3px rgba(201,245,29,.18); }
#ukb-chat-close { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 999px; cursor: pointer; font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; }
#ukb-chat-close:hover { background: rgba(255,255,255,.24); }

#ukb-chat-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; background: var(--bg, #F4F5EF); display: flex; flex-direction: column; gap: 9px; }
.ukb-msg { max-width: 85%; padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.ukb-msg-assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line, #E2E5D9); border-bottom-left-radius: 5px; }
.ukb-msg-user { align-self: flex-end; background: var(--lime, #C9F51D); color: var(--ink, #0D1009); border-bottom-right-radius: 5px; }
.ukb-msg-system { align-self: center; background: var(--ink, #0D1009); color: var(--lime, #C9F51D); font-size: 12px; border-radius: 999px; text-align: center; padding: 6px 12px; }
.ukb-msg a { color: inherit; font-weight: 700; }
.ukb-msg a.ukb-pay { display: inline-block; margin: 4px 0; background: var(--lime, #C9F51D); color: var(--ink, #0D1009); padding: 9px 16px; border-radius: 999px; text-decoration: none; border: 1px solid rgba(13,16,9,.12); }
.ukb-typing { align-self: flex-start; display: flex; gap: 4px; padding: 11px 13px; background: #fff; border: 1px solid var(--line, #E2E5D9); border-radius: 16px; border-bottom-left-radius: 5px; }
.ukb-typing span { width: 6px; height: 6px; border-radius: 999px; background: var(--lime-3, #9BCB12); animation: ukbTyping 1.1s infinite ease-in-out; }
.ukb-typing span:nth-child(2) { animation-delay: .15s; }
.ukb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ukbTyping { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

#ukb-chat-form { padding: 20px 18px; overflow-y: auto; background: #fff; }
#ukb-chat-form h3 { margin: 0 0 4px; font-family: Poppins, Geist, sans-serif; font-size: 18px; letter-spacing: -.01em; }
#ukb-chat-form p { margin: 0 0 16px; font-size: 13.5px; color: var(--muted, #676D61); }
#ukb-chat-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
#ukb-chat-form .ukb-field { margin-bottom: 12px; }
#ukb-chat-form input { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line, #E2E5D9); font-size: 14px; font-family: inherit; background: var(--bg, #F4F5EF); color: inherit; }
#ukb-chat-form input:focus, #ukb-chat-input:focus { outline: 2px solid var(--lime-2, #B8E60C); outline-offset: 1px; }
#ukb-chat-form button { width: 100%; padding: 12px; border-radius: 999px; border: 0; background: var(--lime, #C9F51D); color: var(--ink, #0D1009); font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 4px; font-family: inherit; }
#ukb-chat-form button:hover { background: var(--lime-2, #B8E60C); }
#ukb-chat-form .ukb-error { color: #A12C1C; font-size: 12.5px; margin: 0 0 10px; display: none; }
#ukb-chat-form .ukb-error.ukb-show { display: block; }

#ukb-chat-inputrow { flex: 0 0 auto; border-top: 1px solid var(--line, #E2E5D9); padding: 10px; display: flex; gap: 8px; background: #fff; }
#ukb-chat-input { flex: 1; resize: none; border: 1px solid var(--line, #E2E5D9); border-radius: 14px; padding: 9px 12px; font-size: 14px; font-family: inherit; max-height: 90px; min-height: 40px; background: var(--bg, #F4F5EF); color: inherit; }
#ukb-chat-send { border: 0; background: var(--ink, #0D1009); color: var(--lime, #C9F51D); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
#ukb-chat-send:disabled { opacity: .45; cursor: default; }

@media (max-width: 480px) {
  #ukb-chat-panel { right: 12px; left: 12px; width: auto; bottom: 84px; height: calc(100vh - 110px); max-height: none; }
  #ukb-chat-launcher { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 56px; }
}

/* A real person (Gary) replying in the chat */
.ukb-msg-agent { align-self: flex-start; background: #F3FBD6; border: 1px solid #C9F51D; color: var(--ink, #0D1009); border-bottom-left-radius: 5px; }
.ukb-msg-who { display: block; font-size: 11px; font-weight: 700; color: #4A5A07; margin-bottom: 2px; }
