spaxel/dashboard/css/command-palette.css
jedarden 8708c02929 feat(dashboard): polish tap-to-jump UX and remove expert-mode gating
- Improve link highlighting with Fresnel health color mapping
- Route re-provision through live page via query param for reliability
- Remove simple-mode gating from command palette (now available everywhere except ambient)
- Update Fresnel tests, fleet page unpaired node UX, and help articles

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 23:16:56 -04:00

262 lines
5.1 KiB
CSS

/**
* Spaxel Dashboard — Command Palette Styles (Component 34)
*
* Activated by Ctrl+K / Cmd+K.
*/
/* ===== Overlay backdrop ===== */
.cp-overlay {
display: none;
position: fixed;
inset: 0;
z-index: 9000;
}
.cp-overlay.cp-visible {
display: block;
}
.cp-backdrop {
position: absolute;
inset: 0;
background: var(--shadow-xl);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
animation: cp-fade-in 0.12s ease-out;
}
@keyframes cp-fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* ===== Container ===== */
.cp-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
max-width: 600px;
background: var(--slate-3);
border-radius: var(--radius-card);
box-shadow: 0 24px 64px var(--overlay-strong), 0 0 0 1px var(--border-subtle);
overflow: hidden;
animation: cp-slide-in 0.14s ease-out;
display: flex;
flex-direction: column;
}
@keyframes cp-slide-in {
from {
opacity: 0;
transform: translate(-50%, calc(-50% - 12px));
}
to {
opacity: 1;
transform: translate(-50%, -50%);
}
}
/* ===== Search row ===== */
.cp-search-row {
display: flex;
align-items: center;
gap: var(--space-250);
padding: 14px var(--space-4);
border-bottom: 1px solid var(--border-default);
}
.cp-search-icon {
font-size: var(--text-base);
flex-shrink: 0;
opacity: 0.6;
}
.cp-input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--slate-12);
font-size: var(--text-md);
font-family: inherit;
line-height: var(--lh-body);
}
.cp-input::placeholder {
color: var(--slate-9);
}
.cp-esc-hint {
font-size: var(--text-2xs);
color: var(--slate-7);
background: var(--highlight-subtle);
border-radius: var(--radius-control);
padding: var(--space-half) var(--space-175);
flex-shrink: 0;
font-family: var(--font-mono);
}
/* ===== Results list ===== */
.cp-results {
list-style: none;
margin: 0;
padding: 6px 0;
max-height: 360px; /* ~8 items */
overflow-y: auto;
overflow-x: hidden;
}
.cp-results::-webkit-scrollbar {
width: 6px;
}
.cp-results::-webkit-scrollbar-track {
background: transparent;
}
.cp-results::-webkit-scrollbar-thumb {
background: var(--bg-active);
border-radius: var(--radius-control);
}
/* Group header */
.cp-group-header {
padding: 6px var(--space-4) var(--space-1);
font-size: var(--text-3xs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--slate-7);
}
/* Empty state */
.cp-empty {
padding: var(--space-8) var(--space-4);
text-align: center;
color: var(--slate-7);
font-size: var(--text-sm);
}
/* Result item */
.cp-item {
display: flex;
align-items: center;
gap: var(--space-250);
padding: 9px var(--space-4);
cursor: pointer;
transition: background 0.1s;
}
.cp-item:hover {
background: var(--border-subtle);
}
.cp-item-selected {
background: var(--row-selected) !important;
}
.cp-item-icon {
font-size: var(--text-base);
flex-shrink: 0;
width: 20px;
text-align: center;
line-height: 1;
}
.cp-item-body {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 1px;
}
.cp-item-label {
font-size: var(--text-sm);
font-weight: 500;
color: var(--slate-12);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cp-item-secondary {
font-size: var(--text-xs);
color: var(--slate-9);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cp-item-arrow {
font-size: var(--text-xl);
color: var(--slate-7);
flex-shrink: 0;
line-height: 1;
}
.cp-item-hint {
font-family: var(--font-mono);
font-size: var(--text-3xs);
color: var(--slate-7);
background: var(--highlight-subtle);
border: 1px solid var(--border-default);
border-radius: var(--radius-control);
padding: var(--space-half) var(--space-175);
line-height: 1;
flex-shrink: 0;
margin-right: var(--space-175);
}
.cp-item-selected .cp-item-arrow {
color: var(--blue-9);
}
/* ===== Responsive ===== */
@media (max-width: 640px) {
.cp-container {
width: 96%;
top: 12%;
transform: translateX(-50%);
}
.cp-shortcut-hint {
display: none !important;
}
}
/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
.cp-backdrop,
.cp-container {
animation: none;
}
}
/* ===== Toolbar shortcut hint ===== */
.cp-shortcut-hint {
cursor: pointer;
opacity: 0.6;
transition: opacity var(--transition-fast);
}
.cp-shortcut-hint:hover {
opacity: 1;
}
.cp-shortcut-hint kbd {
font-family: var(--font-mono);
font-size: var(--text-3xs);
color: var(--slate-9);
background: var(--highlight-subtle);
border: 1px solid var(--border-default);
border-radius: var(--radius-control);
padding: var(--space-half) var(--space-175);
line-height: 1;
}
.cp-shortcut-hint-dismissed {
display: none !important;
}