/* Leadtime-Assistent (KI): Knopf, Chatfenster, Eingabezeile im Hero. Präfix lc-. Eingebunden über 15.src.html.
   Farben aus den Seiten-Tokens (--bg, --surface, --raised, --ink, --ink2, --muted, --line, --orange), hell und dunkel. */
.lc { position: fixed; right: 20px; bottom: 20px; z-index: 80; font-family: var(--body); color: var(--ink); }
.lc-open { display: flex; align-items: center; gap: 8px; height: 54px; min-width: 54px; padding: 0 18px 0 16px; border: 0; border-radius: 27px; background: var(--ink); color: var(--bg); font: 500 15px var(--body); cursor: pointer; box-shadow: 0 8px 24px rgba(28,27,25,.22); appearance: none; }
.lc-open:hover { opacity: .92; }
.lc-open:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.lc-open-label[hidden] { display: none; }
.lc.on .lc-open { display: none; }
.lc-panel { position: fixed; right: 20px; bottom: 20px; width: 440px; height: min(720px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 48px rgba(28,27,25,.18); overflow: hidden; }
.lc-panel[hidden] { display: none; }
.lc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.lc-head-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-head b { font: var(--dw, 400) 19px/1.15 var(--disp); letter-spacing: var(--dls, -.02em); white-space: nowrap; }
.lc-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lc-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); flex: none; }
.lc-status[data-online="1"] i { background: #17B26A; }
.lc-person { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; white-space: nowrap; }
.lc-person[hidden] { display: none; }
.lc-person img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.lc-person img[hidden] { display: none; }
.lc-close { margin-left: auto; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; appearance: none; }
.lc-close:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.lc.with-person .lc-close { margin-left: 4px; }
.lc-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font: 500 14px var(--body); }
.lc-av-ai { background: var(--bg); }
.lc-av-ai svg { width: 20px; height: 20px; }
.lc-av-human { background: var(--ink); color: var(--bg); }
.lc-av-human img { width: 100%; height: 100%; object-fit: cover; }
.lc-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.5; scroll-behavior: smooth; }
.lc-msg { max-width: 100%; }
.lc-msg.ai, .lc-msg.human { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; max-width: 94%; }
.lc-msg.ai .lc-body { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 11px 14px; }
.lc-msg.human .lc-body { background: #FCD2BF; color: #1C1B19; border-radius: 14px 14px 14px 4px; padding: 11px 14px; }
.lc-msg.user { align-self: flex-end; max-width: 84%; }
.lc-msg.user .lc-body { background: var(--ink); color: var(--bg); border-radius: 14px 14px 4px 14px; padding: 11px 14px; white-space: pre-wrap; }
.lc-msg.ai.err .lc-body { border-color: rgba(251,45,32,.35); }
.lc-msg.sys { align-self: stretch; max-width: none; display: block; background: var(--bg); border: 1px dashed var(--line2); border-radius: 12px; padding: 10px 14px; color: var(--ink2); font-size: 13.5px; }
.lc-msg.sys .lc-av, .lc-msg.sys .lc-ai-label { display: none; }
.lc-msg.sys .lc-body { background: none; border: 0; padding: 0; }
.lc-msg p { margin: 0 0 7px; } .lc-msg p:last-child { margin: 0; }
.lc-msg ul, .lc-msg ol { margin: 0 0 7px; padding-left: 20px; } .lc-msg li { margin: 3px 0; }
.lc-msg a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.lc-name { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.lc-ai-label { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.lc-greeting .lc-ai-label { display: none; }
.lc-notice { font-size: 12.5px; color: var(--muted); }
.lc-notice a { color: var(--muted); }
.lc-msg.typing .lc-body::after { content: ""; display: inline-block; width: 28px; height: 10px; background: radial-gradient(circle 3px, var(--muted) 100%, transparent 0) 0 50% / 10px 10px repeat-x; animation: lc-dots 1s linear infinite; }
@keyframes lc-dots { 0% { opacity: .35 } 50% { opacity: 1 } 100% { opacity: .35 } }
@media (prefers-reduced-motion: reduce) { .lc-msg.typing .lc-body::after { animation: none; } .lc-log { scroll-behavior: auto; } }
.lc-sugg { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 42px; }
.lc-sugg[hidden] { display: none; }
.lc-sugg button { border: 1px solid var(--line2); background: var(--raised); color: var(--ink); border-radius: 999px; padding: 8px 13px; font: 400 14px var(--body); cursor: pointer; text-align: left; appearance: none; }
.lc-sugg button:hover { background: var(--bg); }
.lc-cta { display: flex; gap: 8px; flex-wrap: wrap; padding-left: 42px; }
.lc-btn { display: inline-flex; align-items: center; border: 1px solid var(--line2); background: var(--raised); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 500 14px var(--body); cursor: pointer; text-decoration: none; appearance: none; }
.lc-btn.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lc-btn:focus-visible, .lc-sugg button:focus-visible, .lc-human:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.lc-tools { display: flex; justify-content: flex-end; padding: 0 16px; border-top: 1px solid var(--line); background: var(--surface); }
.lc-human { border: 0; background: none; font: 500 13.5px var(--body); color: var(--ink); cursor: pointer; padding: 9px 0; appearance: none; }
.lc-human:hover { text-decoration: underline; text-underline-offset: 3px; }
.lc-human[hidden], .lc.human .lc-tools, .lc.ho-open .lc-tools, .lc.lc-down .lc-tools { display: none; }
.lc-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px 8px; border-top: 1px solid var(--line); }
.lc-form[hidden] { display: none; }
.lc-form textarea { flex: 1; resize: none; border: 1px solid var(--line2); border-radius: 12px; padding: 11px 13px; font: 400 15px var(--body); color: var(--ink); line-height: 1.4; max-height: 110px; background: var(--raised); }
.lc-form textarea:focus { outline: 2px solid var(--orange); outline-offset: -1px; }
.lc-form textarea:disabled { opacity: .55; }
.lc-form button { height: 44px; min-width: 44px; border: 0; border-radius: 12px; background: var(--orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: 500 14px var(--body); padding: 0 12px; appearance: none; }
.lc-form .lc-stop { background: var(--ink); color: var(--bg); }
.lc-form button:disabled { opacity: .45; cursor: default; }
.lc-form button[hidden] { display: none; }
.lc-foot { margin: 0; padding: 0 16px 12px; font-size: 11px; color: var(--muted); }
.lc-ho { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 9px; font-size: 14.5px; }
.lc-ho[hidden] { display: none; }
.lc-ho b { font: var(--dw, 400) 19px var(--disp); }
.lc-ho p { margin: 0; color: var(--ink2); font-size: 13.5px; }
.lc-ho input { border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; font: 400 15px var(--body); color: var(--ink); background: var(--raised); }
.lc-ho input:focus { outline: 2px solid var(--orange); outline-offset: -1px; }
.lc-ho .lc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lc-ho-err { color: #D92D20 !important; }
.lc-ho-row { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 600px) {
  .lc { right: 16px; bottom: 16px; }
  .lc-panel { inset: 0; width: auto; height: 100dvh; border-radius: 0; border: 0; }
  .lc-status span, .lc-person span { display: none; }
  .lc-msg.ai, .lc-msg.human { max-width: 98%; }
  .lc-msg.user { max-width: 88%; }
}
/* Eingabezeile im Hero (form[data-chat-ask]) */
.lc-ask { margin-top: 26px; max-width: 620px; }
.lc-ask form { display: flex; align-items: center; gap: 8px; background: var(--raised); border: 1px solid var(--line2); border-radius: 14px; padding: 6px 6px 6px 16px; }
.lc-ask form:focus-within { border-color: var(--ink2); }
.lc-ask input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 400 16px var(--body); color: var(--ink); padding: 9px 0; }
.lc-ask button { flex: none; border: 0; border-radius: 10px; background: var(--orange); color: #fff; font: 500 15px var(--body); padding: 10px 16px; cursor: pointer; appearance: none; }
.lc-ask button:focus-visible, .lc-ask input:focus-visible { outline: none; }
.lc-ask form:has(:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }
