/* ═══════════════════════════════════════════════════
   OmicsLab — One Health Dashboard (Prompt 56)
   ═══════════════════════════════════════════════════ */

.oh-wrap { display: flex; flex-direction: column; gap: 1.5rem; }

.oh-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(63,185,80,.07), rgba(249,115,22,.05));
  border: 1px solid var(--border, #30363d);
  border-radius: .75rem;
}
.oh-hero-icon  { color: var(--accent, #3fb950); flex-shrink: 0; }
.oh-hero-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary, #e6edf3); margin: 0 0 .3rem; }
.oh-hero-sub   { font-size: .78rem; color: var(--text-secondary, #8b949e); margin: 0; line-height: 1.55; }

.oh-panel-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary, #e6edf3);
  margin: 0 0 .75rem;
}

/* ── Main 2-column layout ── */
.oh-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: start;
}

/* ── Diagram ── */
.oh-diagram-wrap {
  background: var(--surface, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: .75rem;
  padding: 1.1rem;
}
.oh-diagram-sub { font-size: .72rem; color: var(--text-muted, #8b949e); margin-bottom: .75rem; }
.oh-svg { width: 100%; height: auto; display: block; }
.oh-node { transition: r .15s; }
.oh-node:hover { filter: brightness(1.4); }
.oh-diagram-legend {
  display: flex;
  gap: 1rem;
  margin-top: .75rem;
  flex-wrap: wrap;
  font-size: .7rem;
  color: var(--text-muted, #8b949e);
}
.oh-leg        { display: flex; align-items: center; gap: .4rem; }
.oh-leg-dot    { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Disease list ── */
.oh-list-wrap {
  background: var(--surface, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: .75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: 450px;
  overflow: hidden;
}
.oh-filters { display: flex; flex-direction: column; gap: .4rem; }
.oh-select {
  background: var(--surface-alt, #0d1117);
  border: 1px solid var(--border, #30363d);
  border-radius: .4rem;
  padding: .3rem .6rem;
  font-size: .75rem;
  color: var(--text-primary, #e6edf3);
  width: 100%;
}
.oh-disease-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  overflow-y: auto;
  flex: 1;
}
.oh-disease-list::-webkit-scrollbar { width: 4px; }
.oh-disease-list::-webkit-scrollbar-thumb { background: var(--border, #30363d); border-radius: 2px; }

.oh-disease-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  border-radius: .4rem;
  cursor: pointer;
  transition: background .1s;
  border: 1px solid transparent;
}
.oh-disease-item:hover { background: rgba(255,255,255,.04); }
.oh-disease-active { background: rgba(63,185,80,.06); border-color: rgba(63,185,80,.2); }
.oh-disease-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.oh-disease-info { flex: 1; min-width: 0; }
.oh-disease-name { font-size: .78rem; font-weight: 500; color: var(--text-primary, #e6edf3); }
.oh-disease-meta { font-size: .65rem; color: var(--text-muted, #8b949e); margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oh-risk-pill    { font-size: .68rem; font-weight: 700; padding: .1rem .35rem; border-radius: 99px; flex-shrink: 0; }
.oh-no-results   { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--text-muted, #8b949e); padding: 1rem; }

/* ── Risk Radar ── */
.oh-risk-section {
  background: var(--surface, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: .75rem;
  padding: 1.1rem;
}
.oh-risk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.oh-risk-card {
  background: var(--surface-alt, #0d1117);
  border: 1px solid var(--border, #30363d);
  border-radius: .5rem;
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.oh-risk-header { display: flex; align-items: center; justify-content: space-between; }
.oh-risk-region { font-size: .78rem; font-weight: 600; color: var(--text-primary, #e6edf3); }
.oh-risk-score  { font-size: .85rem; font-weight: 800; }
.oh-risk-bar-track { height: 5px; background: var(--border, #30363d); border-radius: 3px; overflow: hidden; }
.oh-risk-bar-fill  { height: 100%; border-radius: 3px; transition: width .5s ease; }
.oh-risk-diseases  { display: flex; flex-wrap: wrap; gap: .25rem; }
.oh-risk-tag       { font-size: .6rem; font-weight: 600; padding: .1rem .35rem; border-radius: 99px; }

/* ── Environmental Drivers ── */
.oh-env-section {
  background: var(--surface, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: .75rem;
  padding: 1.1rem;
}
.oh-env-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.oh-env-card {
  background: var(--surface-alt, #0d1117);
  border: 1px solid var(--border, #30363d);
  border-radius: .5rem;
  padding: .75rem;
  cursor: pointer;
  transition: border-color .15s;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.oh-env-card:hover { border-color: var(--accent, #3fb950); }
.oh-env-dot      { width: 14px; height: 14px; border-radius: 50%; }
.oh-env-label    { font-weight: 600; font-size: .82rem; color: var(--text-primary, #e6edf3); }
.oh-env-diseases { font-size: .68rem; color: var(--text-muted, #8b949e); line-height: 1.5; }

/* ── Detail panel ── */
.oh-detail {
  background: var(--surface, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: .75rem;
  padding: 1.25rem;
  position: relative;
  animation: oh-slide .2s ease;
}
@keyframes oh-slide { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.oh-detail-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  background: none;
  border: none;
  color: var(--text-muted, #8b949e);
  cursor: pointer;
  display: flex;
  padding: .2rem;
}
.oh-det-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
.oh-det-dot    { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; }
.oh-det-name   { font-size: 1rem; font-weight: 700; color: var(--text-primary, #e6edf3); margin: 0; }
.oh-det-meta   { font-size: .72rem; color: var(--text-muted, #8b949e); }
.oh-det-risk   { font-size: .9rem; font-weight: 800; margin-left: auto; }

.oh-det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .85rem; }
.oh-det-block { background: var(--surface-alt, #0d1117); border-radius: .4rem; padding: .65rem; }
.oh-det-block-title {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #8b949e);
  margin-bottom: .4rem;
}
.oh-det-list { margin: 0; padding-left: 1.1rem; font-size: .75rem; color: var(--text-secondary, #8b949e); line-height: 1.7; }
.oh-det-genomic { font-size: .75rem; color: var(--text-secondary, #8b949e); line-height: 1.5; font-family: 'JetBrains Mono', monospace; }

.oh-det-climate { display: flex; align-items: center; gap: .75rem; font-size: .75rem; color: var(--text-muted, #8b949e); margin-bottom: .85rem; }
.oh-climate-track { flex: 1; height: 6px; background: var(--border, #30363d); border-radius: 3px; overflow: hidden; }
.oh-climate-fill  { height: 100%; background: linear-gradient(90deg, #3fb950, #f97316); border-radius: 3px; }

.oh-det-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .oh-main { grid-template-columns: 1fr; }
  .oh-list-wrap { max-height: 300px; }
  .oh-det-grid { grid-template-columns: 1fr; }
}
