/* Command-palette style dropdown anchored to the tab strip's "+" button.
   Rendered through a portal into document.body with fixed positioning, so it
   is immune to the workspace's nested overflow clipping. */

.menu {
  position: fixed;
  z-index: 60;
  width: 340px;
  max-width: calc(100vw - 24px);
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  /* Enter animation per the workspace UI philosophy: ease-out, ~180ms. */
  animation: launcher-in 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes launcher-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.searchRow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.searchIcon {
  flex: 0 0 auto;
  color: var(--text-faint);
  display: inline-flex;
}

.searchInput {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.searchInput::placeholder {
  color: var(--text-faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms cubic-bezier(0.23, 1, 0.32, 1),
    color 120ms cubic-bezier(0.23, 1, 0.32, 1),
    border-color 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.chip:hover {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: var(--border-strong);
}

.chip.chipActive {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sectionHeader {
  padding: 8px 12px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.scrollBody {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: min(420px, calc(100vh - 190px));
  padding: 4px 0;
}

.section {
  display: block;
}

.list {
  padding: 4px;
  margin: 0;
  list-style: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.row:hover,
.row.rowSelected {
  background: var(--bg-subtle);
}

.rowIcon {
  flex: 0 0 auto;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.rowBody {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rowName {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rowMeta {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rowOpen {
  flex: 0 0 auto;
  font-size: 10.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
}

.empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
}
