/* ===========================================================================
   signals_filter.css — chrome for the /signals overview page ONLY.
   ===========================================================================
   Loaded exclusively on /signals (via $extra_css in pages/signals.php). The
   signal CARDS are styled by the global signals.css — identical to the home
   feed — so this file deliberately contains NO .signal-card / .card-* / .mtf-*
   rules. It only styles the surrounding filter bar, buttons, pagination, page
   heading, empty state and the responsive results grid, using finscans design
   tokens (--bg-card / --border / --text / --accent / --radius …).
   =========================================================================== */

/* ── Page heading ───────────────────────────────────────────────────────── */
.page-heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.page-heading h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.signal-count { font-size: .875rem; color: var(--text-muted); font-weight: 400; }
.page-sub { color: var(--text-muted); font-size: .9375rem; margin: -12px 0 24px; }

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.filter-bar__row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }

.filter-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
.filter-field--search { flex: 2; min-width: 200px; }
.filter-field label {
  font-size: .72rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.filter-field input,
.filter-field select {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-size: .875rem;
  height: 38px;
  transition: border-color .15s ease;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.filter-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa3bd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.filter-field input:focus,
.filter-field select:focus { outline: none; border-color: var(--accent); }
.filter-field input::placeholder { color: var(--text-muted); }

.filter-actions { display: flex; gap: 8px; align-items: flex-end; }

/* ── Buttons (scoped to the filter bar to avoid any global .btn clash) ───── */
.filter-bar .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: filter .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap; height: 38px; line-height: 1; text-decoration: none;
}
.filter-bar .btn--primary { background: var(--accent); color: #fff; }
.filter-bar .btn--primary:hover { filter: brightness(1.08); }
.filter-bar .btn--ghost { background: var(--bg-subtle); color: var(--text-muted); }
.filter-bar .btn--ghost:hover { color: var(--text); background: var(--border); }

/* ── Responsive results grid (3 desktop / 2 tablet / 1 mobile) ──────────── */
#signals-results .signals-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px)  { #signals-results .signals-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { #signals-results .signals-grid { grid-template-columns: repeat(3, 1fr); } }
#signals-results.is-loading { opacity: .55; transition: opacity .15s ease; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all .15s ease;
  cursor: pointer; text-decoration: none;
}
.page-link:hover { color: var(--text); border-color: var(--text-muted); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-link.disabled { opacity: .35; pointer-events: none; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state__icon { font-size: 2.5rem; margin-bottom: 16px; }
.empty-state__title { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state__body { font-size: .875rem; }