/* ==========================================================================
   components/filters.css — shared filter-bar styles.
   Used by:
     - public/js/conversations.js  (LLM Conversations page)
     - public/index.html renderPromptsList  (Prompts page)
   Class names are intentionally prefixed `conv-` to keep the shared
   stylesheet small and recognisable, even though they're reused on the
   Prompts page.
   ========================================================================== */

.conv-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.conv-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.conv-filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
  /* Custom caret so the native select arrow doesn't fight the dark theme */
  appearance: none;
  background-image: linear-gradient(45deg,  transparent 50%, var(--text-m) 50%),
                    linear-gradient(135deg, var(--text-m) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

.conv-filter-select:focus { border-color: var(--accent); }

.conv-filter-select option {
  background: var(--surface);
  color: var(--text);
}

.conv-search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  width: 200px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.conv-search-input:focus { border-color: var(--accent); }

.conv-search-input::placeholder { color: var(--text-m); }

.conv-filter-reset {
  background: transparent;
  border: none;
  color: var(--text-m);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0.45rem 0.5rem;
  transition: color 0.15s;
}

.conv-filter-reset:hover { color: var(--accent); }

.conv-filter-count {
  font-size: 0.78rem;
  color: var(--text-m);
  white-space: nowrap;
}

.conv-filter-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Truncated-results hint shown when the API returned more than the
   client-side cache can hold and we want the user to narrow the set. */
.conv-filter-truncated-hint {
  font-size: 0.78rem;
  color: var(--text-m);
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .conv-search-input { width: 100%; }
  .conv-filter-right { width: 100%; }
}
