/*
 * search-v2.ai.css
 * Owner: task 08, docs/search-redesign/08-ai-search/TASK.md
 *
 * Restyles the AI search UI (desktop #ai-bar, #ai-results-bar, mobile #ai-pill
 * and #ai-sheet) on top of the legacy public/css/ai-search.css.
 * Visual only. Every display / visibility / transform toggle stays owned by
 * ai-search.css and ai-search.js (.visible, .loading, .listening,
 * body.ai-sheet-open, the 1280px media queries, jQuery .hide() on the mic).
 * Margins of #ai-bar are owned by search-v2.layout.css (task 02).
 *//* ------------------------------------------------------------------ *//* One source of truth: legacy --ai-* variables -> sv2 tokens          *//* (same values, ai-search.css:5-12 defines them on :root)             *//* ------------------------------------------------------------------ */body.search-v2{--ai-green:var(--sv2-color-primary);--ai-green-dark:var(--sv2-color-primary-hover);--ai-sage:var(--sv2-color-accent);--ai-offwhite:var(--sv2-color-tint);--ai-gray:var(--sv2-color-text-muted);--ai-shadow:var(--sv2-shadow-lg)}/* ------------------------------------------------------------------ *//* Badge ("New")                                                      *//* ------------------------------------------------------------------ */body.search-v2 .ai-badge{box-sizing:border-box;min-width:48px;padding:2px var(--sv2-space-2);border-radius:var(--sv2-radius-pill);background:var(--sv2-color-accent);color:var(--sv2-color-text);font-family:var(--sv2-font-ui);font-size:var(--sv2-fs-xs);font-weight:var(--sv2-fw-bold);line-height:var(--sv2-lh);letter-spacing:0.02em;text-align:center;text-transform:uppercase;box-shadow:none}/* ------------------------------------------------------------------ *//* Composer: shared by the desktop bar and the mobile sheet footer     *//* ------------------------------------------------------------------ */body.search-v2 #ai-bar .ai-composer,body.search-v2 #ai-sheet .ai-composer{box-sizing:border-box;height:52px;gap:var(--sv2-space-1);padding:0 5px 0 var(--sv2-space-4);border:1px solid var(--sv2-color-border);border-radius:var(--sv2-radius-pill);background:var(--sv2-color-surface);transition:border-color var(--sv2-dur) var(--sv2-ease),box-shadow var(--sv2-dur) var(--sv2-ease)}body.search-v2 #ai-sheet .ai-composer{padding-left:var(--sv2-space-2)}body.search-v2 #ai-bar .ai-composer:focus-within,body.search-v2 #ai-sheet .ai-composer:focus-within{border-color:var(--sv2-color-primary);box-shadow:var(--sv2-shadow-focus)}body.search-v2 #ai-bar .ai-composer__icon{color:var(--sv2-color-primary)}body.search-v2 #ai-bar .ai-composer__input,body.search-v2 #ai-sheet .ai-composer__input{height:40px;padding:0 var(--sv2-space-2);border:0;border-radius:0;background:transparent;color:var(--sv2-color-text);font-family:var(--sv2-font-ui);font-size:var(--sv2-fs-md);/* >=16px keeps iOS from zooming on focus */box-shadow:none}/* The ring lives on the composer (focus-within), not on the input. */body.search-v2 #ai-bar .ai-composer__input:focus,body.search-v2 #ai-bar .ai-composer__input:focus-visible,body.search-v2 #ai-sheet .ai-composer__input:focus,body.search-v2 #ai-sheet .ai-composer__input:focus-visible{border:0;box-shadow:none}body.search-v2 #ai-bar .ai-composer__input::placeholder,body.search-v2 #ai-sheet .ai-composer__input::placeholder{color:var(--sv2-color-text-subtle)}/* Mic: ghost circle. display stays legacy (JS .hide()s it without speech API). */body.search-v2 .ai-composer .ai-composer__mic,body.search-v2 .ai-composer .ai-composer__send{width:40px;height:40px;transition:background-color var(--sv2-dur) var(--sv2-ease),color var(--sv2-dur) var(--sv2-ease),box-shadow var(--sv2-dur) var(--sv2-ease)}body.search-v2 .ai-composer .ai-composer__mic{background:transparent;color:var(--sv2-color-primary)}body.search-v2 .ai-composer .ai-composer__mic:hover{background:var(--sv2-color-tint)}/* Listening: was a red fill with a red pulse (ai-search.css:100-104).
   Red is not a brand token, so the state is a secondary fill with a
   static accent ring. */body.search-v2 .ai-composer .ai-composer__mic.listening{background:var(--sv2-color-secondary);color:var(--sv2-color-on-primary);box-shadow:0 0 0 3px var(--sv2-color-accent);animation:none}/* Send: primary filled circle. */body.search-v2 .ai-composer .ai-composer__send{background:var(--sv2-color-primary);color:var(--sv2-color-on-primary)}body.search-v2 .ai-composer .ai-composer__send:hover{background:var(--sv2-color-primary-hover)}body.search-v2 .ai-composer .ai-composer__send:disabled{background:var(--sv2-color-primary)}/* Spinner (shown by .ai-composer.loading, legacy display rules). */body.search-v2 .ai-composer .ai-composer__send .ai-spinner{border-color:var(--sv2-color-accent);border-top-color:var(--sv2-color-on-primary)}/* ------------------------------------------------------------------ *//* Desktop bar (#ai-bar, >=1281px; legacy media query shows it)        *//* Badge straddles the composer's top border at the left (absolute,    *//* like the mobile pill's badge), so it takes no horizontal space.     *//* ------------------------------------------------------------------ */body.search-v2 #ai-bar{padding:0;border-radius:0;background:none;box-shadow:none}body.search-v2 #ai-bar .ai-badge{top:-10px;right:auto;left:var(--sv2-space-4);transform:none}body.search-v2 #ai-bar .ai-composer{padding:0 5px 0 var(--sv2-space-4)}/* ------------------------------------------------------------------ *//* Results bar (#ai-results-bar, display via .visible in legacy CSS)   *//* ------------------------------------------------------------------ */body.search-v2 #ai-results-bar{gap:var(--sv2-space-3);margin:0 0 var(--sv2-space-4);padding:var(--sv2-space-3) var(--sv2-space-4);border:0;border-radius:var(--sv2-radius-md);background:var(--sv2-color-tint);font-family:var(--sv2-font-ui)}body.search-v2 #ai-results-bar .ai-sparkle{width:20px;height:20px;color:var(--sv2-color-primary)}/* Zero basis keeps the sparkle and text on one row when the legacy
   <=1280px flex-wrap kicks in; only the actions wrap below. */body.search-v2 #ai-results-bar .ai-results-bar__text{flex:1 1 0}@media screen and (max-width: 1280px){/* Actions take their own row, aligned with the text (20px sparkle + 12px gap). */body.search-v2 #ai-results-bar .ai-results-bar__actions{flex:1 0 100%;box-sizing:border-box;padding-left:var(--sv2-space-7)}}body.search-v2 #ai-results-bar .ai-results-bar__count{color:var(--sv2-color-text);font-size:var(--sv2-fs-md);font-weight:var(--sv2-fw-bold);line-height:var(--sv2-lh)}body.search-v2 #ai-results-bar .ai-results-bar__summary{color:var(--sv2-color-text-muted);font-size:var(--sv2-fs-sm);line-height:var(--sv2-lh)}body.search-v2 #ai-results-bar .ai-results-bar__map,body.search-v2 #ai-results-bar .ai-results-bar__refine{box-sizing:border-box;height:32px;padding:0 var(--sv2-space-4);border:1px solid var(--sv2-color-border);border-radius:var(--sv2-radius-pill);background:var(--sv2-color-surface);color:var(--sv2-color-text);font-family:var(--sv2-font-ui);font-size:var(--sv2-fs-sm);font-weight:var(--sv2-fw-semibold);line-height:30px;letter-spacing:normal;text-transform:lowercase;transition:border-color var(--sv2-dur) var(--sv2-ease),color var(--sv2-dur) var(--sv2-ease)}body.search-v2 #ai-results-bar .ai-results-bar__map::first-letter,body.search-v2 #ai-results-bar .ai-results-bar__refine::first-letter{text-transform:uppercase}body.search-v2 #ai-results-bar .ai-results-bar__map:hover,body.search-v2 #ai-results-bar .ai-results-bar__refine:hover{border-color:var(--sv2-color-primary);color:var(--sv2-color-primary)}body.search-v2 #ai-results-bar .ai-results-bar__clear{box-sizing:border-box;width:32px;height:32px;padding:0 !important;/* overrides ai-search.css:544 */border:0;border-radius:50%;background:transparent;color:var(--sv2-color-text-muted);font-family:var(--sv2-font-ui);font-size:var(--sv2-fs-xl);font-weight:var(--sv2-fw-regular);line-height:32px;text-align:center;transition:background-color var(--sv2-dur) var(--sv2-ease),color var(--sv2-dur) var(--sv2-ease)}/* The bar is tint, so the ghost hover is surface. */body.search-v2 #ai-results-bar .ai-results-bar__clear:hover{background:var(--sv2-color-surface);color:var(--sv2-color-text)}/* ------------------------------------------------------------------ *//* Mobile pill (#ai-pill). Position, z-index and display stay legacy.  *//* ------------------------------------------------------------------ */body.search-v2 #ai-pill{height:48px;padding:0 var(--sv2-space-6);border-radius:var(--sv2-radius-pill);background:var(--sv2-color-primary);color:var(--sv2-color-on-primary);font-family:var(--sv2-font-ui);font-size:var(--sv2-fs-md);font-weight:var(--sv2-fw-bold);letter-spacing:0.02em;box-shadow:var(--sv2-shadow-lg);white-space:nowrap}body.search-v2 #ai-pill:hover{background:var(--sv2-color-primary-hover)}body.search-v2 #ai-pill .ai-badge{top:-10px;right:-8px;transform:none}/* ------------------------------------------------------------------ *//* Mobile sheet (#ai-sheet). transform / visibility toggles stay legacy *//* ------------------------------------------------------------------ */body.search-v2 #ai-sheet-backdrop{background:var(--sv2-overlay)}body.search-v2 #ai-sheet{max-height:85vh;/* task 10 (I3): was 88vh in ai-search.css:217 */max-height:85dvh;/* visible viewport where supported (iOS toolbars) */border-radius:var(--sv2-radius-md) var(--sv2-radius-md) 0 0;background:var(--sv2-color-surface);box-shadow:var(--sv2-shadow-lg);font-family:var(--sv2-font-ui)}body.search-v2 #ai-sheet .ai-sheet__handle{padding:var(--sv2-space-3) 0 var(--sv2-space-1)}body.search-v2 #ai-sheet .ai-sheet__handle::before{width:40px;height:4px;border-radius:var(--sv2-radius-pill);background:var(--sv2-color-border)}body.search-v2 #ai-sheet .ai-sheet__header{padding:var(--sv2-space-2) var(--sv2-space-5) var(--sv2-space-3);border-bottom:1px solid var(--sv2-color-border-subtle)}body.search-v2 #ai-sheet .ai-sheet__title{padding:0;/* global h3 in style.css adds 40px bottom padding */color:var(--sv2-color-text);font-family:var(--sv2-font-ui);font-size:var(--sv2-fs-lg);font-weight:var(--sv2-fw-bold);line-height:var(--sv2-lh);letter-spacing:normal}body.search-v2 #ai-sheet .ai-sheet__title .ai-sparkle{color:var(--sv2-color-primary)}body.search-v2 #ai-sheet .ai-sheet__close{width:40px;height:40px;background:transparent;color:var(--sv2-color-text-muted);font-size:var(--sv2-fs-xl);transition:background-color var(--sv2-dur) var(--sv2-ease)}body.search-v2 #ai-sheet .ai-sheet__close:hover{background:var(--sv2-color-tint);color:var(--sv2-color-text)}body.search-v2 #ai-sheet .ai-sheet__messages{padding:var(--sv2-space-4) var(--sv2-space-4) var(--sv2-space-2)}/* Messages (created by ai-search.js) */body.search-v2 #ai-sheet .ai-msg{margin-bottom:var(--sv2-space-3)}body.search-v2 #ai-sheet .ai-msg--user{margin-left:auto;width:fit-content;padding:10px 14px;border-radius:var(--sv2-radius-md) var(--sv2-radius-md) 4px var(--sv2-radius-md);background:var(--sv2-color-tint);color:var(--sv2-color-text);font-size:var(--sv2-fs-sm);line-height:var(--sv2-lh)}body.search-v2 #ai-sheet .ai-msg__body{padding:10px 14px;border:1px solid var(--sv2-color-border);border-radius:var(--sv2-radius-md) var(--sv2-radius-md) var(--sv2-radius-md) 4px;background:var(--sv2-color-surface);color:var(--sv2-color-text);font-size:var(--sv2-fs-sm);line-height:var(--sv2-lh)}body.search-v2 #ai-sheet .ai-msg__meta{margin-top:var(--sv2-space-1);color:var(--sv2-color-text-muted);font-size:var(--sv2-fs-xs)}body.search-v2 #ai-sheet .ai-msg__meta b{color:var(--sv2-color-text)}body.search-v2 #ai-sheet .ai-msg__error{color:var(--sv2-color-danger)}body.search-v2 #ai-sheet .ai-typing span{background:var(--sv2-color-accent)}/* Example chips (created by ai-search.js) */body.search-v2 #ai-sheet .ai-sheet__examples{padding:var(--sv2-space-2) var(--sv2-space-4) var(--sv2-space-3)}body.search-v2 #ai-sheet .ai-example-chip{box-sizing:border-box;height:36px;padding:0 14px;border:1px solid var(--sv2-color-border);border-radius:var(--sv2-radius-pill);background:var(--sv2-color-surface);color:var(--sv2-color-text);font-family:var(--sv2-font-ui);font-size:var(--sv2-fs-sm);transition:background-color var(--sv2-dur) var(--sv2-ease),border-color var(--sv2-dur) var(--sv2-ease)}body.search-v2 #ai-sheet .ai-example-chip:hover,body.search-v2 #ai-sheet .ai-example-chip:active{border-color:var(--sv2-color-accent-soft);background:var(--sv2-color-tint)}body.search-v2 #ai-sheet .ai-sheet__footer{padding:var(--sv2-space-3) var(--sv2-space-4) calc(var(--sv2-space-3) + env(safe-area-inset-bottom));border-top:1px solid var(--sv2-color-border-subtle);background:var(--sv2-color-surface)}/* ------------------------------------------------------------------ *//* Reduced motion: stop the legacy looping animations                  *//* ------------------------------------------------------------------ */@media (prefers-reduced-motion: reduce){body.search-v2 #ai-pill,body.search-v2 #ai-sheet .ai-typing span{animation:none}}