.chatbot { position: fixed; right: 24px; bottom: 24px; z-index: 20; }
.chatbot button, .chatbot input { font: inherit; }
.chatbot button { cursor: pointer; }
.chatbot-launch, .chatbot-form button {
  border: 0; border-radius: 24px; background: var(--ucd-dark-blue); color: white; padding: 12px 18px; font-weight: 700 !important;
}
.chatbot-launch { box-shadow: 0 5px 20px #04204c30; }
.chatbot-launch span { margin-right: 5px; }
.chatbot-panel {
  position: absolute; right: 0; bottom: calc(100% + 12px); width: min(390px, calc(100vw - 48px));
  height: min(520px, calc(100dvh - 108px)); display: flex; flex-direction: column; background: white;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 42px #04204c38;
}
.chatbot-panel[hidden] { display: none; }
.chatbot-header { display: flex; justify-content: space-between; gap: 10px; background: var(--ucd-darkest-blue); color: white; padding: 14px 18px; }
.chatbot-header h2 { color: inherit; font-size: 1.05rem; margin: 0; }
.chatbot-header p { color: var(--ucd-light-blue); font-size: .8rem; margin: 3px 0 0; }
.chatbot-close { background: transparent; color: white; border: 0; min-width: 32px; align-self: start; font-size: 1.4rem !important; }
.chatbot-conversation { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; font-size: .94rem; }
.chatbot-intro { margin: 0 0 12px; }
.chatbot-prompts { display: grid; justify-items: start; gap: 7px; margin-bottom: 12px; }
.chatbot-prompts button { text-align: left; color: var(--ucd-dark-blue); background: white; border: 1px solid var(--ucd-light-blue); border-radius: 8px; padding: 6px 10px; }
.chatbot-prompts button:hover { background: var(--ucd-lightest-blue); }
.chatbot-messages { display: grid; gap: 10px; }
.chatbot-message { max-width: 90%; border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.chatbot-message p { margin: 0; }
.chatbot-message a { display: block; margin-top: 6px; font-size: .86rem; }
.chatbot-message--assistant { background: var(--ucd-lightest-blue); }
.chatbot-message--user { justify-self: end; background: var(--ucd-dark-blue); color: white; }
.chatbot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chatbot-form input { min-width: 0; flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.chatbot-form button { padding: 8px 14px; }
.chatbot-demo-callout { padding: 20px 24px; margin: 24px 0; background: var(--ucd-lightest-blue); border-left: 4px solid var(--ucd-mid-blue); }
.chatbot-demo-callout p { margin: 0 0 12px; }
@media (max-width: 600px) {
  .chatbot { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .chatbot-panel { width: calc(100vw - 24px); height: min(520px, calc(100dvh - 90px)); }
}
