/* SerCoder Website · chat.v1.css · ausgelagert aus index.html (Etappe A, 19.11.2026). Neue Fassung = neuer Dateiname. */
  /* ---------- Chat-Overlay ---------- */
  .chat-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(6,6,12,0.7); backdrop-filter: blur(4px);
    display: none; align-items: flex-end; justify-content: center; padding: 20px; }
  .chat-backdrop.open { display: flex; }
  .chat-panel { width: 100%; max-width: 480px; max-height: 82vh; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
    box-shadow: 0 30px 90px rgba(0,0,0,0.6); animation: chatUp .3s cubic-bezier(.2,.7,.2,1); }
  @keyframes chatUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
  .chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
  .chat-head .bot-avatar { width: 28px; height: 32px; }
  .chat-head .grow { flex: 1; }
  .chat-close { background: none; border: none; color: var(--text-dim); font-size: 20px; cursor: pointer; padding: 4px 8px; line-height: 1; }
  .chat-close:hover { color: var(--text); }
  .chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
  .msg { max-width: 85%; border-radius: 12px; padding: 10px 13px; font-size: 13.5px; line-height: 1.55; }
  .msg.bot { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
  .msg.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
  /* Markdown in der Bot-Blase (p4s54). Die Abstaende sind bewusst eng:
     eine Chatblase ist kein Textdokument, und der erste und letzte Block
     duerfen die Blase nicht aufblaehen. */
  .msg.bot p { margin: 0 0 8px; }
  .msg.bot p:last-child { margin-bottom: 0; }
  .msg.bot ul, .msg.bot ol { margin: 4px 0 8px; padding-left: 20px; }
  .msg.bot ul:last-child, .msg.bot ol:last-child { margin-bottom: 0; }
  .msg.bot li { margin-bottom: 3px; }
  .msg.bot li:last-child { margin-bottom: 0; }
  .msg.bot strong { font-weight: 650; }
  .msg.bot code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
                  font-size: .92em; background: rgba(127,127,127,.16);
                  padding: 1px 5px; border-radius: 4px; }
  .msg.typing-msg { display: flex; gap: 4px; align-items: center; }
  .msg.typing-msg span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); animation: blink 1.2s infinite ease-in-out; }
  .msg.typing-msg span:nth-child(2) { animation-delay: .2s; }
  .msg.typing-msg span:nth-child(3) { animation-delay: .4s; }
  /* Einwilligungs-Schaltflaechen (E-76): der Klick IST die Einwilligung. */
  .consent-box { align-self: flex-start; max-width: 85%; display: flex; gap: 8px; flex-wrap: wrap; padding: 2px 0 6px; }
  .consent-box button { font: inherit; font-size: 12.5px; padding: 7px 15px; border-radius: 999px; cursor: pointer;
                        border: 1px solid var(--accent); background: var(--accent); color: #fff; transition: filter .15s; }
  .consent-box button.ghost { background: transparent; color: var(--text-dim); border-color: var(--border); }
  .consent-box button:hover { filter: brightness(1.12); }
  .consent-box button:disabled { opacity: .5; cursor: default; }
  .chat-panel.fallback .consent-box { display: none; }
  .chat-input-row { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }
  .chat-input-row input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text);
    font-family: 'Inter', sans-serif; font-size: 14px; padding: 10px 12px; outline: none; }
  .chat-input-row input:focus { border-color: var(--accent); }
  .chat-note { font-size: 10.5px; color: var(--text-dim); text-align: center; padding: 0 16px 12px; background: var(--surface-2); }

  /* Fallback-Ansicht: greift wenn der Bot deaktiviert oder nicht erreichbar ist */
  .chat-fallback { display: none; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 34px 26px 38px; }
  .chat-panel.fallback .chat-fallback { display: flex; }
  .chat-panel.fallback .chat-messages,
  .chat-panel.fallback .chat-input-row,
  .chat-panel.fallback .chat-note { display: none; }
  .chat-fallback .cf-mark { width: 40px; height: 46px; opacity: .85; filter: drop-shadow(0 0 14px rgba(99,102,241,0.4)); }
  .chat-fallback .cf-mark svg { width: 100%; height: 100%; }
  .chat-fallback p { font-size: 14px; line-height: 1.6; color: var(--text-dim); max-width: 320px; }
  .chat-fallback .cf-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
  .bot-status.offline { color: var(--text-dim); }

