/**
 * WAVULT COMMAND PALETTE — wavult-cmdk.css
 * Apple Spotlight-inspired universal ⌘K palette
 * Version: 1.0.0 | Built: 2026-05-04
 * Theme: Warm Enterprise (#FAF9F6 · #001E50 · #C8763A)
 */

/* ── Overlay ─────────────────────────────────────────────────── */
.wcmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 30, 80, 0.28);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.wcmdk-overlay.wcmdk-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal container ─────────────────────────────────────────── */
.wcmdk-modal {
  width: 640px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(0, 30, 80, 0.14);
  border-radius: 2px;
  box-shadow:
    0 4px 24px rgba(0, 30, 80, 0.18),
    0 1px 4px rgba(0, 30, 80, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-12px) scale(0.985);
  transition: transform 240ms cubic-bezier(0.25, 1, 0.5, 1),
              opacity 160ms ease;
  opacity: 0;
}
.wcmdk-overlay.wcmdk-open .wcmdk-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wcmdk-overlay,
  .wcmdk-modal {
    transition: none !important;
  }
}

/* ── Search input row ─────────────────────────────────────────── */
.wcmdk-search-row {
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 30, 80, 0.08);
  min-height: 52px;
  flex-shrink: 0;
}
.wcmdk-search-icon {
  font-size: 15px;
  color: #5E6880;
  flex-shrink: 0;
  font-family: -apple-system, system-ui, 'Inter Tight', sans-serif;
  line-height: 1;
}
.wcmdk-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: -apple-system, system-ui, 'Inter Tight', sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: #001E50;
  caret-color: #C8763A;
  padding: 0;
}
.wcmdk-input::placeholder {
  color: #8C94A4;
}
.wcmdk-esc-hint {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  color: #8C94A4;
  background: rgba(0, 30, 80, 0.05);
  border: 1px solid rgba(0, 30, 80, 0.1);
  border-radius: 3px;
  padding: 2px 6px;
  flex-shrink: 0;
  user-select: none;
  cursor: pointer;
}
.wcmdk-esc-hint:hover {
  background: rgba(0, 30, 80, 0.09);
}

/* ── Results list ─────────────────────────────────────────────── */
.wcmdk-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,30,80,0.15) transparent;
}
.wcmdk-results::-webkit-scrollbar {
  width: 4px;
}
.wcmdk-results::-webkit-scrollbar-thumb {
  background: rgba(0,30,80,0.15);
  border-radius: 2px;
}

/* ── Group header ─────────────────────────────────────────────── */
.wcmdk-group-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8C94A4;
  padding: 8px 16px 4px;
  user-select: none;
}

/* ── Result item ─────────────────────────────────────────────── */
.wcmdk-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 80ms ease;
  border-left: 2px solid transparent;
  position: relative;
}
.wcmdk-result:hover {
  background: rgba(0, 61, 122, 0.06);
}
.wcmdk-result.wcmdk-selected {
  background: rgba(0, 61, 122, 0.12);
  border-left-color: #003D7A;
}
.wcmdk-result-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: -apple-system, system-ui, 'Inter Tight', sans-serif;
  flex-shrink: 0;
  background: rgba(0, 30, 80, 0.06);
  color: #001E50;
}
.wcmdk-result-icon.type-agent  { background: rgba(200, 118, 58, 0.12); color: #C8763A; }
.wcmdk-result-icon.type-task   { background: rgba(0, 61, 122, 0.1);   color: #003D7A; }
.wcmdk-result-icon.type-action { background: rgba(0, 122, 51, 0.1);   color: #007A33; }
.wcmdk-result-icon.type-nav    { background: rgba(0, 30, 80, 0.06);   color: #001E50; }
.wcmdk-result-icon.type-system { background: rgba(184,134,11, 0.1);   color: #B8860B; }
.wcmdk-result-icon.type-kpi    { background: rgba(0, 61, 122, 0.08);  color: #003D7A; }

.wcmdk-result-text {
  flex: 1;
  min-width: 0;
}
.wcmdk-result-title {
  font-family: -apple-system, system-ui, 'Inter Tight', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #001E50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.wcmdk-result-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #5E6880;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  margin-top: 1px;
}
.wcmdk-result-shortcut {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #8C94A4;
  background: rgba(0, 30, 80, 0.05);
  border: 1px solid rgba(0, 30, 80, 0.08);
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
  user-select: none;
}

/* ── Empty / loading states ────────────────────────────────────── */
.wcmdk-empty {
  padding: 32px 16px;
  text-align: center;
  color: #8C94A4;
  font-family: -apple-system, system-ui, 'Inter Tight', sans-serif;
  font-size: 13px;
}

/* ── Footer ──────────────────────────────────────────────────── */
.wcmdk-footer {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  background: rgba(0, 30, 80, 0.03);
  border-top: 1px solid rgba(0, 30, 80, 0.07);
  flex-shrink: 0;
}
.wcmdk-footer-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #8C94A4;
  display: flex;
  align-items: center;
  gap: 4px;
}
.wcmdk-footer-hint kbd {
  background: rgba(0,30,80,0.06);
  border: 1px solid rgba(0,30,80,0.1);
  border-radius: 2px;
  padding: 0 4px;
  font-family: inherit;
  font-size: 10px;
}

/* ── ⌘K pill trigger button ──────────────────────────────────── */
.wcmdk-trigger-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  transition: background 120ms ease, border-color 120ms ease;
  user-select: none;
  flex-shrink: 0;
}
.wcmdk-trigger-pill:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
}
.wcmdk-trigger-pill-icon {
  font-size: 13px;
  opacity: 0.9;
}
