/**
 * Landing #programs dashboard: toolbar (search + sort), category chips, card
 * grid shell, and empty state.
 *
 * Tier 3 product surface consuming only Tier 1/2 vars (--theme-*, --accent-*,
 * --space-*, --radius-*, --motion-*, --text-*, --weight-*, --tracking-*,
 * --font-display). The prog-cards themselves are styled by cards.css.
 */

/* — Toolbar: search row + sort control — */
.dash__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.dash__search,
.dash__sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--radius-md);
  background: var(--theme-bg-elevated);
  color: var(--theme-color-dim);
  transition:
    border-color var(--motion-hover),
    box-shadow var(--motion-hover);
}

.dash__search {
  flex: 1 1 14rem;
  min-width: 0;
}

.dash__search:focus-within,
.dash__sort:focus-within {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 3px var(--theme-focus-ring);
}

.dash__search-icon {
  width: var(--icon-size-inline);
  height: var(--icon-size-inline);
  flex-shrink: 0;
}

.dash__search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--theme-color);
  font: inherit;
}

.dash__search-input:focus,
.dash__search-input:focus-visible,
.dash__sort-select:focus,
.dash__sort-select:focus-visible {
  outline: none; /* the wrapper shows the focus ring via :focus-within */
  box-shadow: none;
}

.dash__sort-label {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-base);
  color: var(--theme-color-dim);
}

.dash__sort-label svg {
  width: 1em;
  height: 1em;
}

.dash__sort-select {
  border: 0;
  background: none;
  color: var(--theme-color);
  font: inherit;
  font-weight: var(--weight-medium);
  cursor: pointer;
}

/* — Category chips — */
.dash__chips {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  overflow-x: auto;
  scrollbar-width: none;
}

.dash__chips::-webkit-scrollbar {
  display: none;
}

.dash__chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--radius-xs);
  background: var(--theme-bg-elevated);
  color: var(--theme-color-dim);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  cursor: pointer;
  transition:
    color var(--motion-hover),
    background var(--motion-hover),
    border-color var(--motion-hover);
}

.dash__chip:hover {
  color: var(--theme-color);
  border-color: var(--accent-500);
}

.dash__chip.is-active {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: var(--theme-bg);
}

/* — Result count + grid + empty state — */
.dash__count {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-sm);
  color: var(--theme-color-dim);
}

/* .dash__grid (gap + responsive tracks) lives in /cards.css with the shared
   card grammar; the landing gutter bleed stays in landing.css. */

.dash__empty {
  margin: 0;
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
  color: var(--theme-color-dim);
}

/* — Future paid tier CTA slot (subtle, single line) — */
.dash__note {
  margin: var(--space-lg) 0 0;
  font-size: var(--text-sm);
  color: var(--theme-color-muted);
}

.dash__note a {
  color: var(--theme-color-dim);
  font-weight: var(--weight-semibold);
}
