/* ALUMUNDO – KI-Berater. Dunkles Panel, Akzent aus alumundo.css. */
.ki { font-family: var(--schrift-text, system-ui, sans-serif); color: var(--kontrast-tinte, #EEEDE8); }
.ki--schwebend { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ki:not(.ki--schwebend) { margin: 24px 0; }

.ki-schalter {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px;
  background: var(--kontrast-grund, #0F1012); color: var(--kontrast-tinte, #EEEDE8);
  border: 1px solid var(--kontrast-linie-stark, #3A3D43); border-radius: 999px;
  font: 600 15px/1 var(--schrift-text, system-ui, sans-serif); cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 16, 18, .35);
}
.ki-schalter:hover { border-color: var(--akzent-hell, #8C93FF); }
.ki-punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--akzent-hell, #8C93FF); box-shadow: 0 0 0 4px rgba(140, 147, 255, .2); }

.ki-panel {
  width: min(420px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 110px));
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--kontrast-grund, #0F1012); border: 1px solid var(--kontrast-linie-stark, #3A3D43);
  border-radius: var(--r, 6px); box-shadow: 0 16px 48px rgba(15, 16, 18, .45);
}
.ki-panel[hidden], .ki-hoeren[hidden] { display: none; }
.ki:not(.ki--schwebend) .ki-panel { width: 100%; max-width: 720px; }

.ki-kopf { display: flex; align-items: center; gap: 8px; }
.ki-kopf strong { flex: 1; font-size: 15px; }
.ki-knopf {
  min-width: 44px; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--kontrast-flaeche, #18191C); color: inherit; border: 1px solid var(--kontrast-linie, #2A2C31);
  border-radius: var(--r, 6px); font: 500 14px/1 var(--schrift-text, system-ui, sans-serif); cursor: pointer;
}
.ki-knopf:hover:not(:disabled) { border-color: var(--akzent-hell, #8C93FF); }
.ki-knopf:disabled { opacity: .45; cursor: not-allowed; }
.ki-ton[aria-pressed="false"] { color: var(--kontrast-tinte-blass, #8A8D93); }

.ki-log { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-inline-end: 2px; }
.ki-msg { margin: 0; padding: 10px 12px; border-radius: var(--r, 6px); font-size: 14.5px; line-height: 1.5; max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; }
.ki-msg--assistant { background: var(--kontrast-flaeche, #18191C); border: 1px solid var(--kontrast-linie, #2A2C31); align-self: flex-start; }
.ki-msg--user { background: var(--akzent, #2F3BFF); color: var(--akzent-tinte, #fff); align-self: flex-end; }

.ki-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ki-chip {
  min-height: 36px; padding: 0 12px; background: transparent; color: var(--kontrast-tinte-weich, #A9ABB0);
  border: 1px solid var(--kontrast-linie-stark, #3A3D43); border-radius: 999px; font: 500 13px/1 var(--schrift-text, system-ui, sans-serif); cursor: pointer;
}
.ki-chip:hover { color: var(--kontrast-tinte, #EEEDE8); border-color: var(--akzent-hell, #8C93FF); }

.ki-hoeren { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--akzent-hell, #8C93FF); }
.ki-pegel { display: inline-flex; align-items: center; gap: 3px; height: 22px; }
.ki-pegel i { display: block; width: 4px; height: 6px; border-radius: 2px; background: currentColor; animation: ki-pegel 1s ease-in-out infinite; }
.ki-pegel i:nth-child(2) { animation-delay: .12s; }
.ki-pegel i:nth-child(3) { animation-delay: .24s; }
.ki-pegel i:nth-child(4) { animation-delay: .36s; }
.ki-pegel i:nth-child(5) { animation-delay: .48s; }
@keyframes ki-pegel { 0%, 100% { height: 6px; } 50% { height: 22px; } }

.ki-hinweis { margin: 0; min-height: 0; font-size: 13px; color: var(--kontrast-tinte-weich, #A9ABB0); }
.ki-hinweis:empty { display: none; }

.ki-form { display: flex; gap: 8px; align-items: flex-end; }
.ki-eingabe {
  flex: 1; min-height: 44px; max-height: 120px; resize: vertical; padding: 11px 12px;
  background: var(--kontrast-flaeche, #18191C); color: inherit; border: 1px solid var(--kontrast-linie-stark, #3A3D43);
  border-radius: var(--r, 6px); font: 400 15px/1.4 var(--schrift-text, system-ui, sans-serif);
}
.ki-eingabe::placeholder { color: var(--kontrast-tinte-blass, #8A8D93); }
.ki-mikro--aktiv { background: var(--akzent, #2F3BFF); border-color: var(--akzent, #2F3BFF); color: var(--akzent-tinte, #fff); }
.ki-senden { background: var(--akzent, #2F3BFF); border-color: var(--akzent, #2F3BFF); color: var(--akzent-tinte, #fff); }
.ki-klein { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--kontrast-tinte-blass, #8A8D93); }

.ki :focus-visible { outline: 2px solid var(--akzent-hell, #8C93FF); outline-offset: 2px; }

@media (max-width: 520px) {
  .ki--schwebend { inset-inline-end: 8px; bottom: 8px; }
  .ki-panel { max-height: calc(100vh - 90px); }
}
@media (prefers-reduced-motion: reduce) { .ki-pegel i { animation: none; height: 14px; } }
