/* Humus Chatbots. Farben kommen je Bot aus bots/<bot>.json (theme) als CSS-Variablen. */
.hc-wurzel {
  --hc-hintergrund: #F1EEEA; --hc-karte: #FFFFFF; --hc-text: #504644;
  --hc-primaer: #93AD68; --hc-primaer-text: #F1EEEA; --hc-sekundaer: #8CA29F;
  --hc-rahmen: #8CA29F; --hc-akzent: #2988D4; --hc-ring: #2988D4; --hc-radius: 0.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.45; color: var(--hc-text); box-sizing: border-box;
}
.hc-wurzel *, .hc-wurzel *::before, .hc-wurzel *::after { box-sizing: inherit; }

.hc-fenster {
  display: flex; flex-direction: column; background: var(--hc-hintergrund);
  border: 1px solid var(--hc-rahmen); border-radius: calc(var(--hc-radius) * 2); overflow: hidden;
}
.hc-seite .hc-fenster { height: var(--hc-hoehe, 70vh); min-height: 420px; max-width: 760px; margin: 0 auto; }

.hc-kopf { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; background: var(--hc-karte); border-bottom: 1px solid var(--hc-rahmen); }
.hc-logo { display: block; width: auto; }
.hc-name { font-size: 1rem; }

.hc-liste { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.hc-msg { max-width: 85%; padding: .55rem .8rem; border-radius: var(--hc-radius); white-space: normal; word-wrap: break-word; }
.hc-msg p { margin: 0 0 .35rem; } .hc-msg p:last-child { margin-bottom: 0; }
.hc-msg ul { margin: .2rem 0 .35rem 1.1rem; padding: 0; }
.hc-msg a { color: var(--hc-akzent); }
.hc-assistant { align-self: flex-start; background: var(--hc-karte); border: 1px solid var(--hc-rahmen); }
.hc-user { align-self: flex-end; background: var(--hc-primaer); color: var(--hc-primaer-text); white-space: pre-wrap; }
.hc-warte { opacity: .6; }
.hc-fehler { border-color: var(--hc-akzent); }

.hc-buttons { display: flex; flex-wrap: wrap; gap: .4rem; align-self: flex-start; }
.hc-button {
  display: inline-block; padding: .35rem .75rem; border-radius: 999px; text-decoration: none;
  background: var(--hc-sekundaer); color: var(--hc-text); font-size: .9rem; border: 1px solid var(--hc-rahmen);
}
.hc-button:hover, .hc-button:focus-visible { outline: 2px solid var(--hc-ring); outline-offset: 1px; }

.hc-eingabe { display: flex; gap: .4rem; padding: .6rem; background: var(--hc-karte); border-top: 1px solid var(--hc-rahmen); }
.hc-eingabe textarea {
  flex: 1; resize: none; min-height: 2.4rem; max-height: 8rem; padding: .5rem .65rem; font: inherit; color: inherit;
  border: 1px solid var(--hc-rahmen); border-radius: var(--hc-radius); background: #fff;
}
.hc-eingabe textarea:focus { outline: 2px solid var(--hc-ring); outline-offset: 0; }
.hc-senden { min-width: 2.6rem; border: 0; border-radius: var(--hc-radius); background: var(--hc-primaer); color: var(--hc-primaer-text); font-size: 1.1rem; cursor: pointer; }
.hc-senden:disabled { opacity: .5; cursor: wait; }
.hc-hinweis { margin: 0; padding: .35rem .8rem .55rem; font-size: .75rem; opacity: .8; background: var(--hc-karte); }
.hc-hinweis a { color: var(--hc-akzent); }

/* Schwebende Blase */
.hc-blase { position: fixed; right: 20px; bottom: 20px; z-index: 99999; }
.hc-blase .hc-fenster {
  display: none; position: absolute; right: 0; bottom: calc(100% + 12px);
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.hc-blase.hc-offen .hc-fenster { display: flex; }
.hc-knopf {
  display: flex; align-items: center; justify-content: center; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  border-radius: 50%; background: var(--hc-primaer); color: var(--hc-primaer-text); box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.hc-knopf.hc-eckig { border-radius: var(--hc-radius); }
.hc-knopf img { width: 100%; height: 100%; object-fit: cover; }
.hc-knopf:focus-visible { outline: 3px solid var(--hc-ring); outline-offset: 2px; }
.hc-nudge {
  position: absolute; right: 0; bottom: calc(100% + 10px); width: max-content; max-width: min(280px, calc(100vw - 40px));
  padding: .55rem .8rem; background: var(--hc-karte); border: 1px solid var(--hc-rahmen); border-radius: var(--hc-radius);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15); cursor: pointer; font-size: .9rem;
}
.hc-blase.hc-offen .hc-nudge { display: none; }
@media (max-width: 480px) {
  .hc-blase { right: 12px; bottom: 12px; }
  .hc-blase .hc-fenster { width: calc(100vw - 24px); height: calc(100vh - 100px); }
}
