/* av_polish.css
 * Purely additive visual polish: typewriter reveal cursor + consistent
 * micro-interactions (button hover/press, focus rings) across the chat UI.
 * No selectors here are read by JS (nothing toggles these classes for
 * functional state) and nothing here changes layout/structure -- it only
 * adds transitions, a decorative cursor, and touches up existing hover/
 * focus states using the page's own --brand/--focus-ring tokens so it stays
 * correct in both light and dark mode automatically. Loaded last so it wins
 * the cascade for the few properties it overrides (transition/box-shadow),
 * without needing to touch the large inline <style> block in nl_search.html.
 */

/* ── Typewriter reveal cursor ─────────────────────────────────────────── */
.av-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--brand, #2360e8);
  animation: av-caret-blink 0.9s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .av-caret { animation: none; opacity: .6; }
}
@keyframes av-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Consistent button micro-interactions ────────────────────────────── */
/* Applies to plain buttons and common action-button classes already used
 * across the app; deliberately does NOT touch elements with a role of
 * checkbox/radio/tab (those have their own established states) or disabled
 * controls (no hover affordance should suggest they're clickable). */
button:not([role="checkbox"]):not([role="radio"]):not([role="tab"]):not(:disabled),
.av-btn, .btn, a.g-btn {
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 150ms ease,
              border-color 150ms ease, opacity 150ms ease;
}
button:not([role="checkbox"]):not([role="radio"]):not([role="tab"]):not(:disabled):hover,
.av-btn:hover, .btn:hover, a.g-btn:hover {
  transform: translateY(-1px);
}
button:not([role="checkbox"]):not([role="radio"]):not([role="tab"]):not(:disabled):active,
.av-btn:active, .btn:active, a.g-btn:active {
  transform: translateY(0);
}

/* Consistent, visible focus-ring for keyboard navigation on every
 * interactive element, using the page's own --focus-ring token where it
 * exists so this automatically matches light/dark mode without duplicating
 * color logic here. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(35, 96, 232, 0.28));
}
