/* ──────── Topbar search (command palette trigger) ──────── */

.brand { text-decoration: none; }
.brand:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(35, 177, 165, 0.45); border-radius: 11px; }

.topbar-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar-search:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.topbar-search:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(35, 177, 165, 0.45); }
.topbar-search svg { display: block; opacity: 0.85; }
.topbar-search-kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
}
body.booting .topbar-search { opacity: 0.55; pointer-events: none; }

/* ──────── Command palette ──────── */

.palette-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 29, 64, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 70;
}
.palette-scrim.open { opacity: 1; pointer-events: auto; }

.palette {
  position: fixed;
  top: min(14vh, 130px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.985);
  width: min(640px, calc(100vw - 32px));
  max-height: min(560px, 70vh);
  display: none;
  flex-direction: column;
  background: var(--bfc-surface);
  border: 1px solid var(--bfc-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elev);
  overflow: hidden;
  z-index: 71;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.palette.open {
  display: flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bfc-line);
  color: var(--bfc-muted);
}
.palette-input-row input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 15.5px;
  color: var(--bfc-ink);
  background: transparent;
}
.palette-input-row input::placeholder { color: var(--bfc-muted); opacity: 0.7; }
.palette-esc {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--bfc-line-strong);
  background: var(--bfc-soft);
  color: var(--bfc-muted);
}

.palette-results { overflow-y: auto; padding: 6px; }
.palette-group {
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bfc-muted);
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--bfc-ink);
  cursor: pointer;
}
.palette-item.active { background: var(--bfc-soft-2); }
.palette-item .palette-icon {
  width: 22px;
  text-align: center;
  color: var(--bfc-indigo);
  flex-shrink: 0;
}
.palette-item .palette-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.palette-item .palette-hint { color: var(--bfc-muted); font-size: 12px; flex-shrink: 0; }
.palette-none { padding: 12px; color: var(--bfc-muted); font-size: 13px; }
.palette-loading { padding: 6px 12px 12px; }
