/* css/components/analytics-filter.css — Analytics sub-tab strip
 * P4.T2. Brand: Fraunces + General Sans + var(--surface-deep)
 * var(--amber) var(--green) var(--green-soft). All colours via var().
 *
 * Visual parity with regions-tabs.css / stage-filter.css / files-filter.css
 * — same chip size, focus ring, mobile scroll behaviour. Active chip
 * uses canonical amber accent (spec § 3 — action / energy = amber).
 */

.tt-an-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  margin: 0 0 1rem;
  background: var(--surface-deep, #0d0b10);
  border: 1px solid color-mix(in srgb, var(--amber, #e8a33d) 22%, transparent);
  border-radius: 14px;
  font-family: var(--f-sans, 'General Sans', system-ui, sans-serif);
}

.tt-an-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  min-height: 44px;
  background: transparent;
  color: var(--text-muted, rgba(255, 255, 255, 0.7));
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.tt-an-tab:hover {
  background: color-mix(in srgb, var(--green-soft, #4ade80) 8%, transparent);
  color: var(--text-primary, #f4f1ec);
  border-color: color-mix(in srgb, var(--green, #22c55e) 30%, transparent);
}

.tt-an-tab:focus-visible {
  outline: 2px solid var(--amber, #e8a33d);
  outline-offset: 2px;
}

.tt-an-tab.is-active {
  background: color-mix(in srgb, var(--amber, #e8a33d) 12%, transparent);
  border-color: var(--amber, #e8a33d);
  color: var(--text-primary, #f4f1ec);
  font-weight: 600;
}

.tt-an-icon  { font-size: 1rem; line-height: 1; }
.tt-an-label { white-space: nowrap; }

/* Per-sub-tab empty-state banner. Sits between the strip and the
 * existing #analytics-content chart grid; hidden by default. */
.tt-an-empty {
  padding: 1.2rem 1.4rem;
  margin: 0 0 1rem;
  background: var(--surface-card, #15131a);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  color: var(--text-muted, #8d877d);
  font-family: var(--f-sans, 'General Sans', system-ui, sans-serif);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Card-level hide toggle — keeps the grid laid out cleanly when a
 * sub-tab filters cards out. */
.an-card.tt-an-hidden { display: none !important; }

@media (max-width: 640px) {
  .tt-an-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .tt-an-tab { flex: 0 0 auto; }
}
