/* ============================================================== FUNDING == */
/* Funding panel (task queue #58). Reuses the Outreach panel's list, row and
   detail primitives (outreach.css, loaded first); only the two-column layout,
   the org and status colours, and the deadline card live here. */

#funding-panel .counts-row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
#funding-panel .counts-row .stat { padding: 12px 16px; }
#funding-panel .counts-row .stat .n { font-size: 24px; }

.fd-last-run { margin-top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.fd-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.fd-filters .filter-row { margin: 0; }
.fd-n { margin-left: 5px; font-family: var(--mono); font-size: 10px; opacity: 0.7; }

.fd-layout {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 900px) { .fd-layout { grid-template-columns: minmax(0, 1fr); } }

.fd-org { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.fd-org-helicon { color: var(--accent-2); }
.fd-org-ngm { color: var(--teal); }
.fd-org-wellburma { color: var(--warn); }
.fd-soon { color: var(--warn); }

.fd-status-found { color: var(--warn); border-color: rgba(245, 182, 74, 0.35); background: var(--warn-soft); }
.fd-status-reviewed { color: var(--text); border-color: var(--line-3); }
.fd-status-declined, .fd-status-skipped { color: var(--text-3); }
.fd-status-approved { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-soft); }
.fd-status-submitted { color: var(--ok); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.1); }
.fd-apply { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--accent-line); background: var(--accent-soft); font-size: var(--fs-sm); }
.fd-apply .linklike { margin-left: auto; height: 22px; font-size: var(--fs-xs); }

.fd-deadline { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); }
.fd-deadline-soon { border-color: rgba(245, 182, 74, 0.35); background: var(--warn-soft); }
.fd-deadline-closed { opacity: 0.7; }
.fd-deadline-label, .fd-amount span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.fd-deadline-when { margin-top: 4px; font-size: var(--fs); font-weight: 560; color: var(--text); }
.fd-deadline-soon .fd-deadline-when { color: var(--warn); }
.fd-deadline-note { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-2); }
.fd-evidence { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--line-2); font-size: var(--fs-xs); color: var(--text-3); white-space: pre-wrap; }
.fd-amount { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; font-size: var(--fs-sm); color: var(--text); }

/* Star + Starred filter (Q, app msg 7508): outreach.css's .or-star, placed
   in a funding row, and a toggle at the start of the type row. */
.fd-row-wrap { position: relative; }
.fd-row-wrap + .fd-row-wrap { margin-top: 2px; }
.fd-row-wrap .or-row { padding-left: 38px; }
.fd-row-wrap .or-star { position: absolute; left: 7px; top: 7px; }
.fd-starred-btn { display: inline-flex; align-items: center; gap: 5px; }
.fd-starred-btn .ic { width: 13px; height: 13px; }
.fd-starred-btn.active .ic { color: #facc15; fill: currentColor; }

/* Search now: the button, and the live status line under the title. */
#funding-search-now { display: inline-flex; align-items: center; gap: 6px; }
#funding-search-now[disabled] { opacity: 0.6; cursor: default; }
.fd-search-state { margin-top: 4px; min-height: 16px; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); display: flex; align-items: center; gap: 7px; }
.fd-search-state.active { color: var(--accent-2); }
.fd-search-state.failed { color: var(--danger); }
.fd-search-state.done { color: var(--ok); }
.fd-spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: fd-spin 0.9s linear infinite; flex: none; }
@keyframes fd-spin { to { transform: rotate(360deg); } }
