/* Command Palette Component Styles */

.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  animation: cmd-fade-in 0.16s ease-out;
}

@keyframes cmd-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cmd-palette {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: cmd-scale-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cmd-scale-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-elevated);
}

.cmd-input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-heading);
  outline: none;
}

.cmd-input::placeholder {
  color: var(--muted);
}

.cmd-badge {
  font-size: 10.5px;
  font-family: var(--font-mono);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--muted);
}

.cmd-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmd-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--ink);
  transition: all 100ms ease;
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--surface-subtle);
  color: var(--ink-heading);
  transform: translateX(2px);
}

[data-theme="dark"] .cmd-item.selected {
  background: rgba(59, 130, 246, 0.15);
  color: #ffffff;
}

.cmd-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.cmd-item-info {
  flex: 1;
  min-width: 0;
}

.cmd-item-title {
  font-size: 13.5px;
  font-weight: 600;
  display: block;
}

.cmd-item-desc {
  font-size: 11.5px;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-item-kbd {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  background: var(--surface-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.cmd-footer {
  padding: 10px 18px;
  background: var(--surface-subtle);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
}

.cmd-footer-keys {
  display: flex;
  gap: 12px;
}
