/* Branded launcher; remains a direct link if JavaScript is unavailable. */
#d11-chat-launcher {
  position: fixed !important;
  display: block !important;
  z-index: 2147483000;
  padding: 0;
  width: 76px !important;
  height: 114px !important;
  right: max(18px, env(safe-area-inset-right)) !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  left: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  cursor: pointer;
  animation: d11-avatar-float 4.6s ease-in-out infinite !important;
}
#d11-chat-launcher > * { opacity: 0 !important; }
#d11-chat-launcher::before,
#d11-chat-launcher::after {
  transform: none;
  transform-origin: 50% 65%;
}
#d11-chat-launcher::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("../assets/chat-avatar-inward.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 10px rgba(37, 107, 209, .24));
}
#d11-chat-launcher::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("../assets/chat-avatar-blink.svg") center / contain no-repeat;
  opacity: 0;
  animation: d11-eye-blink 4.8s linear infinite;
}
@keyframes d11-eye-blink {
  0%, 42%, 46%, 85%, 89%, 100% { opacity: 0; }
  43%, 45%, 86%, 88% { opacity: 1; }
}
#d11-chat-launcher:hover,
#d11-chat-launcher:focus-within,
#d11-chat-launcher:active { animation-play-state: paused !important; }
#d11-chat-launcher:focus-visible { outline: 2px solid #2d99ff !important; outline-offset: 4px; border-radius: 12px !important; }
#chatbase-bubble-label { display: none !important; }
#chatbase-message-bubbles { bottom: 140px !important; }
@keyframes d11-avatar-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (min-width: 641px) {
  #chatbase-bubble-window { bottom: 142px !important; max-height: calc(100dvh - 166px) !important; }
}
@media (max-width: 640px) {
  #d11-chat-launcher { width: 62px !important; height: 92px !important; right: max(10px, env(safe-area-inset-right)) !important; bottom: max(10px, env(safe-area-inset-bottom)) !important; }
  #chatbase-message-bubbles { bottom: 116px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #d11-chat-launcher { animation: none !important; }
  #d11-chat-launcher::after { animation: none; opacity: 0; }
}


/* One responsive container for direct Chatbase embedding on every device. */
#d11-chat-status[hidden] { display:none !important; }
#d11-chat-status { position:fixed; z-index:2147483001; right:18px; bottom:142px; width:400px; max-width:calc(100vw - 36px); height:640px; max-height:calc(100vh - 160px); max-height:calc(100dvh - 160px); display:flex; flex-direction:column; padding:0; overflow:hidden; box-sizing:border-box; border:1px solid #2963a0; border-radius:18px; background:#0d1828; color:#f3f7fc; box-shadow:0 12px 40px #0008; font:14px/1.4 Arial,sans-serif; }
#d11-chat-status .d11-chat-header { flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; }
#d11-chat-status strong { font-size:16px; }
#d11-chat-dismiss { width:36px; height:36px; flex:none; border:0; background:transparent; color:white; font-size:26px; cursor:pointer; }
#d11-chat-frame-slot { flex:1; min-height:0; background:#fff; }
#d11-chat-frame-slot iframe { display:block; width:100%; height:100%; border:0; }
#d11-chat-status .d11-chat-tools { display:block; flex:none; padding:10px 12px; margin:0; border:0; width:auto; background:#0d1828; }
#d11-chat-status-text { margin:0 0 8px; color:#d1e1f2; font-size:12px; line-height:1.4; }
#d11-chat-status .d11-chat-links { display:flex; flex-wrap:wrap; gap:6px; }
#d11-chat-status .d11-chat-links a, #d11-chat-retry { display:inline-block; margin:0; padding:7px 9px; border:1px solid #376c9f; border-radius:6px; background:#112d4d; color:#e6f3ff; font:12px/1.3 Arial,sans-serif; text-decoration:none; cursor:pointer; }
#d11-chat-status :focus-visible { outline:2px solid #52baff; outline-offset:2px; }
@media(max-width:640px) { #d11-chat-status { right:10px; bottom:112px; width:400px; max-width:calc(100vw - 20px); height:650px; max-height:calc(100vh - 128px); max-height:calc(100dvh - 128px); } }
@media(max-height:550px) { #d11-chat-status { top:8px; bottom:8px; height:auto; max-height:none; right:96px; max-width:calc(100vw - 112px); } }
