/* Aurora assistant widget. Uses site colors only; respects reduced motion and small screens. */
:root {
  --aa-red: #d7262e;
  --aa-ink: #161b26;
  --aa-muted: #5b6270;
  --aa-line: #e3e6eb;
  --aa-paper: #ffffff;
  --aa-soft: #f4f5f7;
}
[hidden] { display: none !important; }
.aa-root { position: fixed; right: 20px; bottom: 20px; z-index: 900; font-family: inherit; }
.aa-launcher {
  width: 72px; height: 72px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid var(--aa-red); background: var(--aa-paper);
  box-shadow: 0 8px 24px rgba(22,27,38,.22); display: grid; place-items: center; overflow: hidden;
}
.aa-launcher img { width: 100%; height: 100%; object-fit: cover; }
.aa-launcher:focus-visible, .aa-close:focus-visible, .aa-reset:focus-visible, .aa-send:focus-visible,
.aa-info:focus-visible, .aa-privacy:focus-visible, .aa-input:focus-visible, .aa-disclosure a:focus-visible, .aa-action a:focus-visible {
  outline: 3px solid var(--aa-red); outline-offset: 2px;
}
.aa-panel {
  position: absolute; right: 0; bottom: 0; width: min(380px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 40px)); height: min(600px, calc(100dvh - 40px));
  max-height: min(600px, calc(100vh - 40px)); max-height: min(600px, calc(100dvh - 40px));
  display: flex; flex-direction: column; overflow-y: auto;
  background: var(--aa-paper); color: var(--aa-ink); border: 1px solid var(--aa-line);
  border-radius: 16px; box-shadow: 0 18px 48px rgba(22,27,38,.25);
}
.aa-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--aa-line); }
.aa-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--aa-line); }
.aa-id { display: grid; flex: 1; min-width: 0; }
.aa-id strong { font-size: 16px; line-height: 1.2; }
.aa-id span { font-size: 13px; color: var(--aa-muted); }
.aa-info { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--aa-line); background: var(--aa-paper); color: var(--aa-ink); font: 700 15px/1 Georgia, serif; cursor: pointer; }
.aa-info[aria-expanded="true"] { border-color: var(--aa-red); color: var(--aa-red); }
.aa-reset { border: 0; background: none; color: var(--aa-red); font-size: 13px; cursor: pointer; padding: 6px; }
.aa-close { border: 0; background: none; font-size: 26px; line-height: 1; width: 36px; height: 36px; cursor: pointer; color: var(--aa-ink); border-radius: 8px; }
.aa-disclosure { flex: none; margin: 0; padding: 10px 14px; font-size: 12.5px; line-height: 1.45; color: var(--aa-muted); background: var(--aa-soft); }
.aa-disclosure a { color: var(--aa-ink); text-decoration: underline; }
.aa-log { flex: 1 1 auto; min-height: 64px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.aa-msg { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.aa-bot { align-self: flex-start; background: var(--aa-soft); border-bottom-left-radius: 4px; }
.aa-user { align-self: flex-end; background: var(--aa-ink); color: #fff; border-bottom-right-radius: 4px; }
.aa-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: var(--aa-red); animation: aa-blink 1s steps(1) infinite; }
@keyframes aa-blink { 50% { opacity: 0; } }
.aa-typing { display: inline-flex; align-items: center; gap: 5px; padding: 12px 14px; }
.aa-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--aa-muted); opacity: .35; animation: aa-bounce 1.2s infinite ease-in-out; }
.aa-dot:nth-child(2) { animation-delay: .15s; }
.aa-dot:nth-child(3) { animation-delay: .3s; }
@keyframes aa-bounce { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.aa-action { margin: 0; align-self: flex-start; }
.aa-action a { display: inline-block; font-size: 14px; color: var(--aa-red); font-weight: 600; }
.aa-form { border-top: 1px solid var(--aa-line); padding: 10px 14px 12px; display: grid; gap: 6px; flex: none; }
.aa-input { resize: none; border: 1px solid var(--aa-line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14.5px; color: var(--aa-ink); min-height: 42px; max-height: 120px; }
.aa-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aa-privacy { font-size: 12px; color: var(--aa-muted); text-decoration: underline; margin-right: auto; }
.aa-counter { font-size: 12px; color: var(--aa-muted); }
.aa-send { border: 0; background: var(--aa-red); color: #fff; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 9999px; cursor: pointer; }
.aa-send:disabled { opacity: .55; cursor: progress; }
@media (max-width: 639px) {
  .aa-root { right: 12px; bottom: 12px; }
  .aa-launcher { width: 60px; height: 60px; }
  .aa-panel { position: fixed; inset: 0; width: auto; max-height: none; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .aa-panel, .aa-launcher { transition: none; } .aa-dot { animation: none; opacity: .7; } .aa-caret { animation: none; } }
