/* webentwickler.pro - KI-Assistent widget (ba-chat-* prefix, synced 2026-04-20)
   Atom One Dark palette (see :root below).
   Height fix: opens at min(500px, 50vh), expands up to 80vh with scroll.
*/
:root { --ba-green: #98c379; --ba-green-dim: #7aa862; --ba-bg: #23272e; --ba-bg-2: #2c313a; --ba-bg-3: #353b45; --ba-text: #abb2bf; --ba-text-2: #d7dae0; --ba-accent: #d18c49; --ba-border: rgba(152, 195, 121, 0.25); }
.ba-chat-btn { position: fixed; bottom: 20px; right: 20px; z-index: 10000; display: inline-flex; align-items: center; gap: 10px; background: var(--ba-green); color: rgb(255, 255, 255); border-width: medium; border-style: none; border-color: currentcolor; border-image: initial; border-radius: 9999px; padding: 12px 20px; font-family: Ubuntu, system-ui, -apple-system, sans-serif; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; box-shadow: rgba(0, 0, 0, 0.35) 0px 10px 24px, rgba(152, 195, 121, 0.45) 0px 0px 0px 0px; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; animation: 2.4s ease-in-out 0s infinite normal none running ba-glow-pulse; }
.ba-chat-btn:hover { background: var(--ba-green-dim); transform: translateY(-1px); box-shadow: rgba(0, 0, 0, 0.45) 0px 14px 28px; }
.ba-chat-btn .ba-chat-btn-logo { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
@keyframes ba-glow-pulse { 
  0%, 100% { box-shadow: rgba(0, 0, 0, 0.35) 0px 10px 24px, rgba(152, 195, 121, 0.45) 0px 0px 0px 0px; }
  50% { box-shadow: rgba(0, 0, 0, 0.35) 0px 10px 24px, rgba(152, 195, 121, 0) 0px 0px 0px 10px; }
}
@keyframes ba-slide-in { 
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0px); }
}
.ba-chat-panel { position: fixed; bottom: 84px; right: 20px; z-index: 10000; width: min(400px, -40px + 100vw); height: min(500px, 50vh); max-height: 80vh; background: var(--ba-bg); color: var(--ba-text); border: 1px solid var(--ba-green); border-radius: 18px; box-shadow: rgba(0, 0, 0, 0.5) 0px 24px 48px, rgba(0, 0, 0, 0.2) 0px 0px 0px 1px; display: none; flex-direction: column; overflow: hidden; font-family: Ubuntu, system-ui, -apple-system, sans-serif; animation: 0.25s ease-out 0s 1 normal none running ba-slide-in; }
.ba-chat-panel.open { display: flex; }
.ba-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--ba-bg-2); padding: 14px 16px; border-bottom: 1px solid var(--ba-border); flex-shrink: 0; }
.ba-chat-header-left { display: flex; align-items: center; gap: 12px; min-width: 0px; }
.ba-chat-header-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(152, 195, 121, 0.15); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ba-chat-header-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0px; }
.ba-chat-header-text .ba-chat-title { color: rgb(255, 255, 255); font-size: 15px; font-weight: 700; letter-spacing: 0.1px; }
.ba-chat-header-text .ba-chat-subtitle { color: var(--ba-green); font-size: 12px; font-weight: 500; margin-top: 2px; font-family: "Anonymous Pro", "Ubuntu Mono", monospace; letter-spacing: 0.2px; }
.ba-chat-close { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--ba-text); background: transparent; border-width: medium; border-style: none; border-color: currentcolor; border-image: initial; border-radius: 8px; padding: 0px; cursor: pointer; transition: color 0.15s, background 0.15s; flex-shrink: 0; }
.ba-chat-close:hover { color: var(--ba-text-2); background: var(--ba-bg-3); }
.ba-chat-messages { flex: 1 1 0%; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; background: var(--ba-bg); color: var(--ba-text); scrollbar-width: thin; scrollbar-color: var(--ba-bg-3) transparent; }
.ba-chat-messages::-webkit-scrollbar { width: 6px; }
.ba-chat-messages::-webkit-scrollbar-thumb { background: var(--ba-bg-3); border-radius: 3px; }
.ba-chat-row { display: flex; width: 100%; }
.ba-chat-row-bot { justify-content: flex-start; }
.ba-chat-row-user { justify-content: flex-end; }
.ba-msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; word-break: break-word; font-size: 14px; line-height: 1.5; }
.ba-msg-bot { background: var(--ba-bg-2); color: var(--ba-text-2); border: 1px solid rgba(255, 255, 255, 0.04); border-bottom-left-radius: 4px; }
.ba-msg-user { background: var(--ba-green); color: var(--ba-bg); border-bottom-right-radius: 4px; font-weight: 500; }
.ba-msg-bot a { color: var(--ba-green); text-decoration: underline; text-underline-offset: 2px; }
.ba-msg-bot a:hover { color: var(--ba-accent); }
.ba-msg-bot strong { color: var(--ba-text-2); font-weight: 600; }
.ba-msg-bot em { color: var(--ba-accent); font-style: italic; }
.ba-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; }
.ba-typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ba-green); opacity: 0.5; animation: 1.2s ease-in-out 0s infinite normal none running ba-dot-bounce; }
.ba-typing span:nth-child(2) { animation-delay: 0.15s; }
.ba-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ba-dot-bounce { 
  0%, 60%, 100% { transform: translateY(0px); opacity: 0.35; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.ba-chat-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--ba-bg-2); border-top: 1px solid var(--ba-border); flex-shrink: 0; }
.ba-chat-input input { flex: 1 1 0%; background: var(--ba-bg); color: var(--ba-text-2); border: 1px solid var(--ba-bg-3); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: Ubuntu, system-ui, -apple-system, sans-serif; outline: none; transition: border-color 0.15s; }
.ba-chat-input input::placeholder { color: rgb(107, 113, 124); }
.ba-chat-input input:focus { border-color: var(--ba-green); }
.ba-chat-input input:disabled { opacity: 0.5; }
.ba-chat-input button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: var(--ba-green); color: var(--ba-bg); border-width: medium; border-style: none; border-color: currentcolor; border-image: initial; border-radius: 10px; cursor: pointer; transition: background 0.15s, transform 0.1s, opacity 0.15s; flex-shrink: 0; }
.ba-chat-input button:hover { background: var(--ba-green-dim); transform: translateY(-1px); }
.ba-chat-input button:active { transform: translateY(0px); }
.ba-chat-input button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.ba-chat-brand-footer { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; background: var(--ba-bg-2); border-top: 1px solid var(--ba-border); color: var(--ba-text); font-size: 11px; line-height: 1; text-decoration: none; flex-shrink: 0; transition: background 0.15s, color 0.15s; }
.ba-chat-brand-footer:hover { background: var(--ba-bg-3); color: var(--ba-text-2); }
.ba-chat-brand-footer svg { flex-shrink: 0; }
.ba-chat-brand-footer strong { color: var(--ba-green); font-weight: 600; }
@media (max-width: 480px) {
  .ba-chat-btn { bottom: 16px; right: 16px; padding: 10px 16px; font-size: 14px; }
  .ba-chat-panel { bottom: 76px; right: 16px; left: 16px; width: auto; height: min(500px, calc(100vh - 96px)); max-height: calc(100vh - 96px); }
}