/* associations.css */

/* ===== FILTER PANEL ===== */
.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}
.filter-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-icon { font-size: 1rem; }

/* Population selector buttons */
.population-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.pop-btn {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.pop-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  background: rgba(99,102,241,0.08);
}
.pop-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 12px rgba(99,102,241,0.35);
}

/* Filter groups - stacked vertically */
.filter-group-main { margin-bottom: 20px; }
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.filter-group-btn { align-items: flex-start; }
.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.filter-hint { font-size: 0.68rem; color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; opacity: 0.7; }
.outcome-radios,
.exposure-checkboxes,
.sig-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* Pill-style controls (match pop-btn look) */
.filter-pill {
  display: inline-flex;
  align-items: center;
}
.filter-pill input[type="radio"],
.filter-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.filter-pill span {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.filter-pill span:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  background: rgba(99,102,241,0.08);
}
.filter-pill input[type="radio"]:checked + span,
.filter-pill input[type="checkbox"]:checked + span {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 0 12px rgba(99,102,241,0.35);
}
.filter-select {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
}
.filter-select:focus { outline: none; border-color: var(--accent-blue); }
.btn-search {
  padding: 10px 28px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(99,102,241,0.3);
}
.btn-search:hover {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(99,102,241,0.5);
}
.btn-search:active {
  transform: translateY(0);
}

/* ===== RESULTS AREA ===== */
.results-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Results header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.results-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.results-count strong { color: var(--text-primary); font-family: 'DM Mono', monospace; }
.results-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-full { background: rgba(34,211,238,0.12); color: var(--accent-cyan); border: 1px solid rgba(34,211,238,0.25); }
.badge-strat { background: rgba(167,139,250,0.12); color: var(--accent-violet); border: 1px solid rgba(167,139,250,0.25); }

/* ===== DATA TABLE ===== */
.assoc-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.assoc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 700px;
}
.assoc-table th {
  background: var(--bg-card2);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.assoc-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-secondary);
}
.assoc-table tr:last-child td { border-bottom: none; }
.assoc-table tr:hover td { background: rgba(99,102,241,0.04); }
.assoc-table .num { font-family: 'DM Mono', monospace; font-size: 0.8rem; }

/* Outcome tags */
.outcome-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
}
.tag-ALL  { background: rgba(99,102,241,0.15); color: var(--accent-blue); }
.tag-AD   { background: rgba(167,139,250,0.15); color: var(--accent-violet); }
.tag-VD   { background: rgba(34,211,238,0.15); color: var(--accent-cyan); }
.tag-OTHER{ background: rgba(52,211,153,0.15); color: var(--accent-green); }
.tag-dALL { background: rgba(99,102,241,0.15); color: var(--accent-blue); }
.tag-dAD  { background: rgba(167,139,250,0.15); color: var(--accent-violet); }
.tag-dVD  { background: rgba(34,211,238,0.15); color: var(--accent-cyan); }
.tag-dOTHER { background: rgba(52,211,153,0.15); color: var(--accent-green); }

/* HR direction colors */
.hr-protect { color: var(--accent-green); font-weight: 700; }
.hr-risk    { color: var(--accent-red); font-weight: 700; }

/* Significance stars */
.sig-3 { color: var(--accent-red); font-weight: 900; font-family: 'DM Mono', monospace; }
.sig-2 { color: var(--accent-amber); font-weight: 700; font-family: 'DM Mono', monospace; }
.sig-1 { color: #60a5fa; font-weight: 600; font-family: 'DM Mono', monospace; }
.sig-ns{ color: var(--text-muted); font-family: 'DM Mono', monospace; }

/* Interaction significance */
.int-sig { color: var(--accent-violet); font-weight: 700; }

/* Stratum badge */
.stratum-tag {
  display: inline-block;
  padding: 2px 9px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 100px;
  font-size: 0.72rem;
  color: var(--accent-blue);
  white-space: nowrap;
}

/* Model badge */
.model-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(100,116,139,0.15);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* No results */
.no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.no-results .no-results-icon { font-size: 2rem; opacity: .2; margin-bottom: 10px; }
