/* Guide chat (assets/js/guides/chat.js): fixed bottom-right on class guide pages, a small "Ask Putricide" pill until
   opened (open by default only at 1860 px+, beside the 1180 px page). Guide pages have no fixed element of their own
   for it to cover. Uses the site's tokens.
   The window never exceeds the viewport: width min(360px, 100vw - 24px), height min(520px, 100vh - 96px). */
body.guide-chat-on { padding-bottom: 88px; }   /* the footer's last line can scroll clear of the bubble */
.guide-chat { position: fixed; right: 12px; bottom: 12px; z-index: 120; font-size: 0.92rem; }
.guide-chat-bubble {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--nag-gold-edge-strong, rgba(215, 167, 79, 0.32)); background: var(--nag-gold-fill, #dda343);
  color: var(--nag-ink, #07090c); font: inherit; font-weight: 750; cursor: pointer; box-shadow: var(--nag-plate-shadow, 0 18px 42px rgba(0, 0, 0, 0.34));
}
.guide-chat-bubble:hover { background: var(--nag-gold-hover, #e7b65f); }
.guide-chat.is-open .guide-chat-bubble { display: none; }
.guide-chat-window { display: none; }
.guide-chat.is-open .guide-chat-window {
  display: flex; flex-direction: column; box-sizing: border-box;
  width: min(360px, calc(100vw - 24px)); max-width: calc(100vw - 24px); height: min(520px, calc(100vh - 96px));
  border: 1px solid var(--nag-edge, rgba(255, 255, 255, 0.095)); border-radius: var(--nag-radius-lg, 8px);
  background: var(--nag-plate-bg, #080a0c); color: var(--nag-text, #f4f2ed); box-shadow: var(--nag-plate-shadow-lift, 0 25px 58px rgba(0, 0, 0, 0.48));
}
.guide-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--nag-hairline, rgba(255, 255, 255, 0.075)); }
.guide-chat-head strong { color: var(--nag-gold-text, #e7b65f); }
.guide-chat-close {
  min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--nag-text-dim, #dbdbdf); font: inherit; font-size: 1.3rem; cursor: pointer;
}
.guide-chat-note { margin: 0; padding: 8px 12px 0; font-size: 0.8rem; color: var(--nag-text-mute, #8a8a90); }
.guide-chat-list { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.guide-chat-msg { max-width: 92%; padding: 8px 10px; border-radius: var(--nag-radius, 5px); white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-chat-you { align-self: flex-end; background: var(--nag-gold-edge, rgba(215, 167, 79, 0.16)); }
.guide-chat-bot { align-self: flex-start; background: var(--nag-panel-raised, rgba(255, 255, 255, 0.028)); border: 1px solid var(--nag-hairline, rgba(255, 255, 255, 0.075)); }
.guide-chat-bot a { color: var(--nag-gold-text, #e7b65f); }
.guide-chat-wait { color: var(--nag-text-mute, #8a8a90); font-style: italic; }
.guide-chat-form { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--nag-hairline, rgba(255, 255, 255, 0.075)); }
.guide-chat-input {
  flex: 1; min-width: 0; resize: none; padding: 8px; border-radius: var(--nag-radius, 5px); font: inherit;
  border: 1px solid var(--nag-edge, rgba(255, 255, 255, 0.095)); background: var(--nag-inset, rgba(0, 0, 0, 0.28)); color: var(--nag-text, #f4f2ed);
}
.guide-chat-send {
  min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--nag-radius, 5px); font: inherit; font-weight: 700; cursor: pointer;
  background: var(--nag-gold-fill, #dda343); color: var(--nag-ink, #07090c);
}
.guide-chat-send:disabled, .guide-chat-input:disabled { opacity: 0.5; cursor: not-allowed; }
.guide-chat-left { margin: 0; padding: 0 12px 8px; font-size: 0.78rem; color: var(--nag-text-mute, #8a8a90); min-height: 1em; }
.guide-chat button:focus-visible, .guide-chat-input:focus-visible { outline: 2px solid var(--nag-focus-ring, rgba(231, 184, 101, 0.92)); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .guide-chat * { transition: none; animation: none; } }
