PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 0.9.6
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v0.9.6
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.6, at assets/css/ai-assistant.css

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