/* Off-hours AI support chat widget. Scoped under #aa-sa so it can't touch the theme. */
#aa-sa { --aa-orange: #F16127; --aa-cyan: #30E8FD; --aa-bg: #161616; --aa-panel: #1f1f1f;
  --aa-bubble-ai: #2a2a2a; --aa-text: #eeeeee; --aa-muted: #a0a0a0;
  font-family: Roboto, -apple-system, "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.45;
  position: fixed; left: 20px; bottom: 20px; z-index: 2147483000; color: var(--aa-text); }
#aa-sa * { box-sizing: border-box; }
#aa-sa-launch { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--aa-orange); box-shadow: 0 4px 14px rgba(0,0,0,.35); display: flex;
  align-items: center; justify-content: center; }
#aa-sa-launch svg { width: 28px; height: 28px; fill: #fff; }
#aa-sa-launch:focus-visible, #aa-sa button:focus-visible, #aa-sa textarea:focus-visible,
#aa-sa input:focus-visible { outline: 2px solid var(--aa-cyan); outline-offset: 2px; }
#aa-sa-panel { display: none; flex-direction: column; width: 370px; height: min(560px, calc(100vh - 110px));
  background: var(--aa-panel); border-radius: 12px; overflow: hidden; margin-bottom: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); }
#aa-sa.open #aa-sa-panel { display: flex; }
#aa-sa-head { background: #000; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; }
#aa-sa-head .t { flex: 1; }
#aa-sa-head .t b { display: block; font-size: 15px; color: #fff; }
#aa-sa-head .t span { font-size: 12.5px; color: var(--aa-muted); }
#aa-sa-close { background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
#aa-sa-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--aa-bg); }
#aa-sa .m { max-width: 85%; padding: 8px 11px; border-radius: 10px; white-space: normal; word-wrap: break-word; }
#aa-sa .m.c { align-self: flex-end; background: var(--aa-orange); color: #fff; border-bottom-right-radius: 3px; }
#aa-sa .m.a { align-self: flex-start; background: var(--aa-bubble-ai); border-bottom-left-radius: 3px; }
#aa-sa .m.sys { align-self: center; background: none; color: var(--aa-muted); font-size: 12.5px; text-align: center; }
#aa-sa .m a { color: var(--aa-cyan); }
#aa-sa .typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%;
  background: var(--aa-muted); animation: aa-sa-blink 1.2s infinite; }
#aa-sa .typing span:nth-child(2) { animation-delay: .2s; } #aa-sa .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aa-sa-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
#aa-sa-form { display: flex; gap: 8px; padding: 10px; background: var(--aa-panel); border-top: 1px solid #333; }
#aa-sa-form textarea, #aa-sa-leave input, #aa-sa-leave textarea { flex: 1; resize: none; border: 1px solid #3a3a3a;
  border-radius: 8px; background: #111; color: var(--aa-text); padding: 8px 10px; font: inherit; }
#aa-sa-form button, #aa-sa-leave button { background: var(--aa-orange); color: #fff; border: 0; border-radius: 8px;
  padding: 0 14px; font: inherit; font-weight: 500; cursor: pointer; }
#aa-sa-form button:disabled { opacity: .5; cursor: default; }
#aa-sa-leave { display: none; flex-direction: column; gap: 8px; padding: 10px; border-top: 1px solid #333; }
#aa-sa-leave button { padding: 9px 14px; }
#aa-sa.leave #aa-sa-leave { display: flex; } #aa-sa.leave #aa-sa-form { display: none; }
#aa-sa-foot { font-size: 11.5px; color: var(--aa-muted); padding: 0 12px 8px; background: var(--aa-panel); }
@media (max-width: 480px) {
  #aa-sa { left: 12px; right: 12px; bottom: 12px; }
  #aa-sa-panel { width: 100%; height: calc(100vh - 100px); }
}
