/**
 * Command Palette Styles
 * Cmd+K Quick Actions for power users
 */

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.command-palette.open {
  display: flex;
}

.palette-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.palette-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(-20px);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.command-palette.open .palette-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.palette-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.palette-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.palette-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  background: transparent;
}

.palette-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.palette-hint {
  padding: 4px 8px;
  background: #f3f4f6;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  font-family: monospace;
}

.palette-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.palette-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 14px;
}

.palette-group {
  margin-bottom: 8px;
}

.palette-group:last-child {
  margin-bottom: 0;
}

.palette-group-title {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.palette-item:hover,
.palette-item.selected {
  background: #f3f4f6;
}

.palette-item.selected {
  background: rgba(0, 113, 227, 0.1);
}

.palette-item-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.palette-footer {
  display: flex;
  justify-content: center;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
}

.palette-hint-text {
  font-size: 12px;
  color: #9ca3af;
}

.palette-hint-text kbd {
  display: inline-block;
  padding: 2px 6px;
  background: #f3f4f6;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  margin: 0 2px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .command-palette {
    padding-top: 0;
    align-items: flex-end;
  }

  .palette-container {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
  }

  .palette-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}
