/* ============================================
   Filters · N shell (#419)
   The shared quick-filter entry point — desktop mount, pinned above the
   library list (#list-view > .list-header). #308/#243/#251 add their own
   section into the panel via registerFilterGroup(); the mobile sheet-peek
   mount is #298's to add (same component, second container).
   ============================================ */

.filters-shell-mount {
  position: relative;
  margin-top: var(--spacing-8);
}

.filters-shell {
  position: relative;
}

.filters-shell-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-6);
  min-height: 44px;
  padding: var(--spacing-8) var(--spacing-12);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  cursor: pointer;
  transition: background var(--duration-base), border-color var(--duration-base);
}

.filters-shell-toggle:hover {
  background: var(--color-surface-alt);
  border-color: var(--color-border-hover);
}

.filters-shell-toggle .ui-icon {
  width: 16px;
  height: 16px;
}

.filters-shell-toggle-label {
  font-weight: var(--font-weight-medium);
}

/* The count is load-bearing, not decoration (#419) — the standing answer to
   #308's "a persisted filter left on is invisible" concern. Rendered inline
   after the label so the button reads "Filters · N"; absent entirely at
   zero via [hidden]. */
.filters-shell-badge {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--color-accent);
}

.filters-shell-panel {
  position: absolute;
  top: calc(100% + var(--spacing-8));
  left: 0;
  z-index: calc(var(--z-drawer) + 1);
  width: min(320px, 90vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-cards);
  box-shadow: var(--color-card-shadow), var(--color-fab-shadow);
  padding: var(--spacing-16);
}

.filters-shell-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-12);
  margin-bottom: var(--spacing-12);
}

.filters-shell-panel-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-heading);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading);
}

.filters-shell-clear-all {
  min-height: 44px;
  padding: 0 var(--spacing-10);
  border: none;
  background: none;
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: var(--text-caption);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}

.filters-shell-clear-all:hover {
  text-decoration: underline;
}

.filters-shell-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  max-height: 60vh;
  overflow-y: auto;
}

.filters-shell-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-body);
}

.filters-shell-group-label {
  margin: 0 0 var(--spacing-8);
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
