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

#dtb-chat-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 2147483000;
  width: 60px; height: 60px; border-radius: 999px; border: 0;
  background: var(--lime, #FF7A1A); color: var(--ink, #0B1B3F);
  box-shadow: 0 14px 34px -10px rgba(13,16,9,.45), 0 0 0 1px rgba(224,94,0,.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);
}
#dtb-chat-launcher:hover { transform: scale(1.07) rotate(-4deg); }
#dtb-chat-launcher svg { width: 27px; height: 27px; }
#dtb-chat-launcher .dtb-dot { position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 999px; background: var(--ink, #0B1B3F); border: 2px solid var(--lime, #FF7A1A); display: none; }
#dtb-chat-launcher.dtb-has-new .dtb-dot { display: block; }
body.dtb-mbar-up #dtb-chat-launcher { bottom: calc(92px + env(safe-area-inset-bottom)); }

#dtb-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, #E1E6F0);
  box-shadow: 0 30px 70px -20px rgba(13,16,9,.45);
  display: none; flex-direction: column; overflow: hidden;
  font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--ink, #0B1B3F);
}
#dtb-chat-panel.dtb-open { display: flex; animation: dtbChatIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes dtbChatIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

#dtb-chat-head { background: var(--ink, #0B1B3F); color: #fff; padding: 15px 16px 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; }
#dtb-chat-head .dtb-who { display: flex; align-items: center; gap: 11px; }
#dtb-chat-head .dtb-av { width: 34px; height: 34px; border-radius: 10px; background: var(--lime, #FF7A1A); display: grid; place-items: center; flex: 0 0 auto; }
#dtb-chat-head .dtb-av svg { width: 20px; height: 20px; }
#dtb-chat-head strong { font-family: Poppins, Inter, sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
#dtb-chat-head span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.72); margin-top: 1px; }
#dtb-chat-head span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime, #FF7A1A); box-shadow: 0 0 0 3px rgba(255,122,26,.18); }
#dtb-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; }
#dtb-chat-close:hover { background: rgba(255,255,255,.24); }

#dtb-chat-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; background: var(--bg, #F5F7FB); display: flex; flex-direction: column; gap: 9px; }
.dtb-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; }
.dtb-msg-assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line, #E1E6F0); border-bottom-left-radius: 5px; }
.dtb-msg-user { align-self: flex-end; background: var(--lime, #FF7A1A); color: var(--ink, #0B1B3F); border-bottom-right-radius: 5px; }
.dtb-msg-system { align-self: center; background: var(--ink, #0B1B3F); color: var(--lime, #FF7A1A); font-size: 12px; border-radius: 999px; text-align: center; padding: 6px 12px; }
.dtb-msg a { color: inherit; font-weight: 700; }
.dtb-msg a.dtb-pay { display: inline-block; margin: 4px 0; background: var(--lime, #FF7A1A); color: var(--ink, #0B1B3F); padding: 9px 16px; border-radius: 999px; text-decoration: none; border: 1px solid rgba(13,16,9,.12); }
.dtb-typing { align-self: flex-start; display: flex; gap: 4px; padding: 11px 13px; background: #fff; border: 1px solid var(--line, #E1E6F0); border-radius: 16px; border-bottom-left-radius: 5px; }
.dtb-typing span { width: 6px; height: 6px; border-radius: 999px; background: var(--lime-3, #E05E00); animation: dtbTyping 1.1s infinite ease-in-out; }
.dtb-typing span:nth-child(2) { animation-delay: .15s; }
.dtb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dtbTyping { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

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

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

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

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