/* Theme-aware filter pickers; the native selects remain the source of truth. */
body .filters select.cat-select-native { display: none !important; }
body .filters .cat-select-trigger {
  width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--mat-line); border-radius: 12px;
  background: var(--mat-field); color: var(--mat-copy); text-align: left;
  font: inherit; font-size: 13px; line-height: 1.5; cursor: pointer;
  box-shadow: inset 0 1px 0 var(--mat-shine), 0 2px 4px #00000003;
}
body .filters .cat-select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .filters .cat-select-trigger:hover:not(:disabled) { border-color: var(--mat-accent); background: var(--mat-paper); }
body .filters .cat-select-trigger:active:not(:disabled) { transform: translateY(1px) scale(.99); }
body .filters .cat-select-trigger[aria-expanded='true'] {
  border-color: var(--mat-accent); background: var(--mat-paper); box-shadow: var(--mat-focus-shadow);
}
body .filters .cat-select-trigger:disabled { opacity: .55; cursor: wait; }
.cat-select-chevron { flex: 0 0 16px; width: 16px; height: 16px; color: var(--mat-muted); transition: transform .24s ease; }
[aria-expanded='true'] > .cat-select-chevron { transform: rotate(180deg); color: var(--mat-accent); }
body .cat-select-menu {
  position: fixed; z-index: 105; display: flex; flex-direction: column; box-sizing: border-box;
  padding: 8px; border: 1px solid var(--mat-line); border-radius: 17px;
  color: var(--mat-copy); background: var(--mat-paper);
  box-shadow: 0 14px 36px #00000026, 0 3px 8px #0000000c, inset 0 1px 0 var(--mat-shine);
  opacity: 0; transform: translateY(-8px) scale(.98,.94); transform-origin: top left;
  transition: opacity .16s ease, transform .24s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
body .cat-select-menu[data-side='top'] { transform: translateY(8px) scale(.98,.94); transform-origin: bottom left; }
body .cat-select-menu.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
body .cat-select-menu.is-closing { transition-duration: .16s; }
.cat-select-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 9px 10px; font-size: 12px; }
.cat-select-heading strong { font-weight: 600; }
.cat-select-count { color: var(--mat-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
body .cat-select-menu .cat-select-search {
  flex: none; width: calc(100% - 8px); box-sizing: border-box; min-height: 38px; margin: 0 4px 8px;
  padding: 8px 11px; border: 1px solid var(--mat-line-soft); border-radius: 10px;
  background: var(--mat-field); color: var(--mat-copy); font: inherit; font-size: 12px; outline: none;
}
body .cat-select-menu .cat-select-search::placeholder { color: var(--mat-muted); }
body .cat-select-menu .cat-select-search:focus { border-color: var(--mat-accent); box-shadow: var(--mat-focus-shadow); }
.cat-select-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 3px; outline: none; scrollbar-width: thin; scrollbar-color: var(--mat-line) transparent; }
.cat-select-list::-webkit-scrollbar { width: 6px; }
.cat-select-list::-webkit-scrollbar-thumb { background: var(--mat-line); border-radius: 8px; }
.cat-select-option {
  display: flex; align-items: center; gap: 10px; min-height: 38px; box-sizing: border-box;
  padding: 9px 10px; margin: 2px 0; border: 1px solid transparent; border-radius: 9px;
  color: var(--mat-copy); font-size: 12px; line-height: 1.55; cursor: pointer;
}
.cat-select-option-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cat-select-option.is-active { background: var(--mat-accent-soft); border-color: var(--mat-line-soft); }
.cat-select-option[aria-selected='true'] { color: var(--mat-accent); background: var(--mat-accent-soft); font-weight: 600; }
.cat-select-option[aria-disabled='true'] { opacity: .45; cursor: not-allowed; }
.cat-select-check { flex: none; width: 15px; height: 15px; visibility: hidden; }
[aria-selected='true'] > .cat-select-check { visibility: visible; }
.cat-select-empty { padding: 22px 12px; text-align: center; color: var(--mat-muted); font-size: 12px; }
.cat-select-help { flex: none; margin: 7px 5px 0; padding: 8px 4px 2px; border-top: 1px solid var(--mat-line-soft); color: var(--mat-muted); font-size: 10px; }
@media (max-width:600px) { .cat-select-option { min-height: 42px; } }
