/* Subreddit Finder - tool-specific styles. Composes shared primitives in
 * tools.css; only this tool's layout lives here. */

:root {
    --rsf-accent: #d93a00;
    --rsf-accent-dark: #b33000;
    --rsf-accent-tint: #fff4ef;
    --rsf-border: #e6e8eb;
}

.rsf-intro { color: #475569; font-size: 0.95rem; margin: 0 0 14px; }
.rsf-mode { margin-bottom: 14px; }
/* Uniform tab widths so the shared 50% pill covers the longer second
 * label: an equal-column grid sizes BOTH tabs to the widest label (a
 * flex 1 1 0 split shrinks the long label into two lines instead), plus
 * the slide rule for this tool's second data-mode. */
.rsf-mode { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.rsf-mode .mode-btn { white-space: nowrap; }
.rsf-mode[data-mode="similar"]::before { transform: translateX(100%); }

/* The hero lead is long here; let it run the full container width
 * instead of the shared 920px cap (operator request, 2026-09-03). */
.page-hero-description { max-width: none; }
.rsf-row { margin-bottom: 12px; }
.rsf-row .text-input { width: 100%; box-sizing: border-box; flex: 0 0 auto; }
.rsf-select { max-width: 320px; }
.rsf-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.rsf-submit-row .form-hint { margin: 0; flex: 1 1 320px; }
.rsf-daily-banner[hidden] { display: none; }

.rsf-overview {
    background: #fff;
    border: 1px solid var(--rsf-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 18px 0;
}
.rsf-overview[hidden] { display: none; }
.rsf-overview-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; color: #1f2937; word-break: break-word; }
.rsf-overview-sub { margin: 0 0 12px; color: #64748b; font-size: 0.9rem; }
.rsf-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rsf-stat { background: #f8fafc; border: 1px solid var(--rsf-border); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.rsf-stat-num { display: block; font-size: 1.35rem; font-weight: 800; color: #1f2937; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rsf-stat-label { display: block; font-size: 0.78rem; color: #64748b; margin-top: 2px; }
.rsf-seed { margin-top: 12px; font-size: 0.88rem; color: #475569; }
.rsf-seed[hidden] { display: none; }
.rsf-seed-label { font-weight: 700; color: #1f2937; }
.rsf-seed-chip { display: inline-block; margin: 4px 6px 0 0; padding: 4px 10px; border-radius: 999px; background: var(--rsf-accent-tint); color: var(--rsf-accent-dark); font-size: 0.82rem; }
.rsf-all-threads { margin: 12px 0 0; font-size: 0.9rem; }
.rsf-all-threads[hidden] { display: none; }
.rsf-all-threads a { color: var(--rsf-accent); font-weight: 600; }

/* ---- Results table ---- */
.results-table th.col-sub { width: 22%; }
.results-table th.col-num { width: 110px; text-align: right; }
.results-table td.col-num { text-align: right; font-variant-numeric: tabular-nums; }
.results-table th.col-matched { width: 130px; text-align: center; }
.results-table td.col-matched { text-align: center; }
.results-table th.col-sample { width: 40%; }
.results-table th.sortable { cursor: pointer; user-select: none; }
.results-table th.sortable:hover { color: var(--rsf-accent); }
.results-table th .sort-mark { font-size: 0.7rem; margin-left: 4px; color: #94a3b8; }
.rsf-sub-link { font-weight: 700; color: #1f2937; text-decoration: none; }
.rsf-sub-link:hover { color: var(--rsf-accent); text-decoration: underline; }
.rsf-sub-actions { display: block; margin-top: 4px; font-size: 0.78rem; }
.rsf-sub-actions a, .rsf-sub-actions button { font: inherit; font-size: inherit; color: #0f766e; background: none; border: 0; padding: 0; cursor: pointer; }
.rsf-sub-actions a:hover, .rsf-sub-actions button:hover { color: var(--rsf-accent); text-decoration: underline; }
.rsf-sub-actions .sep { color: #cbd5e1; margin: 0 6px; }
.rsf-matched {
    display: inline-block;
    min-width: 36px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
}
.rsf-matched-hi { background: #ecfdf5; color: #047857; }
.rsf-matched-mid { background: var(--rsf-accent-tint); color: var(--rsf-accent-dark); }
.rsf-sample-title a { color: #1f2937; text-decoration: none; word-break: break-word; }
.rsf-sample-title a:hover { color: var(--rsf-accent); text-decoration: underline; }
.rsf-sample-meta { display: block; color: #94a3b8; font-size: 0.78rem; margin-top: 2px; }
.rsf-muted { color: #94a3b8; }

@media (max-width: 640px) {
    .rsf-overview { padding: 14px; }
    .rsf-stat-row { grid-template-columns: 1fr 1fr; }
    .results-table th.col-sample { width: auto; }
}
