/* Astrocytes lead chatbot. Self-contained: does not depend on the page's Tailwind build. */
.ac-chat {
  --ac-ink: #1b1c1c; --ac-muted: #5d5f4f; --ac-line: #c5c9ad; --ac-paper: #ffffff;
  --ac-soft: #f4f5ee; --ac-lime: #c7f000; --ac-lime-ink: #1b1c1c; --ac-focus: #536600;
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif; color: var(--ac-ink);
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.ac-chat button, .ac-chat input { font: inherit; }
.ac-chat :focus-visible { outline: 3px solid var(--ac-focus); outline-offset: 2px; }
.ac-chat-launcher {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 2px solid var(--ac-ink);
  border-radius: 999px; background: var(--ac-lime); color: var(--ac-lime-ink); font-weight: 700; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ac-ink); transition: transform .15s ease, box-shadow .15s ease;
}
.ac-chat-launcher:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ac-ink); }
.ac-chat.is-open .ac-chat-launcher { display: none; }
.ac-chat-panel {
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: var(--ac-paper); border: 2px solid var(--ac-ink);
  border-radius: 16px; box-shadow: 4px 4px 0 var(--ac-ink); overflow: hidden;
}
.ac-chat-panel[hidden] { display: none; }
.ac-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--ac-lime); border-bottom: 2px solid var(--ac-ink); }
.ac-chat-close { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ac-ink); padding: 0 4px; }
.ac-chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ac-chat-msg { margin: 0; padding: 10px 14px; border-radius: 14px; max-width: 85%; line-height: 1.45; font-size: 15px; white-space: pre-line; }
.ac-chat-msg--bot { align-self: flex-start; background: var(--ac-soft); border-bottom-left-radius: 4px; }
.ac-chat-msg--visitor { align-self: flex-end; background: var(--ac-ink); color: #fff; border-bottom-right-radius: 4px; }
.ac-chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.ac-chat-chips:empty { display: none; }
.ac-chat-chip { border: 1.5px solid var(--ac-ink); background: var(--ac-paper); color: var(--ac-ink); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.ac-chat-chip:hover { background: var(--ac-lime); }
.ac-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--ac-line); }
.ac-chat-form[hidden] { display: none; }
.ac-chat-input { flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid var(--ac-line); border-radius: 10px; font-size: 16px; color: var(--ac-ink); background: var(--ac-paper); }
.ac-chat-send { padding: 10px 16px; border: 2px solid var(--ac-ink); border-radius: 10px; background: var(--ac-ink); color: #fff; font-weight: 700; cursor: pointer; }
.ac-chat-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 480px) {
  .ac-chat { right: 12px; bottom: 12px; left: 12px; align-items: stretch; }
  .ac-chat-launcher { align-self: flex-end; }
  .ac-chat-panel { width: 100%; height: calc(100vh - 24px); }
}
@media (prefers-reduced-motion: reduce) { .ac-chat-launcher { transition: none; } }
