/* AI assistant widget. Uses the site's colour tokens. */
.ab-chat-launch { position: fixed; right: 1rem; bottom: calc(4.9rem + env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.05rem; border-radius: 999px; border: 2px solid #fff; background: var(--navy); color: #fff; font: 700 1rem/1 inherit; font-family: inherit; cursor: pointer; box-shadow: 0 8px 24px rgba(0,54,77,.35); }
.ab-chat-launch:hover { background: var(--navy-900); }
.ab-chat-launch:focus-visible, .ab-chat button:focus-visible, .ab-chat textarea:focus-visible, .ab-chat a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.ab-chat-launch svg { width: 1.25rem; height: 1.25rem; flex: none; }
.ab-chat { position: fixed; z-index: 70; right: 0; bottom: 0; width: 100%; height: min(100dvh, 640px); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px rgba(0,54,77,.3); color: var(--text); font-size: 1rem; }
.ab-chat[hidden], .ab-chat-launch[hidden] { display: none; }
.ab-chat header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; background: var(--navy); color: #fff; border-radius: 16px 16px 0 0; }
.ab-chat header h2 { margin: 0; font-size: 1.05rem; color: #fff; }
.ab-chat header .sub { display: block; font-size: .8rem; font-weight: 500; opacity: .9; }
.ab-chat header button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 8px; padding: .4rem .7rem; font: inherit; font-size: .9rem; cursor: pointer; min-height: 40px; }
.ab-chat .ab-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--sky-50, #f2f8fc); }
.ab-msg { max-width: 88%; padding: .65rem .85rem; border-radius: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ab-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.ab-msg.me { align-self: flex-end; background: var(--navy); color: #fff; }
.ab-msg a { color: var(--blue-dark); font-weight: 600; }
.ab-msg.me a { color: #fff; }
.ab-notice { font-size: .88rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; }
.ab-notice p { margin: 0 0 .6rem; }
.ab-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ab-chips button { background: #fff; border: 1px solid var(--navy); color: var(--navy); border-radius: 999px; padding: .45rem .8rem; font: inherit; font-size: .92rem; cursor: pointer; min-height: 40px; }
.ab-chips button:hover { background: var(--navy-50); }
.ab-chat form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); background: #fff; align-items: flex-end; }
.ab-chat textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: .6rem .7rem; border: 1px solid #8aa3b3; border-radius: 10px; font: inherit; font-size: 1rem; }
.ab-chat form button { min-height: 44px; padding: 0 1rem; border-radius: 10px; border: 2px solid var(--orange); background: var(--orange); color: var(--ink); font: 700 1rem inherit; font-family: inherit; cursor: pointer; }
.ab-chat form button:disabled { opacity: .55; cursor: not-allowed; }
.ab-foot { padding: 0 .9rem .7rem; font-size: .78rem; color: var(--muted); background: #fff; }
.ab-foot button { background: none; border: 0; color: var(--blue-dark); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }
.ab-typing { color: var(--muted); font-style: italic; }
@media (min-width: 700px) {
  .ab-chat-launch { right: 1.25rem; }
  .ab-chat { right: 1.25rem; bottom: calc(4.9rem + env(safe-area-inset-bottom)); width: 400px; height: min(640px, calc(100dvh - 6.5rem)); border-radius: 16px; }
  .ab-chat header { border-radius: 14px 14px 0 0; }
}
@media (min-width: 1200px) {
  .ab-chat-launch { bottom: 1.25rem; }
  .ab-chat { bottom: 1.25rem; height: min(640px, calc(100dvh - 2.5rem)); }
}
@media (prefers-reduced-motion: no-preference) { .ab-msg { animation: abin .18s ease-out; } @keyframes abin { from { opacity: 0; transform: translateY(4px); } } }
@media print { .ab-chat, .ab-chat-launch { display: none !important; } }
