@askdialog/dialog-react 2.5.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -84,13 +84,13 @@ Full-featured dialog component with suggestions and input.
84
84
 
85
85
  ### DialogInput
86
86
 
87
- Standalone input component for asking questions.
87
+ Standalone input component for asking questions. It shows the fixed "Ask the AI a question" text and an AI disclosure line, in English, French or Spanish depending on the client locale (English otherwise).
88
88
 
89
89
  **Props:**
90
90
  - `client` (Dialog) - Dialog SDK client instance (required)
91
91
  - `productId` (string) - Product ID (required)
92
92
  - `productTitle` (string) - Product title (required)
93
- - `placeholder` (string, optional) - Input placeholder text
93
+ - `placeholder` (string, optional) - Deprecated, ignored
94
94
  - `selectedVariantId` (string, optional) - Selected variant ID
95
95
 
96
96
  **Example:**
@@ -99,7 +99,6 @@ Standalone input component for asking questions.
99
99
  client={client}
100
100
  productId="9403924119882"
101
101
  productTitle="Product Name"
102
- placeholder="Ask something about this product..."
103
102
  />
104
103
  ```
105
104
 
@@ -119,12 +118,12 @@ import '@askdialog/dialog-react/style.css';
119
118
  const client = new Dialog({ apiKey: 'your-api-key', locale: 'en-US', currency: 'USD' });
120
119
 
121
120
  function SearchPage() {
122
- const { controller, state } = useDialogSearch({ client, language: 'en', currency: client.currency });
121
+ const { controller, state, theme } = useDialogSearch({ client, language: 'en', currency: client.currency });
123
122
 
124
123
  return (
125
124
  <>
126
125
  <DialogSearchBar controller={controller} placeholder="Search products..." />
127
- <DialogSearchResults controller={controller} state={state} />
126
+ <DialogSearchResults controller={controller} state={state} theme={theme} />
128
127
  </>
129
128
  );
130
129
  }
@@ -142,10 +141,22 @@ Creates one search controller per hook instance and disposes it on unmount.
142
141
  - `navigate` ((url, hit) => void, optional) - Router adapter called after selection attribution (e.g. `(url) => router.push(url)`). Omit it to let the cards' plain `<a href>` links navigate natively.
143
142
  - `debounceMs` (number, optional) - Keystroke debounce (default: 250)
144
143
  - `hitsPerPage` (number, optional) - Results per page (default: 12)
144
+ - `sections` (SearchSection[], optional) - Extra indices searched alongside the products; `collections` fills the collections column of `DialogSearchResults`. Only request an index the catalog exposes: a missing one fails the whole search.
145
145
 
146
146
  Search language and currency are explicit and independent of `client.locale`, which can be a regional locale such as `fr-FR`.
147
147
 
148
- **Returns:** `{ controller, state }` — pass both to the components below. `state.status` is `idle` / `loading` / `success` / `empty` / `error`.
148
+ **Returns:** `{ controller, state, theme }` — pass them to the components below; `theme` is the client's theme, for `DialogSearchResults`. `state.status` is `idle` / `loading` / `success` / `empty` / `error`.
149
+
150
+ With the collections column, for a catalog that exposes a collections index:
151
+
152
+ ```tsx
153
+ const { controller, state, theme } = useDialogSearch({
154
+ client,
155
+ language: 'en',
156
+ currency: client.currency,
157
+ sections: [{ index: 'collections', hitsPerPage: 5 }],
158
+ });
159
+ ```
149
160
 
150
161
  #### DialogSearchBar
151
162
 
@@ -159,11 +170,15 @@ Search input: typing runs a debounced search, submitting (Enter) searches immedi
159
170
 
160
171
  #### DialogSearchResults
161
172
 
162
- Floating results panel overlaying the page content: portaled to `document.body` in `position: fixed`, anchored under the spot where the component is rendered (place it right after the bar), so no ancestor stacking context or `overflow: hidden` can hide it. Renders the controller states; successful searches render a scrollable list of `DialogSearchProductCard` rows plus the pagination controls. Each card links to the product page and records search attribution (viewport impressions, select on click and middle-click) automatically. Clicking outside the panel (and outside the bar) closes it; typing again or re-focusing the bar reopens it with the results kept.
173
+ Floating results panel overlaying the page content: portaled to `document.body` in `position: fixed`, centered on the bar (up to 1440px wide, filling the viewport) and anchored under the spot where the component is rendered (place it right after the bar), so no ancestor stacking context or `overflow: hidden` can hide it. It shows the same layout as the Shopify search overlay: a collections column on the left when `sections` requests them, the products on the right as a list or a 3-column grid, the query match emphasized in every title, and either a "See all results" button or the pagination controls. Below 768px the panel stacks, collections in a horizontal rail above the products. Colors, radii and font follow the SDK theme (dark palette when `backgroundColor` is dark, straight or rounded corners from `ctaBorderType`). Each card links to the product page and records search attribution (viewport impressions, select on click and middle-click) automatically. Clicking outside the panel (and outside the bar) closes it; typing again or re-focusing the bar reopens it with the results kept.
163
174
 
164
175
  **Props:**
165
176
  - `controller` (SearchController) - From `useDialogSearch` (required)
166
177
  - `state` (SearchControllerState) - From `useDialogSearch` (required)
178
+ - `locale` (string, optional) - BCP 47 locale for prices, counts and labels (English labels and browser number format when omitted)
179
+ - `theme` (Theme, optional) - The client's theme, as returned by `useDialogSearch`; styles the panel (palette, radii, font)
180
+ - `layout` (`'list' | 'grid'`, optional) - Products layout (default: `'list'`)
181
+ - `seeAllHref` ((query) => string, optional) - Link of the "See all results" footer button; omitted, the panel paginates instead
167
182
 
168
183
  #### DialogSearchPagination
169
184
 
@@ -172,6 +187,7 @@ Previous/next controls with a page indicator; hidden while there is a single pag
172
187
  **Props:**
173
188
  - `controller` (SearchController) - From `useDialogSearch` (required)
174
189
  - `state` (SearchControllerState) - From `useDialogSearch` (required)
190
+ - `locale` (string, optional) - Locale of the button labels
175
191
 
176
192
  ## Theming
177
193
 
@@ -2,6 +2,7 @@ import { FC } from 'react';
2
2
  import { Dialog } from '@askdialog/dialog-sdk';
3
3
  interface DialogInputProps {
4
4
  client: Dialog;
5
+ /** @deprecated Ignored: the input always shows the fixed AI text. */
5
6
  placeholder?: string;
6
7
  productId: string;
7
8
  productTitle: string;
@@ -0,0 +1,6 @@
1
+ interface InputMessages {
2
+ placeholder: string;
3
+ aiDisclosure: string;
4
+ }
5
+ export declare const getInputMessages: (locale: string | undefined) => InputMessages;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { SearchHit } from '@askdialog/dialog-sdk';
3
+ import { SearchMessages } from './searchMessages';
4
+ interface DialogSearchCollectionsProps {
5
+ collections: SearchHit[];
6
+ query: string;
7
+ messages: SearchMessages;
8
+ }
9
+ export declare const DialogSearchCollections: FC<DialogSearchCollectionsProps>;
10
+ export {};
@@ -3,6 +3,8 @@ import { SearchController, SearchControllerState } from '@askdialog/dialog-sdk';
3
3
  interface DialogSearchPaginationProps {
4
4
  controller: SearchController;
5
5
  state: SearchControllerState;
6
+ locale?: string;
6
7
  }
8
+ export declare const hasPagination: (state: SearchControllerState) => boolean;
7
9
  export declare const DialogSearchPagination: FC<DialogSearchPaginationProps>;
8
10
  export {};
@@ -5,6 +5,8 @@ interface DialogSearchProductCardProps {
5
5
  hit: SearchHit;
6
6
  index: number;
7
7
  locale?: string;
8
+ /** Committed query, emphasized inside the title. */
9
+ query?: string;
8
10
  }
9
11
  export declare const DialogSearchProductCard: FC<DialogSearchProductCardProps>;
10
12
  export {};
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { SearchController, SearchResult } from '@askdialog/dialog-sdk';
3
+ import { SearchMessages } from './searchMessages';
4
+ interface DialogSearchProductsProps {
5
+ controller: SearchController;
6
+ response: SearchResult;
7
+ locale: string | undefined;
8
+ messages: SearchMessages;
9
+ }
10
+ export declare const DialogSearchProducts: FC<DialogSearchProductsProps>;
11
+ export {};
@@ -1,9 +1,16 @@
1
1
  import { FC } from 'react';
2
- import { SearchController, SearchControllerState } from '@askdialog/dialog-sdk';
2
+ import { SearchController, SearchControllerState, Theme } from '@askdialog/dialog-sdk';
3
+ export type SearchProductsLayout = "list" | "grid";
3
4
  interface DialogSearchResultsProps {
4
5
  controller: SearchController;
5
6
  state: SearchControllerState;
7
+ /** BCP 47 locale for prices, counts and labels. */
6
8
  locale?: string;
9
+ /** Usually `client.theme`, as returned by `useDialogSearch`. */
10
+ theme?: Theme;
11
+ layout?: SearchProductsLayout;
12
+ /** Link of the "See all results" footer; omitted, the panel paginates instead. */
13
+ seeAllHref?: (query: string) => string;
7
14
  }
8
15
  export declare const DialogSearchResults: FC<DialogSearchResultsProps>;
9
16
  export {};
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ interface HighlightedTitleProps {
3
+ title: string;
4
+ query: string;
5
+ }
6
+ export declare const HighlightedTitle: FC<HighlightedTitleProps>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ export type Rgb = [number, number, number];
2
+ export declare const parseCssColor: (color: string) => Rgb | undefined;
3
+ export declare const relativeLuminance: (color: string) => number | undefined;
@@ -0,0 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+ import { AnchorRect } from './useAnchorRect';
3
+ export declare const isAnchorOnScreen: (rect: AnchorRect, viewportHeight: number) => boolean;
4
+ /** Centered on the bar, clamped to the viewport; flips above when short of room below. */
5
+ export declare const panelStyle: (rect: AnchorRect, viewportWidth: number, viewportHeight: number) => CSSProperties;
@@ -0,0 +1,6 @@
1
+ import { SearchHit } from '@askdialog/dialog-sdk';
2
+ /** Collections without a link cannot navigate on selection and are not rendered. */
3
+ export declare const navigableCollections: (collections: SearchHit[] | undefined) => {
4
+ collection: SearchHit;
5
+ href: string;
6
+ }[];
@@ -1,3 +1,6 @@
1
- import { SearchPriceRange } from '@askdialog/dialog-sdk';
1
+ import { SearchHit, SearchPriceRange } from '@askdialog/dialog-sdk';
2
+ /** The lowest price only, as on the Shopify storefront search. */
2
3
  export declare const formatSearchPrice: (priceRange: SearchPriceRange | undefined, locale?: string) => string;
3
- export declare const safeProductHref: (url: string) => string | undefined;
4
+ export declare const safeHref: (url: string) => string | undefined;
5
+ export declare const hitHref: (hit: SearchHit) => string | undefined;
6
+ export declare const hitTitle: (hit: SearchHit) => string;
@@ -0,0 +1,14 @@
1
+ export interface SearchMessages {
2
+ searching: (query: string) => string;
3
+ noResults: string;
4
+ retry: string;
5
+ collectionsLabel: string;
6
+ productsLabel: string;
7
+ collectionsCount: (count: number) => string;
8
+ resultsCount: (count: number) => string;
9
+ seeAllLabel: (count: number) => string;
10
+ previous: string;
11
+ next: string;
12
+ pageOf: (page: number, pages: number) => string;
13
+ }
14
+ export declare const getSearchMessages: (locale: string | undefined) => SearchMessages;
@@ -0,0 +1,3 @@
1
+ import { Theme } from '@askdialog/dialog-sdk';
2
+ export type SearchPanelVariables = Record<`--dso-${string}`, string>;
3
+ export declare const resolveSearchPanelVariables: (theme: Theme | undefined) => SearchPanelVariables;
@@ -0,0 +1,6 @@
1
+ export interface TitleParts {
2
+ before: string;
3
+ match: string;
4
+ after: string;
5
+ }
6
+ export declare const splitTitleMatch: (title: string, query: string) => TitleParts;
@@ -5,8 +5,13 @@ export interface AnchorRect {
5
5
  left: number;
6
6
  width: number;
7
7
  }
8
+ interface Viewport {
9
+ width: number;
10
+ height: number;
11
+ }
8
12
  export declare const useAnchorRect: (active: boolean) => {
9
13
  anchorRef: RefObject<HTMLDivElement | null>;
10
14
  rect: AnchorRect | undefined;
11
- viewportHeight: number;
15
+ viewport: Viewport;
12
16
  };
17
+ export {};
@@ -1,4 +1,4 @@
1
- import { Dialog, SearchController, SearchControllerState, SearchHit, SearchSurface } from '@askdialog/dialog-sdk';
1
+ import { Dialog, SearchController, SearchControllerState, SearchHit, SearchSection, SearchSurface, Theme } from '@askdialog/dialog-sdk';
2
2
  export interface UseDialogSearchOptions {
3
3
  client: Dialog;
4
4
  /** Lowercase ISO 639-1 language code, e.g. `fr`. */
@@ -11,10 +11,17 @@ export interface UseDialogSearchOptions {
11
11
  navigate?: (url: string, hit: SearchHit) => void;
12
12
  debounceMs?: number;
13
13
  hitsPerPage?: number;
14
+ /**
15
+ * Extra indices searched alongside the products, e.g. `[{ index: 'collections', hitsPerPage: 5 }]`.
16
+ * Only request an index the catalog exposes: a missing one fails the whole search.
17
+ */
18
+ sections?: readonly SearchSection[];
14
19
  }
15
20
  export interface DialogSearch {
16
21
  controller: SearchController;
17
22
  state: SearchControllerState;
23
+ /** The client's theme, for `DialogSearchResults`. */
24
+ theme: Theme;
18
25
  }
19
26
  /** Options are fixed when the controller is created. */
20
27
  export declare const useDialogSearch: (options: UseDialogSearchOptions) => DialogSearch;
@@ -3,5 +3,5 @@ export { DialogInput } from './DialogProductBlock/DialogInput';
3
3
  export { DialogSearchBar } from './DialogSearch/DialogSearchBar';
4
4
  export { DialogSearchPagination } from './DialogSearch/DialogSearchPagination';
5
5
  export { DialogSearchProductCard } from './DialogSearch/DialogSearchProductCard';
6
- export { DialogSearchResults } from './DialogSearch/DialogSearchResults';
6
+ export { DialogSearchResults, type SearchProductsLayout, } from './DialogSearch/DialogSearchResults';
7
7
  export { useDialogSearch, type DialogSearch, type UseDialogSearchOptions, } from './DialogSearch/useDialogSearch';
@@ -1 +1 @@
1
- .dialog-block-header-container{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.dialog-block-title{color:var(--dialog-theme-title-color, #272727);font-family:var(--dialog-theme-font-family);font-size:var(--dialog-theme-title-font-size);font-style:normal;font-weight:500;line-height:20px;letter-spacing:1.3px;text-transform:uppercase}.dialog-block-description{color:var(--dialog-theme-description-color, #6c6c6c);font-family:var(--dialog-theme-font-family);font-size:var(--dialog-theme-description-font-size);font-style:normal;font-weight:500;line-height:20px}.dialog-block-suggestions-item{background-color:#f1f1f1;border:none;outline:none;padding:12px 16px;width:fit-content;cursor:pointer;display:flex;justify-content:flex-start;background-color:#fff;align-items:center;gap:8px;border:1px solid #dddce2;border-radius:24px}.dialog-block-suggestions-item:hover{transform:scale(1.01)}.dialog-block-suggestions-item-label{color:var(--dialog-theme-content-color, #575665);font-size:var(--dialog-theme-content-font-size, 14px);font-weight:500;text-align:start;flex:1}.dialog-block-suggestions-item-icon path{stroke:var(--dialog-theme-primary-color)}.dialog-block-suggestions-skeleton-item,.dialog-block-suggestions-skeleton-item:empty{display:block;width:100%;width:90%;height:18px;border-radius:18px;padding:12px 16px;background-color:#f1f1f1;animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%{background-color:#f1f1f1}50%{background-color:#fff}to{background-color:#f1f1f1}}.dialog-block-suggestions-container{display:flex;flex-direction:column;gap:12px;width:100%}.dialog-input-wrapper{position:relative;width:100%;height:50px;max-height:50px;padding:16px 20px;border:1px solid #d9d9d9;border-radius:var(--dialog-theme-cta-border-type, 24px);background:#fff;display:flex;align-items:center;box-sizing:border-box}.dialog-input-container{display:flex;justify-items:center;align-items:center;gap:12px;width:100%;height:100%}.dialog-ask-anything-input-ai-input{outline:unset;box-shadow:unset;border:unset;width:100%;font-size:16px;background:transparent;padding-inline-end:35px}.dialog-input-submit{width:40px;height:40px;border-radius:100%;display:flex;align-items:center;justify-content:center;background-color:var(--dialog-theme-primary-color);position:absolute;cursor:pointer;top:calc(50% - 20px);inset-inline-end:4px;border:unset}.dialog-input-submit:disabled{opacity:.5}.dialog-block-container{position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:24px 0;width:fit-content;gap:24px}.dialog-block-container>*{box-sizing:border-box}.dialog-search-bar{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;margin:0;padding:10px 10px 10px 14px;background:#fffc;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(0,0,0,.05);border-radius:24px;box-shadow:0 6px 20px -6px #0000001a}.dialog-search-bar:focus-within{border-color:#00000026;box-shadow:0 6px 20px -6px #0000001a,0 0 0 2px #1717171f}.dialog-search-bar-field{display:flex;flex:1 0 0;min-width:0;align-items:center;gap:6px;padding:2px 0}.dialog-search-bar-icon{display:inline-flex;flex-shrink:0;color:#737373}.dialog-search-bar-input{flex:1 0 0;min-width:0;margin:0;padding:0;border:none;outline:none;background:transparent;font-family:Inter,sans-serif;font-weight:500;font-size:16px;line-height:24px;color:#171717;text-overflow:ellipsis;box-shadow:none;-moz-appearance:none;appearance:none;-webkit-appearance:none}.dialog-search-bar-input::placeholder{color:#a3a3a3;opacity:1}.dialog-search-bar-input:focus,.dialog-search-bar-input:focus-visible{outline:none;box-shadow:none;border:none}.dialog-search-bar-submit{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;padding:6px;border:none;border-radius:9999px;background:#171717;color:#fff;box-shadow:0 1px 1px #1717170d;cursor:pointer}.dialog-search-bar-submit:focus-visible{outline:2px solid #171717;outline-offset:2px}.dialog-search-pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:4px;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:16px;color:#737373}.dialog-search-pagination button{margin:0;padding:6px 14px;border:1px solid rgba(0,0,0,.05);border-radius:9999px;background:#fff;font:inherit;color:inherit;cursor:pointer;transition:background-color .12s ease}.dialog-search-pagination button:hover:not(:disabled){background-color:#fafafa}.dialog-search-pagination button:disabled{opacity:.4;cursor:default}.dialog-search-card{width:100%}.dialog-search-card-body{display:flex;align-items:center;gap:8px;border-radius:12px;color:inherit;text-decoration:none}a.dialog-search-card-body:hover{background:#00000008}.dialog-search-card-image{position:relative;flex-shrink:0;width:64px;height:64px;border-radius:12px;overflow:hidden;background:#f2f2f2}.dialog-search-card-image:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:12px;background:#00000008;pointer-events:none}.dialog-search-card-image img{display:block;width:100%;height:100%;object-fit:cover}.dialog-search-card-info{display:flex;flex:1 1 0;min-width:0;flex-direction:column;gap:4px}.dialog-search-card-title{margin:0;font-family:Inter,sans-serif;font-weight:500;font-size:13px;line-height:20px;color:#171717;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dialog-search-card-price{margin:0;font-family:Inter,sans-serif;font-weight:500;font-size:12px;line-height:16px;color:#737373}.dialog-search-panel{position:fixed;z-index:9999;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;margin:0;padding:10px 14px;background:#ffffffe6;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(0,0,0,.05);border-radius:24px;box-shadow:0 6px 20px -6px #0000001a}.dialog-search-status{margin:0;font-family:Inter,sans-serif;font-weight:500;font-size:14px;line-height:20px;color:#a3a3a3}.dialog-search-status-error{color:#b3261e}.dialog-search-error{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.dialog-search-retry{margin:0;padding:6px 14px;border:1px solid rgba(0,0,0,.05);border-radius:9999px;background:#fff;font-family:Inter,sans-serif;font-weight:500;font-size:13px;line-height:20px;color:#737373;cursor:pointer;transition:background-color .12s ease}.dialog-search-retry:hover{background-color:#fafafa}.dialog-search-results{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;max-height:480px;min-height:0;overflow-y:auto}
1
+ .dialog-block-header-container{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.dialog-block-title{color:var(--dialog-theme-title-color, #272727);font-family:var(--dialog-theme-font-family);font-size:var(--dialog-theme-title-font-size);font-style:normal;font-weight:500;line-height:20px;letter-spacing:1.3px;text-transform:uppercase}.dialog-block-description{color:var(--dialog-theme-description-color, #6c6c6c);font-family:var(--dialog-theme-font-family);font-size:var(--dialog-theme-description-font-size);font-style:normal;font-weight:500;line-height:20px}.dialog-block-suggestions-item{background-color:#f1f1f1;border:none;outline:none;padding:12px 16px;width:fit-content;cursor:pointer;display:flex;justify-content:flex-start;background-color:#fff;align-items:center;gap:8px;border:1px solid #dddce2;border-radius:24px}.dialog-block-suggestions-item:hover{transform:scale(1.01)}.dialog-block-suggestions-item-label{color:var(--dialog-theme-content-color, #575665);font-size:var(--dialog-theme-content-font-size, 14px);font-weight:500;text-align:start;flex:1}.dialog-block-suggestions-item-icon path{stroke:var(--dialog-theme-primary-color)}.dialog-block-suggestions-skeleton-item,.dialog-block-suggestions-skeleton-item:empty{display:block;width:100%;width:90%;height:18px;border-radius:18px;padding:12px 16px;background-color:#f1f1f1;animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%{background-color:#f1f1f1}50%{background-color:#fff}to{background-color:#f1f1f1}}.dialog-block-suggestions-container{display:flex;flex-direction:column;gap:12px;width:100%}.dialog-input-wrapper{position:relative;width:100%;height:50px;max-height:50px;padding:16px 20px;border:1px solid #d9d9d9;border-radius:var(--dialog-theme-cta-border-type, 24px);background:#fff;display:flex;align-items:center;box-sizing:border-box}.dialog-input-container{display:flex;flex-direction:column;gap:8px;width:100%}.dialog-ask-anything-input-ai-input{outline:unset;box-shadow:unset;border:unset;width:100%;font-size:16px;background:transparent;padding-inline-end:35px}.dialog-input-submit{width:40px;height:40px;border-radius:100%;display:flex;align-items:center;justify-content:center;background-color:var(--dialog-theme-primary-color);position:absolute;cursor:pointer;top:calc(50% - 20px);inset-inline-end:4px;border:unset}.dialog-input-submit:disabled{opacity:.5}.dialog-input-ai-disclosure{margin:0;font-size:12px;line-height:1.4;font-family:var(--dialog-theme-font-family);color:var(--dialog-theme-description-color, #6b6b6b)}.dialog-block-container{position:relative;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;padding:24px 0;width:fit-content;gap:24px}.dialog-block-container>*{box-sizing:border-box}.dialog-search-bar{box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;margin:0;padding:10px 10px 10px 14px;background:#fffc;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(0,0,0,.05);border-radius:24px;box-shadow:0 6px 20px -6px #0000001a}.dialog-search-bar:focus-within{border-color:#00000026;box-shadow:0 6px 20px -6px #0000001a,0 0 0 2px #1717171f}.dialog-search-bar-field{display:flex;flex:1 0 0;min-width:0;align-items:center;gap:6px;padding:2px 0}.dialog-search-bar-icon{display:inline-flex;flex-shrink:0;color:#737373}.dialog-search-bar-input{flex:1 0 0;min-width:0;margin:0;padding:0;border:none;outline:none;background:transparent;font-family:Inter,sans-serif;font-weight:500;font-size:16px;line-height:24px;color:#171717;text-overflow:ellipsis;box-shadow:none;-moz-appearance:none;appearance:none;-webkit-appearance:none}.dialog-search-bar-input::placeholder{color:#a3a3a3;opacity:1}.dialog-search-bar-input:focus,.dialog-search-bar-input:focus-visible{outline:none;box-shadow:none;border:none}.dialog-search-bar-submit{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;padding:6px;border:none;border-radius:9999px;background:#171717;color:#fff;box-shadow:0 1px 1px #1717170d;cursor:pointer}.dialog-search-bar-submit:focus-visible{outline:2px solid #171717;outline-offset:2px}.dialog-search-pagination{display:flex;align-items:center;justify-content:center;gap:12px;padding:4px 0;font-size:12px;color:var(--dso-text-sec, #737373)}.dialog-search-pagination button{margin:0;padding:6px 14px;border:1px solid var(--dso-border, rgba(0, 0, 0, .1));border-radius:var(--dso-r-btn, 10px);background:transparent;font:inherit;color:var(--dso-text, #171717);cursor:pointer;transition:background-color .12s ease}.dialog-search-pagination button:hover:not(:disabled){background-color:var(--dso-hover, rgba(0, 0, 0, .04))}.dialog-search-pagination button:disabled{opacity:.4;cursor:default}.dialog-search-card{width:100%}.dialog-search-product{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:16px;align-items:center;padding:8px;border-radius:var(--dso-r-item);color:inherit;text-decoration:none}a.dialog-search-product:hover{background:var(--dso-hover)}.dialog-search-product-thumb{flex:none;width:56px;height:56px;overflow:hidden;border:1px solid var(--dso-border);border-radius:var(--dso-r-thumb);background:var(--dso-thumb)}.dialog-search-product-thumb img{display:block;width:100%;height:100%;object-fit:cover}.dialog-search-product-title{flex:1;min-width:0;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.dialog-search-product-price{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.dialog-search-match{font-weight:600}.dialog-search-muted{opacity:.55}@media(min-width:768px){.dialog-search-panel--grid .dialog-search-product{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:12px;border:1px solid var(--dso-border)}.dialog-search-panel--grid .dialog-search-product-thumb{width:100%;height:auto;aspect-ratio:4 / 3;border:0}}@media(max-width:767px){.dialog-search-product{grid-template-columns:52px minmax(0,1fr) auto;gap:12px}.dialog-search-product-thumb{width:52px;height:52px}.dialog-search-product-price{font-size:14px}}.dialog-search-collections{display:flex;flex-direction:column;gap:4px;min-height:0;padding:20px 12px 20px 24px;border-right:1px solid var(--dso-border);background:var(--dso-side);overflow-y:auto}.dialog-search-collection-list{display:flex;flex-direction:column;gap:4px;margin:0;padding:0;list-style:none}.dialog-search-collection{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:var(--dso-r-item);color:inherit;text-decoration:none}.dialog-search-collection:hover{background:var(--dso-hover)}.dialog-search-collection-thumb{flex:none;width:40px;height:40px;overflow:hidden;border-radius:var(--dso-r-thumb);background:var(--dso-thumb)}.dialog-search-collection-thumb img{display:block;width:100%;height:100%;object-fit:cover}.dialog-search-collection-title{flex:1;min-width:0;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}.dialog-search-caret{display:inline-flex;flex:none;color:var(--dso-text-sec)}@media(max-width:767px){.dialog-search-collections{flex:none;gap:10px;padding:0;border-right:0;background:transparent;overflow:visible}.dialog-search-collections .dialog-search-section-head{padding:0 16px}.dialog-search-collection-list{flex-direction:row;gap:10px;padding:0 16px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.dialog-search-collection-list::-webkit-scrollbar{display:none}.dialog-search-collection{flex:none;flex-direction:column;align-items:stretch;gap:8px;width:80px;padding:0}.dialog-search-collection-thumb{width:80px;height:50px;border-radius:var(--dso-r-item)}.dialog-search-collection-title{font-size:13px}.dialog-search-caret{display:none}}.dialog-search-panel{position:fixed;z-index:9999;box-sizing:border-box;display:flex;flex-direction:column;margin:0;padding:0;background:var(--dso-panel);border-radius:var(--dso-r-panel);box-shadow:0 24px 64px #00000047;overflow:hidden;font-family:var(--dso-font, inherit);font-size:14px;line-height:1.35;color:var(--dso-text);-webkit-font-smoothing:antialiased}.dialog-search-panel *,.dialog-search-panel *:before,.dialog-search-panel *:after{box-sizing:border-box}.dialog-search-status{margin:0;padding:16px 24px;color:var(--dso-text-sec)}.dialog-search-status-error{color:#b3261e}.dialog-search-error{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding-bottom:16px}.dialog-search-retry{margin:0 24px;padding:6px 14px;border:1px solid var(--dso-border);border-radius:var(--dso-r-btn);background:transparent;font:inherit;font-size:13px;color:var(--dso-text);cursor:pointer;transition:background-color .12s ease}.dialog-search-retry:hover{background-color:var(--dso-hover)}.dialog-search-body{display:grid;grid-template-columns:340px minmax(0,1fr);flex:1;min-height:0}.dialog-search-body--no-collections{grid-template-columns:minmax(0,1fr)}.dialog-search-section-head{display:flex;justify-content:space-between;align-items:baseline;padding:0 12px 8px}.dialog-search-label{margin:0;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--dso-text-sec)}.dialog-search-label-count{font-size:12px;font-weight:500;letter-spacing:0;text-transform:none}.dialog-search-count{font-size:12px;color:var(--dso-text-sec)}.dialog-search-products{display:flex;flex-direction:column;gap:14px;min-height:0;padding:20px 24px 12px;overflow-y:auto}.dialog-search-products .dialog-search-section-head{padding:0 8px}.dialog-search-results{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.dialog-search-empty{padding:8px;color:var(--dso-text-sec)}.dialog-search-footer{display:flex;justify-content:flex-end;align-items:center;flex:none;padding:14px 24px;border-top:1px solid var(--dso-border)}.dialog-search-cta{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 20px;border:1px solid var(--dso-primary);border-radius:var(--dso-r-btn);background:var(--dso-primary);color:var(--dso-cta-text);font-size:14px;font-weight:500;text-decoration:none}.dialog-search-cta:hover{filter:brightness(.95)}.dialog-search-footer .dialog-search-pagination{flex:1}@media(min-width:768px){.dialog-search-panel--grid .dialog-search-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}}@media(max-width:767px){.dialog-search-body{display:flex;flex-direction:column;gap:18px;padding-top:16px;overflow-y:auto}.dialog-search-products{gap:6px;padding:0 8px 8px;overflow:visible}.dialog-search-footer{padding:12px 16px}.dialog-search-cta{width:100%;height:44px}.dialog-search-cta svg{display:none}}