.chat-filters-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  min-width: 0;
}

.chat-filters-toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background-color 150ms, color 150ms;
}

.chat-filters-toggle:hover,
.chat-filters-toggle[aria-expanded="true"] {
  background: #e8f2ed;
  color: #047857;
}

.chat-filters-toggle:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.chat-filters-toggle.is-active { color: #047857; }

.chat-filters-count {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  border-radius: 7px;
  background: #059669;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 13px;
  pointer-events: none;
}

.chat-filters-chevron { transition: transform 150ms ease; }
.chat-filters-chevron.is-open { transform: rotate(180deg); }
.chat-filters-panel[hidden] { display: none !important; }

.chat-filters-desktop {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  padding: 0 10px 10px;
}

.chat-filter-modes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) 30px;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: #edf1ef;
  font-size: 11px;
}

.chat-filter-modes > button.filter-label {
  min-height: 28px;
  padding: 4px 7px;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  font-size: 11px;
}

.chat-filter-modes > button[aria-pressed="true"] {
  background: #fff;
  color: #047857;
  box-shadow: 0 1px 3px #163d2812;
}

.chat-filter-modes > button.filter-label > span.rounded-full:last-child {
  min-width: 16px;
  height: 16px;
  margin-left: 0;
  font-size: 9px;
}

.chat-filter-field { min-width: 0; }
.chat-filter-field--wide { grid-column: 1 / -1; }
.chat-filter-field > select {
  display: block;
  height: 30px;
  min-width: 0;
  padding: 4px 6px;
  border-color: #e3e9e6;
  border-radius: 8px;
  color: #52635a;
  font-size: 11px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.chat-filter-field > select[data-active="true"] {
  border-color: #b5ddc9;
  background-color: #f0faf5;
  color: #047857;
}
.chat-filter-field > select:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 1px;
}

@media (min-width: 768px) {
  .chat-filters-desktop { display: grid; }
}

@media (max-width: 767px) {
  .chat-filters-toolbar { padding: 2px 10px; justify-content: flex-end; }
  .chat-filters-toggle { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-filters-toggle, .chat-filters-chevron { transition: none; }
}
