PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 0.9.3
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v0.9.3
1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 All 34 releases
desktop-mode / assets / css / ai-assistant.css

ai-assistant.css in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 0.9.3, at assets/css/ai-assistant.css

914 lines 23.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Desktop Mode — AI Assistant spotlight overlay.
3 *
4 * A system-level command palette that floats above the entire shell,
5 * including the WP admin bar. Visually modeled on macOS Spotlight and
6 * Linear's command menu — frosted-glass backdrop, spring-physics panel
7 * entrance, large search input, accent-tinted header.
8 *
9 * z-index 10000 puts this above --desktop-mode-z-adminbar (9991) so the
10 * overlay truly covers the full viewport. The panel itself is white/light
11 * regardless of wallpaper, providing consistent contrast.
12 *
13 * @since 0.14.0
14 */
15
16 /* ---------------------------------------------------------------------------
17 * Root overlay — full viewport, fades in/out
18 * ------------------------------------------------------------------------- */
19
20 .desktop-mode-ai {
21 position: fixed;
22 inset: 0;
23 z-index: 10000;
24
25 display: flex;
26 align-items: flex-start;
27 justify-content: center;
28
29 /* Land the panel at ~16-18% from the top — feels like Spotlight.
30 clamp keeps it 60px from the top on very short screens and caps
31 at 180px on tall displays so it never feels too low. */
32 padding-top: clamp( 60px, 16vh, 180px );
33 padding-inline: 16px;
34 padding-bottom: 40px;
35
36 opacity: 0;
37 pointer-events: none;
38 transition: opacity 0.18s ease;
39 }
40
41 /* [hidden] keeps the element out of the a11y tree between sessions.
42 Only removed while the overlay is visually visible (open or animating). */
43 .desktop-mode-ai[hidden] {
44 display: none;
45 }
46
47 .desktop-mode-ai.is-open {
48 opacity: 1;
49 pointer-events: auto;
50 }
51
52 /* ---------------------------------------------------------------------------
53 * Backdrop — frosted glass
54 * ------------------------------------------------------------------------- */
55
56 .desktop-mode-ai__backdrop {
57 position: absolute;
58 inset: 0;
59 background: rgba( 0, 0, 0, 0.36 );
60 backdrop-filter: blur( 8px ) saturate( 0.75 );
61 -webkit-backdrop-filter: blur( 8px ) saturate( 0.75 );
62 /* Backdrop is intentionally non-interactive — the overlay stays open
63 until the user explicitly clicks the × close button. */
64 pointer-events: none;
65 }
66
67 /* ---------------------------------------------------------------------------
68 * Panel — the visible card
69 * ------------------------------------------------------------------------- */
70
71 .desktop-mode-ai__panel {
72 position: relative; /* sits above the backdrop */
73 width: 100%;
74 max-width: 600px;
75
76 background: rgba( 255, 255, 255, 0.97 );
77 border-radius: 16px;
78 overflow: hidden;
79
80 /* Tight under-shadow + wide atmospheric shadow */
81 box-shadow:
82 0 0 0 1px rgba( 0, 0, 0, 0.07 ),
83 0 4px 16px rgba( 0, 0, 0, 0.12 ),
84 0 24px 64px rgba( 0, 0, 0, 0.22 );
85
86 /* Spring-physics entrance: starts slightly small + shifted up,
87 overshoots minimally, then settles at 1.0. */
88 transform: scale( 0.96 ) translateY( -8px );
89 transition: transform 0.28s cubic-bezier( 0.34, 1.56, 0.64, 1 );
90 will-change: transform;
91 }
92
93 .desktop-mode-ai.is-open .desktop-mode-ai__panel {
94 transform: scale( 1 ) translateY( 0 );
95 }
96
97 /* ---------------------------------------------------------------------------
98 * Header — accent-tinted identity strip
99 * ------------------------------------------------------------------------- */
100
101 .desktop-mode-ai__header {
102 display: flex;
103 align-items: center;
104 gap: 8px;
105 padding: 10px 14px;
106 /* Gradient fades from a very faint accent tint to white — visible
107 on fresh/blue schemes, subtle on light schemes. */
108 background: linear-gradient(
109 to bottom,
110 color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 8%, #fff ),
111 #fff
112 );
113 border-bottom: 1px solid rgba( 0, 0, 0, 0.06 );
114 }
115
116 .desktop-mode-ai__header-icon {
117 display: flex;
118 align-items: center;
119 color: var( --wp-admin-theme-color, #2271b1 );
120 /* Glow so the sparkle feels alive on dark or saturated themes */
121 filter: drop-shadow(
122 0 0 5px color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 55%, transparent )
123 );
124 }
125
126 .desktop-mode-ai__header-label {
127 flex: 1;
128 font-size: 11px;
129 font-weight: 700;
130 letter-spacing: 0.09em;
131 text-transform: uppercase;
132 color: var( --wp-admin-theme-color, #2271b1 );
133 }
134
135 /* .desktop-mode-ai__close styles moved to the bottom results section */
136
137 /* ---------------------------------------------------------------------------
138 * Input row — the main interaction surface
139 * ------------------------------------------------------------------------- */
140
141 .desktop-mode-ai__input-wrap {
142 display: flex;
143 align-items: center;
144 gap: 10px;
145 padding: 14px 16px;
146 /* Thin highlight at the bottom of the input area, visible when focused */
147 border-bottom: 1px solid transparent;
148 transition: border-color 0.15s ease;
149 }
150
151 .desktop-mode-ai__input-wrap:has( .desktop-mode-ai__input:focus ) {
152 border-bottom-color: rgba( 0, 0, 0, 0.06 );
153 }
154
155 /* Input-row sparkle — visible always, tints toward the accent on focus
156 so the panel reads as "AI assistant" rather than "search box". */
157 .desktop-mode-ai__input-icon {
158 flex-shrink: 0;
159 display: flex;
160 align-items: center;
161 color: var( --wp-admin-theme-color, #2271b1 );
162 opacity: 0.55;
163 transition: opacity 0.18s ease, transform 0.18s ease;
164 }
165
166 .desktop-mode-ai__input-wrap:has( .desktop-mode-ai__input:focus ) .desktop-mode-ai__input-icon {
167 opacity: 1;
168 transform: scale( 1.08 );
169 }
170
171 .desktop-mode-ai__input {
172 flex: 1;
173 min-width: 0;
174 appearance: none;
175 border: none;
176 outline: none;
177 background: transparent;
178 font: inherit;
179 font-size: 17px;
180 font-weight: 400;
181 line-height: 1.4;
182 color: #1d2327;
183 }
184
185 .desktop-mode-ai__input::placeholder {
186 color: #c3c4c7;
187 font-weight: 400;
188 }
189
190 /* Submit button — hidden until the user types something, then
191 springs in via opacity + scale transition. */
192 .desktop-mode-ai__submit {
193 flex-shrink: 0;
194 display: flex;
195 align-items: center;
196 justify-content: center;
197 width: 30px;
198 height: 30px;
199 border: none;
200 border-radius: 8px;
201 background: var( --wp-admin-theme-color, #2271b1 );
202 color: #fff;
203 cursor: pointer;
204 padding: 0;
205 opacity: 0;
206 transform: scale( 0.7 );
207 pointer-events: none;
208 transition:
209 opacity 0.2s ease,
210 transform 0.2s cubic-bezier( 0.34, 1.56, 0.64, 1 );
211 }
212
213 .desktop-mode-ai__submit.has-value {
214 opacity: 1;
215 transform: scale( 1 );
216 pointer-events: auto;
217 }
218
219 .desktop-mode-ai__submit:hover {
220 filter: brightness( 1.1 );
221 }
222
223 .desktop-mode-ai__submit:active {
224 transform: scale( 0.92 );
225 }
226
227 .desktop-mode-ai__submit:focus-visible {
228 outline: 2px solid var( --wp-admin-theme-color, #2271b1 );
229 outline-offset: 2px;
230 }
231
232 /* ---------------------------------------------------------------------------
233 * Footer — hints and keyboard shortcut legend
234 * ------------------------------------------------------------------------- */
235
236 .desktop-mode-ai__footer {
237 display: flex;
238 align-items: center;
239 justify-content: space-between;
240 gap: 8px;
241 padding: 8px 16px 10px;
242 background: rgba( 0, 0, 0, 0.018 );
243 border-top: 1px solid rgba( 0, 0, 0, 0.05 );
244 }
245
246 .desktop-mode-ai__footer-hint {
247 font-size: 11px;
248 color: #a7aaad;
249 }
250
251 .desktop-mode-ai__footer-keys {
252 display: flex;
253 align-items: center;
254 gap: 2px;
255 font-size: 11px;
256 color: #b4b9be;
257 white-space: nowrap;
258 flex-shrink: 0;
259 }
260
261 .desktop-mode-ai__footer-keys kbd {
262 font-family: inherit;
263 font-size: 10px;
264 padding: 1px 5px;
265 border: 1px solid rgba( 0, 0, 0, 0.1 );
266 border-radius: 4px;
267 background: rgba( 0, 0, 0, 0.03 );
268 color: #646970;
269 }
270
271 /* ---------------------------------------------------------------------------
272 * Admin bar AI button — ⌘K badge + sparkle icon
273 * Styles applied via wp_add_inline_style( 'admin-bar', ... ) in PHP.
274 * The styles here are for reference; the actual output lives in
275 * includes/admin-bar.php :: desktop_mode_enqueue_toggle_assets().
276 * ------------------------------------------------------------------------- */
277
278 /* (The admin-bar button styles are added inline in PHP to keep them
279 on the admin-bar handle so they load even before desktop-mode.js.) */
280
281 /* ---------------------------------------------------------------------------
282 * Close button — × icon, top-right of header
283 * ------------------------------------------------------------------------- */
284
285 .desktop-mode-ai__close {
286 display: inline-flex;
287 align-items: center;
288 justify-content: center;
289 width: 28px;
290 height: 28px;
291 appearance: none;
292 background: rgba( 0, 0, 0, 0.05 );
293 border: 1px solid rgba( 0, 0, 0, 0.1 );
294 border-radius: 6px;
295 cursor: pointer;
296 color: #646970;
297 padding: 0;
298 flex-shrink: 0;
299 transition: background 0.1s, color 0.1s, border-color 0.1s;
300 }
301
302 .desktop-mode-ai__close:hover {
303 background: rgba( 0, 0, 0, 0.09 );
304 border-color: rgba( 0, 0, 0, 0.2 );
305 color: #1d2327;
306 }
307
308 .desktop-mode-ai__close:focus-visible {
309 outline: 2px solid var( --wp-admin-theme-color, #2271b1 );
310 outline-offset: 2px;
311 }
312
313 /* ---------------------------------------------------------------------------
314 * Results / conversation area — three render modes:
315 * • Suggestions (empty state, example prompts)
316 * • Thinking (spinner + "Thinking…")
317 * • Response (assistant bubble + entity card | admin links | nothing)
318 * ------------------------------------------------------------------------- */
319
320 .desktop-mode-ai__results {
321 border-top: 1px solid rgba( 0, 0, 0, 0.06 );
322 max-height: 420px;
323 overflow-y: auto;
324 overflow-x: hidden;
325 padding: 14px 16px;
326 display: flex;
327 flex-direction: column;
328 gap: 12px;
329 }
330
331 /* -----------------------------------------------------------------
332 * Suggestion chips (empty state)
333 * ---------------------------------------------------------------- */
334
335 .desktop-mode-ai__suggestions-label {
336 margin: 0 0 4px;
337 font-size: 11px;
338 font-weight: 600;
339 text-transform: uppercase;
340 letter-spacing: 0.08em;
341 color: #8c8f94;
342 }
343
344 .desktop-mode-ai__suggestions-list {
345 display: flex;
346 flex-wrap: wrap;
347 gap: 6px;
348 }
349
350 .desktop-mode-ai__suggestion {
351 appearance: none;
352 border: 1px solid rgba( 0, 0, 0, 0.1 );
353 background: rgba( 0, 0, 0, 0.02 );
354 border-radius: 999px;
355 padding: 5px 12px;
356 font: inherit;
357 font-size: 12px;
358 color: #50575e;
359 cursor: pointer;
360 transition: background 0.12s, border-color 0.12s, color 0.12s;
361 }
362
363 .desktop-mode-ai__suggestion:hover {
364 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 8%, #fff );
365 border-color: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 30%, rgba( 0, 0, 0, 0.1 ) );
366 color: var( --wp-admin-theme-color, #2271b1 );
367 }
368
369 /* -----------------------------------------------------------------
370 * Thinking / error state
371 * ---------------------------------------------------------------- */
372
373 .desktop-mode-ai__state {
374 display: flex;
375 align-items: center;
376 gap: 10px;
377 font-size: 13px;
378 color: #646970;
379 }
380
381 .desktop-mode-ai__state--error {
382 color: #d63638;
383 align-items: flex-start;
384 }
385
386 /* Inline "AI Settings" link inside the "AI not enabled" error — opens
387 * OS Settings on the AI tab. Styled as a link within the surrounding
388 * error text, not a standalone button: inherits the error color and
389 * flows with the sentence. */
390 .desktop-mode-ai__settings-link {
391 appearance: none;
392 border: 0;
393 margin: 0;
394 padding: 0;
395 background: none;
396 font: inherit;
397 font-weight: 600;
398 color: inherit;
399 text-decoration: underline;
400 text-underline-offset: 2px;
401 }
402
403 .desktop-mode-ai__settings-link:hover {
404 text-decoration: none;
405 }
406
407 /* The shell forces `cursor: default !important` on every clickable
408 * surface (see the cursor policy at the top of desktop.css). This
409 * recovery link is an explicit, user-approved exception: it keeps a
410 * pointer so it reads as the actionable link it is. Scoped under
411 * `body.desktop-mode-active` so it out-specifies the policy's
412 * `!important` rule, same trick the resize-handle exceptions use. */
413 body.desktop-mode-active .desktop-mode-ai__settings-link {
414 cursor: pointer !important;
415 }
416
417 @keyframes desktop-mode-spin {
418 to { transform: rotate( 360deg ); }
419 }
420
421 .desktop-mode-ai__spinner-icon {
422 animation: desktop-mode-spin 0.9s linear infinite;
423 flex-shrink: 0;
424 color: var( --wp-admin-theme-color, #2271b1 );
425 }
426
427 /* -----------------------------------------------------------------
428 * Assistant message bubble — prefix for every response
429 * ---------------------------------------------------------------- */
430
431 .desktop-mode-ai__bubble {
432 display: flex;
433 align-items: flex-start;
434 gap: 10px;
435 }
436
437 .desktop-mode-ai__bubble-icon {
438 flex-shrink: 0;
439 display: flex;
440 align-items: center;
441 justify-content: center;
442 width: 24px;
443 height: 24px;
444 border-radius: 50%;
445 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 12%, #fff );
446 color: var( --wp-admin-theme-color, #2271b1 );
447 }
448
449 .desktop-mode-ai__bubble-text {
450 padding-top: 3px;
451 font-size: 13px;
452 line-height: 1.5;
453 color: #1d2327;
454 flex: 1;
455 min-width: 0;
456 }
457
458 /* Markdown output inside the assistant bubble — the renderer emits
459 <p>, <ul>/<ol>/<li>, <strong>, <em>, <code>, <a>. Reset margins on
460 outer paragraphs so single-paragraph replies (the common case)
461 don't get top/bottom spacing; list items get the usual disc/decimal
462 markers inside a compact indent. */
463 .desktop-mode-ai__bubble-text > p,
464 .desktop-mode-ai__bubble-text > ul,
465 .desktop-mode-ai__bubble-text > ol {
466 margin: 0 0 6px;
467 }
468 .desktop-mode-ai__bubble-text > :last-child {
469 margin-bottom: 0;
470 }
471 .desktop-mode-ai__bubble-text ul,
472 .desktop-mode-ai__bubble-text ol {
473 padding-inline-start: 20px;
474 }
475 .desktop-mode-ai__bubble-text li {
476 margin-bottom: 2px;
477 }
478 .desktop-mode-ai__bubble-text code {
479 background: rgba( 0, 0, 0, 0.05 );
480 padding: 1px 5px;
481 border-radius: 4px;
482 font-family: Menlo, Consolas, monospace;
483 font-size: 11.5px;
484 }
485 .desktop-mode-ai__bubble-text a {
486 color: var( --wp-admin-theme-color, #2271b1 );
487 text-decoration: underline;
488 text-underline-offset: 2px;
489 }
490 .desktop-mode-ai__bubble-text a:hover {
491 text-decoration: none;
492 }
493 .desktop-mode-ai__bubble-text strong {
494 font-weight: 600;
495 color: #1d2327;
496 }
497
498 /* -----------------------------------------------------------------
499 * Entity card — shown under the bubble when answer_type=entity
500 * ---------------------------------------------------------------- */
501
502 .desktop-mode-ai__entity {
503 display: flex;
504 flex-direction: column;
505 gap: 8px;
506 padding: 12px 14px;
507 background: rgba( 0, 0, 0, 0.02 );
508 border: 1px solid rgba( 0, 0, 0, 0.08 );
509 border-radius: 10px;
510 }
511
512 .desktop-mode-ai__entity-header {
513 display: flex;
514 align-items: center;
515 gap: 8px;
516 flex-wrap: wrap;
517 }
518
519 .desktop-mode-ai__entity-topic {
520 display: inline-block;
521 font-size: 10px;
522 font-weight: 600;
523 text-transform: uppercase;
524 letter-spacing: 0.07em;
525 color: var( --wp-admin-theme-color, #2271b1 );
526 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 10%, transparent );
527 padding: 2px 7px;
528 border-radius: 999px;
529 }
530
531 .desktop-mode-ai__entity-type {
532 font-size: 10px;
533 font-weight: 600;
534 text-transform: uppercase;
535 letter-spacing: 0.07em;
536 color: #8c8f94;
537 }
538
539 .desktop-mode-ai__entity-title {
540 margin: 0;
541 font-size: 14px;
542 font-weight: 600;
543 color: #1d2327;
544 line-height: 1.35;
545 }
546
547 .desktop-mode-ai__entity-summary {
548 margin: 0;
549 font-size: 12px;
550 line-height: 1.5;
551 color: #50575e;
552 }
553
554 /* Primary action — opens the entity in a legacy iframe window inside
555 the desktop (wp-admin edit URL). */
556 .desktop-mode-ai__entity-open {
557 appearance: none;
558 display: inline-flex;
559 align-items: center;
560 gap: 6px;
561 align-self: flex-start;
562 padding: 6px 14px;
563 border: none;
564 border-radius: 8px;
565 background: var( --wp-admin-theme-color, #2271b1 );
566 color: #fff;
567 font: inherit;
568 font-size: 12px;
569 font-weight: 500;
570 cursor: pointer;
571 transition: filter 0.1s, transform 0.1s;
572 }
573
574 .desktop-mode-ai__entity-open:hover {
575 filter: brightness( 1.1 );
576 }
577
578 .desktop-mode-ai__entity-open:active {
579 transform: scale( 0.97 );
580 }
581
582 .desktop-mode-ai__entity-open:focus-visible {
583 outline: 2px solid var( --wp-admin-theme-color, #2271b1 );
584 outline-offset: 2px;
585 }
586
587 .desktop-mode-ai__entity-open svg {
588 margin-inline-start: 2px;
589 }
590
591 /* -----------------------------------------------------------------
592 * Admin-links list — shown when answer_type=navigation
593 * ---------------------------------------------------------------- */
594
595 .desktop-mode-ai__admin-links {
596 display: flex;
597 flex-direction: column;
598 gap: 6px;
599 }
600
601 .desktop-mode-ai__admin-link {
602 appearance: none;
603 display: flex;
604 align-items: center;
605 gap: 12px;
606 padding: 10px 12px;
607 background: rgba( 0, 0, 0, 0.02 );
608 border: 1px solid rgba( 0, 0, 0, 0.08 );
609 border-radius: 10px;
610 cursor: pointer;
611 text-align: start;
612 font: inherit;
613 color: inherit;
614 transition: background 0.12s, border-color 0.12s, transform 0.08s;
615 }
616
617 .desktop-mode-ai__admin-link:hover {
618 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 6%, #fff );
619 border-color: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 25%, rgba( 0, 0, 0, 0.08 ) );
620 }
621
622 .desktop-mode-ai__admin-link:active {
623 transform: scale( 0.99 );
624 }
625
626 .desktop-mode-ai__admin-link:focus-visible {
627 outline: 2px solid var( --wp-admin-theme-color, #2271b1 );
628 outline-offset: 2px;
629 }
630
631 .desktop-mode-ai__admin-link-icon {
632 flex-shrink: 0;
633 display: flex;
634 align-items: center;
635 justify-content: center;
636 width: 32px;
637 height: 32px;
638 font-size: 18px;
639 color: var( --wp-admin-theme-color, #2271b1 );
640 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 10%, #fff );
641 border-radius: 8px;
642 }
643
644 .desktop-mode-ai__admin-link-body {
645 flex: 1;
646 display: flex;
647 flex-direction: column;
648 gap: 2px;
649 min-width: 0;
650 }
651
652 .desktop-mode-ai__admin-link-title {
653 font-size: 13px;
654 font-weight: 600;
655 color: #1d2327;
656 }
657
658 .desktop-mode-ai__admin-link-desc {
659 font-size: 11px;
660 color: #646970;
661 line-height: 1.4;
662 overflow: hidden;
663 text-overflow: ellipsis;
664 white-space: nowrap;
665 }
666
667 .desktop-mode-ai__admin-link-arrow {
668 flex-shrink: 0;
669 color: #c3c4c7;
670 transition: color 0.12s, transform 0.12s;
671 }
672
673 .desktop-mode-ai__admin-link:hover .desktop-mode-ai__admin-link-arrow {
674 color: var( --wp-admin-theme-color, #2271b1 );
675 transform: translateX( 2px );
676 }
677
678 /* -----------------------------------------------------------------
679 * Command palette — shown when the user types "/" in the input.
680 * Filtered list of plugin-registered slash-commands. Mirrors the
681 * admin-link list's visual shape (icon + title + description) but
682 * uses a dedicated set of classes so each can evolve independently.
683 * ---------------------------------------------------------------- */
684
685 .desktop-mode-ai__cmd-list {
686 display: flex;
687 flex-direction: column;
688 gap: 4px;
689 }
690
691 .desktop-mode-ai__cmd-item {
692 appearance: none;
693 display: flex;
694 align-items: flex-start;
695 gap: 10px;
696 padding: 8px 10px;
697 background: transparent;
698 border: 1px solid transparent;
699 border-radius: 8px;
700 cursor: pointer;
701 text-align: start;
702 font: inherit;
703 color: inherit;
704 transition: background 0.1s, border-color 0.1s;
705 }
706
707 /*
708 * Single-line rows (no `.desktop-mode-ai__cmd-desc` child) need the
709 * icon + label baseline-centered instead of top-aligned, otherwise
710 * the label floats to the top of the taller icon tile and reads as
711 * misaligned. `:has()` is widely supported in evergreen browsers the
712 * desktop shell already targets.
713 */
714 .desktop-mode-ai__cmd-item:not(:has(.desktop-mode-ai__cmd-desc)) {
715 align-items: center;
716 }
717
718 .desktop-mode-ai__cmd-item:hover,
719 .desktop-mode-ai__cmd-item.is-selected {
720 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 8%, #fff );
721 border-color: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 25%, rgba( 0, 0, 0, 0.08 ) );
722 }
723
724 /*
725 * When keyboard navigation is driving selection, suppress the :hover
726 * style on rows. Without this, arrowing the cursor past the row that
727 * happens to sit under the mouse pointer paints BOTH rows as active
728 * — the keyboard target from `.is-selected` and the pointer target
729 * from `:hover`. The JS toggles this class on the list container on
730 * ArrowUp/Down and clears it on the next real `mousemove`.
731 */
732 .desktop-mode-ai__cmd-list--kb-nav .desktop-mode-ai__cmd-item:hover {
733 background: transparent;
734 border-color: transparent;
735 }
736 .desktop-mode-ai__cmd-list--kb-nav .desktop-mode-ai__cmd-item.is-selected:hover {
737 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 8%, #fff );
738 border-color: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 25%, rgba( 0, 0, 0, 0.08 ) );
739 }
740
741 .desktop-mode-ai__cmd-item:focus-visible {
742 outline: 2px solid var( --wp-admin-theme-color, #2271b1 );
743 outline-offset: 2px;
744 }
745
746 .desktop-mode-ai__cmd-icon {
747 flex-shrink: 0;
748 display: flex;
749 align-items: center;
750 justify-content: center;
751 width: 36px;
752 height: 36px;
753 font-size: 20px;
754 color: var( --wp-admin-theme-color, #2271b1 );
755 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 10%, #fff );
756 border-radius: 7px;
757 }
758
759 /*
760 * Dashicons ship at a 20px baseline; the tile was scaled up but
761 * dashicons glyphs need explicit sizing to follow.
762 */
763 .desktop-mode-ai__cmd-icon.dashicons {
764 font-size: 22px;
765 width: 36px;
766 height: 36px;
767 line-height: 36px;
768 }
769
770 /*
771 * Raw-SVG icon slot (command bridge forwards rendered
772 * `@wordpress/icons` markup). Constrain the inline SVG so it sits
773 * centered inside the tile regardless of the viewBox the source icon
774 * shipped with.
775 */
776 .desktop-mode-ai__cmd-icon--svg svg {
777 width: 24px;
778 height: 24px;
779 fill: currentColor;
780 }
781
782 .desktop-mode-ai__cmd-body {
783 flex: 1;
784 display: flex;
785 flex-direction: column;
786 gap: 2px;
787 min-width: 0;
788 }
789
790 .desktop-mode-ai__cmd-title {
791 font-size: 13px;
792 font-weight: 600;
793 color: #1d2327;
794 font-family: Menlo, Consolas, monospace;
795 letter-spacing: -0.01em;
796 }
797
798 .desktop-mode-ai__cmd-hint {
799 font-weight: 400;
800 color: #8c8f94;
801 font-size: 12px;
802 margin-inline-start: 6px;
803 }
804
805 .desktop-mode-ai__cmd-desc {
806 font-size: 11.5px;
807 color: #646970;
808 line-height: 1.4;
809 font-family: inherit;
810 letter-spacing: 0;
811 }
812
813 /* Args mode — a single row showing the locked-in command. Same
814 visual language as the list item but with an "Enter to run" hint. */
815 .desktop-mode-ai__cmd-active {
816 display: flex;
817 align-items: flex-start;
818 gap: 10px;
819 padding: 10px 12px;
820 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 10%, #fff );
821 border: 1px solid color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 30%, rgba( 0, 0, 0, 0.08 ) );
822 border-radius: 8px;
823 }
824
825 .desktop-mode-ai__cmd-enter-hint {
826 font-size: 11px;
827 color: #646970;
828 margin-top: 2px;
829 font-family: inherit;
830 }
831
832 .desktop-mode-ai__cmd-enter-hint kbd {
833 font-family: inherit;
834 font-size: 10px;
835 padding: 1px 4px;
836 border: 1px solid rgba( 0, 0, 0, 0.12 );
837 border-radius: 3px;
838 background: rgba( 0, 0, 0, 0.03 );
839 color: #646970;
840 }
841
842 /* Suggestion list shown under the locked-in command in args mode.
843 Visually identical to the command picker rows but without the
844 border-highlight — the "active" glow already lives on the command
845 header directly above. */
846 .desktop-mode-ai__cmd-suggest-list {
847 display: flex;
848 flex-direction: column;
849 gap: 2px;
850 margin-top: 6px;
851 }
852
853 .desktop-mode-ai__cmd-suggest-item {
854 appearance: none;
855 display: flex;
856 align-items: flex-start;
857 gap: 10px;
858 padding: 6px 10px;
859 background: transparent;
860 border: 1px solid transparent;
861 border-radius: 6px;
862 cursor: pointer;
863 text-align: start;
864 font: inherit;
865 color: inherit;
866 transition: background 0.1s, border-color 0.1s;
867 }
868
869 .desktop-mode-ai__cmd-suggest-item:hover,
870 .desktop-mode-ai__cmd-suggest-item.is-selected {
871 background: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 8%, #fff );
872 border-color: color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 25%, rgba( 0, 0, 0, 0.08 ) );
873 }
874
875 .desktop-mode-ai__cmd-suggest-label {
876 font-size: 13px;
877 font-weight: 500;
878 color: #1d2327;
879 }
880
881 /* Empty / "no matches" state for the palette */
882 .desktop-mode-ai__state--empty {
883 color: #8c8f94;
884 font-size: 13px;
885 }
886
887 /* -----------------------------------------------------------------
888 * Continue button (budget-exhausted state)
889 * ---------------------------------------------------------------- */
890
891 .desktop-mode-ai__continue-btn {
892 appearance: none;
893 display: inline-flex;
894 align-items: center;
895 align-self: flex-start;
896 gap: 6px;
897 font: inherit;
898 font-size: 12px;
899 font-weight: 500;
900 padding: 6px 12px;
901 border: 1px dashed rgba( 0, 0, 0, 0.2 );
902 border-radius: 6px;
903 background: transparent;
904 color: #50575e;
905 cursor: pointer;
906 transition: background 0.1s, border-color 0.1s, color 0.1s;
907 }
908
909 .desktop-mode-ai__continue-btn:hover {
910 background: rgba( 0, 0, 0, 0.04 );
911 border-color: rgba( 0, 0, 0, 0.3 );
912 color: #1d2327;
913 }
914