/* Module palette — command palette ⌘K (spec DS CommandPalette). */

.palette__overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(24, 26, 34, 0.34);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 16px 16px;
}
.palette__overlay[hidden] { display: none; }

.palette {
  width: min(560px, 100%);
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 32px 70px -24px rgba(16, 24, 40, 0.55);
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.18s ease both;
}

.palette__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-150);
}
.palette__head-icon {
  width: 15px;
  height: 15px;
  color: var(--gray-400);
  flex: none;
}
.palette__input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
  background: transparent;
  min-width: 0;
}
.palette__esc {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  background: var(--gray-100);
  border-radius: 6px;
  padding: 3px 7px;
  flex: none;
}

.palette__results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

.palette__section-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 12px 5px;
}

.palette__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s ease;
}
.palette__item.is-active { background: var(--brand-indigo-tint-2); }
.palette__item-icon {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
}
.palette__item.is-active .palette__item-icon {
  background: var(--brand-indigo-tint);
  color: var(--accent);
}
.palette__item-icon .lucide { width: 14px; height: 14px; }
.palette__item-body { flex: 1; min-width: 0; }
.palette__item-label {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette__item-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette__item-enter {
  font-size: var(--text-xs);
  color: var(--accent);
  opacity: 0;
  flex: none;
}
.palette__item.is-active .palette__item-enter { opacity: 1; }

.palette__empty {
  padding: 26px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.palette__footer {
  display: flex;
  gap: 16px;
  padding: 11px 20px;
  border-top: 1px solid var(--gray-150);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
