/* ============================================================
 * css/components/task-filter.css — Tasks sub-tab filter bar
 *
 * Owns the sub-tab strip rendered by js/components/task-filter.js
 * (P2.T3 — Tasks drill-downs). Also styles the empty-state and
 * "new task" quick-add row owned by js/views/tasks.js so a single
 * stylesheet load covers the whole Tasks view.
 *
 * Brand tokens only — no raw hex (token fallbacks allowed for
 * the rare case tokens.css fails to load first).
 *
 * Spec: docs/specs/tinkytown-build-queue.md § P2.T3
 * Load order: AFTER /css/tokens.css.
 * P2.T3 — Tasks drill-downs (2026-05-11)
 * ============================================================ */

/* ── Sub-tab strip ── */
.tt-task-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  margin-bottom: 18px;
}
.tt-task-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary, #c8c2b8);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 999px;
  padding: 7px 14px;
  font: 500 13px/1 'General Sans', system-ui, sans-serif;
  cursor: pointer;
  min-height: 44px;
}
.tt-task-filter-tab:hover {
  border-color: var(--amber, #e8a33d);
  color: var(--amber, #e8a33d);
}
.tt-task-filter-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.35);
}
.tt-task-filter-tab[aria-pressed="true"] {
  /* Active accent is amber per spec. Subtle tint background keeps
   * the strip readable; border + text use full amber for clarity. */
  color: var(--amber, #e8a33d);
  border-color: var(--amber, #e8a33d);
  background: rgba(232, 163, 61, 0.10);
}
.tt-task-filter-icon { font-size: 14px; line-height: 1; }
.tt-task-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-overlay, #1d1a23);
  color: var(--text-muted, #8d877d);
  font: 600 11px/1 'General Sans', system-ui, sans-serif;
}
.tt-task-filter-tab[aria-pressed="true"] .tt-task-filter-count {
  background: var(--amber, #e8a33d);
  color: var(--surface-deep, #0d0b10);
}

/* ── Quick-add row (owned by views/tasks.js, styled here for parity) ── */
.tt-task-newrow {
  display: flex;
  gap: 8px;
  margin: 6px 0 18px;
}
.tt-task-newrow input {
  flex: 1;
  background: var(--surface-card, #15131a);
  color: var(--text-primary, #f4f1ec);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 10px 14px;
  font: 500 14px/1.2 'General Sans', system-ui, sans-serif;
}
.tt-task-newrow input:focus-visible {
  outline: none;
  border-color: var(--amber, #e8a33d);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.25);
}

/* ── Empty state ── */
.tt-task-empty {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 14px;
  color: var(--text-muted, #8d877d);
  font: 500 14px/1.5 'General Sans', system-ui, sans-serif;
}
.tt-task-empty-title {
  display: block;
  margin-bottom: 12px;
  color: var(--text-primary, #f4f1ec);
  font: 600 16px/1.3 'Fraunces', serif;
}

/* ── View shell (owned by js/views/tasks.js) ──
 * Replaces inline style= strings on the section / h2 / p that wrap the
 * Tasks view. Audit #3: keep markup class-only so the browser can cache
 * rule-sets across the per-filter re-render. */
.tt-task-view {
  padding: 2rem 1.5rem 3rem;
  max-width: 880px;
  margin: 0 auto;
  font-family: var(--f-sans, 'General Sans', system-ui, sans-serif);
  color: var(--text-primary, #f4f1ec);
}
.tt-task-view-title {
  font-family: var(--f-serif, 'Fraunces', serif);
  font-size: 1.9rem;
  margin: 0 0 0.25rem;
}
.tt-task-view-sub {
  color: var(--text-muted, #8d877d);
  font-size: 0.92rem;
  margin: 0 0 0.5rem;
}

/* ── Task list + rows (owned by js/views/tasks.js) ──
 * Was inline style= on every <ul>/<li> render. Tasks rerenders on every
 * filter change; class-based rules let the engine reuse the parsed
 * style-set instead of re-allocating a string per row. */
.tt-task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tt-task-row {
  background: var(--surface-card, #15131a);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-primary, #f4f1ec);
  font: 500 14px/1.4 'General Sans', system-ui, sans-serif;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.tt-task-row-title {
  font-weight: 600;
  margin-bottom: 2px;
}
.tt-task-row-meta {
  color: var(--text-muted, #8d877d);
  font-size: 12px;
}
.tt-task-row-status {
  color: var(--amber, #e8a33d);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  align-self: center;
}
