/* Beez AI widget. Everything is scoped to #beez-ai so the theme is not affected. */
#beez-ai { font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-variant-numeric: lining-nums; }
#beez-ai *, #beez-ai *::before, #beez-ai *::after { box-sizing: border-box; }
#beez-ai [hidden] { display: none !important; }

#beez-ai button, #beez-ai a.bai-chip {
  font-family: inherit; line-height: 1.35; text-transform: none; letter-spacing: normal;
  cursor: pointer; width: auto; min-height: 0; margin: 0; box-shadow: none; text-decoration: none;
}
#beez-ai button:disabled { opacity: .45; cursor: default; }
#beez-ai button:focus-visible, #beez-ai a:focus-visible, #beez-ai input:focus-visible { outline: 2px solid #101018; outline-offset: 2px; }

#beez-ai .bai-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 9995;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 20px; border: 2px solid #fff; border-radius: 40px;
  background: #E8184B; color: #fff; font-size: 15px; font-weight: 800;
  box-shadow: 0 10px 28px rgba(232,24,75,.42);
}
#beez-ai .bai-launcher:hover { background: #c9103e; color: #fff; }
#beez-ai .bai-launcher-ico { font-size: 20px; line-height: 1; }

#beez-ai .bai-panel {
  position: fixed; right: 20px; bottom: 88px; z-index: 10000;
  display: flex; flex-direction: column;
  width: 380px; height: min(620px, calc(100vh - 120px));
  overflow: hidden; border-radius: 22px; background: #fff; color: #101018;
  box-shadow: 0 24px 60px rgba(16,16,24,.24); text-align: left;
}

#beez-ai .bai-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: linear-gradient(135deg, #ff3d6e, #E8184B 55%, #b80f3a); color: #fff; }
#beez-ai .bai-title { flex: 1; display: flex; flex-direction: column; }
#beez-ai .bai-title strong { font-size: 17px; font-weight: 800; color: #fff; }
#beez-ai .bai-title span { font-size: 12px; opacity: .9; }
#beez-ai .bai-head-btn { padding: 6px 12px; border: 0; border-radius: 20px; background: rgba(255,255,255,.18); color: #fff; font-size: 12px; font-weight: 700; }
#beez-ai .bai-head-btn:hover { background: rgba(255,255,255,.3); color: #fff; }
#beez-ai .bai-close { width: 32px; height: 32px; padding: 0; font-size: 22px; line-height: 1; }

#beez-ai .bai-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px; background: #f7f7f9; }
#beez-ai .bai-log { display: flex; flex-direction: column; gap: 10px; }
#beez-ai .bai-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
#beez-ai .bai-bot { align-self: flex-start; background: #fff; border: 1px solid #ececf0; border-bottom-left-radius: 5px; }
#beez-ai .bai-bot a { color: #E8184B; text-decoration: underline; }
#beez-ai .bai-me { align-self: flex-end; background: #E8184B; color: #fff; border-bottom-right-radius: 5px; }
#beez-ai .bai-typing { animation: baiBlink 1s ease-in-out infinite alternate; }
@keyframes baiBlink { from { opacity: .35; } to { opacity: 1; } }

#beez-ai .bai-plans { display: flex; flex-direction: column; gap: 8px; }
#beez-ai .bai-plan {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 13px 14px; border: 1px solid #ececf0; border-radius: 14px; background: #fff;
  color: #101018; font-size: 12.5px; line-height: 1.45; text-decoration: none;
}
#beez-ai .bai-plan:hover { border-color: #E8184B; color: #101018; text-decoration: none; }
#beez-ai .bai-plan strong { font-size: 14px; }
#beez-ai .bai-plan b { font-size: 16px; color: #E8184B; }
#beez-ai .bai-plan-go { margin-top: 4px; font-weight: 700; color: #E8184B; }
#beez-ai .bai-tag { margin-bottom: 4px; padding: 2px 9px; border-radius: 20px; background: #E8184B; color: #fff; font-size: 10.5px; font-weight: 700; }

#beez-ai .bai-tag-alt { background: #ffe9ef; color: #b80f3a; }

#beez-ai .bai-guide { padding: 13px 14px; border: 1px solid #ececf0; border-radius: 14px; background: #fff; font-size: 13.5px; line-height: 1.5; }
#beez-ai .bai-guide strong { font-size: 14px; }
#beez-ai .bai-guide ol { margin: 10px 0 0; padding: 0 0 0 20px; list-style: decimal; }
#beez-ai .bai-guide li { margin: 0 0 12px; padding: 0; list-style: decimal; }
#beez-ai .bai-guide img { display: block; max-width: 78%; height: auto; margin: 8px 0 0; border: 1px solid #ececf0; border-radius: 12px; }

#beez-ai .bai-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
#beez-ai .bai-chip { display: inline-block; padding: 9px 14px; border: 1.5px solid #f3b4c4; border-radius: 24px; background: #fff; color: #c30f3c; font-size: 13px; font-weight: 700; text-align: left; }
#beez-ai .bai-chip:hover:not(:disabled) { background: #fff0f4; color: #c30f3c; }
#beez-ai .bai-chip[aria-pressed="true"], #beez-ai .bai-chip.bai-primary { background: #E8184B; border-color: #E8184B; color: #fff; }

#beez-ai .bai-form { display: flex; gap: 8px; margin: 0; padding: 10px 12px 4px; border-top: 1px solid #ececf0; background: #fff; }
#beez-ai .bai-input {
  flex: 1; min-width: 0; width: auto; height: 42px; margin: 0; padding: 0 14px;
  border: 1.5px solid #e0e0e6; border-radius: 24px; background: #fff; color: #101018;
  font-family: inherit; font-size: 16px; /* 16px stops iPhone from zooming in */
}
#beez-ai .bai-send { padding: 0 16px; border: 0; border-radius: 24px; background: #E8184B; color: #fff; font-size: 13px; font-weight: 800; }
#beez-ai .bai-note { padding: 5px 14px 9px; background: #fff; color: #8a8b9c; font-size: 11px; text-align: center; }

@media (max-width: 768px) {
  /* sits above the mobile bottom menu */
  #beez-ai .bai-launcher { right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 11px 15px; font-size: 13px; }
  #beez-ai .bai-panel { inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
  #beez-ai.bai-open .bai-launcher { display: none; }
  #beez-ai .bai-note { padding-bottom: calc(9px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { #beez-ai .bai-typing { animation: none; } }
