/* ==========================================================================
   ROIDGUIDE — Clean Chart & Canvas Styling
   Native Radar Charts & Space-Efficient Horizontal Steroid Family Tree
   ========================================================================== */

/* Space-Efficient Horizontal Steroid Family Tree Viewport */
.horizontal-tree-container {
  width: 100%;
  min-height: 480px;
  height: auto;
  border: 1px solid var(--wiki-border);
  background: #ffffff;
  position: relative;
  margin: 16px 0;
  border-radius: 3px;
  overflow-x: auto;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.02);
}

.tree-canvas-full {
  width: 100%;
  height: auto;
  min-width: 860px;
  outline: none;
}

/* 3-Column Horizontal Grid */
.tree-horizontal-grid {
  display: grid;
  grid-template-columns: 210px 270px 1fr;
  gap: 16px;
  padding: 16px;
  min-width: 860px;
  align-items: stretch;
}

.tree-col {
  background: #f8fafc;
  border: 1px solid var(--wiki-border-light);
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tree-col-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  padding-bottom: 6px;
  border-bottom: 2px solid #cbd5e1;
}

/* Column 1: Biosynthetic Precursors */
.node-precursor {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.node-title {
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
}

.node-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.tree-connector-arrow {
  text-align: center;
  font-size: 11px;
  color: #0284c7;
  font-weight: 600;
  padding: 2px 0;
}

/* Column 2: Mother Molecule Hub (Testosterone) */
.node-hub {
  background: #eff6ff;
  border: 2px solid #3b82f6;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.node-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.node-title-lg {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.5px;
}

.node-formula {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #475569;
  background: #e0e7ff;
  padding: 2px 6px;
  border-radius: 3px;
}

.node-ratio {
  font-size: 12px;
  color: #334155;
  margin: 4px 0;
}

.node-properties {
  text-align: left;
  font-size: 11px;
  color: #334155;
  line-height: 1.5;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 8px 10px;
  width: 100%;
}

.node-properties span {
  display: block;
}

.node-action-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid #93c5fd;
  border-radius: 4px;
  transition: all 0.2s;
}
.node-action-link:hover {
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
}

/* Column 3: The 3 Main Chemical Branches */
.branch-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.branch-section:last-child {
  margin-bottom: 0;
}

.branch-dht {
  border-left: 4px solid #d97706;
}
.branch-test {
  border-left: 4px solid #0284c7;
}
.branch-nor19 {
  border-left: 4px solid #e11d48;
}

.branch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.branch-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.branch-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}

.tag-dht {
  background: #fef3c7;
  color: #92400e;
}
.tag-test {
  background: #e0f2fe;
  color: #075985;
}
.tag-nor19 {
  background: #ffe4e6;
  color: #9f1239;
}

.branch-mechanism {
  font-size: 11px;
  color: #475569;
  margin-bottom: 10px;
  line-height: 1.45;
}

.branch-compound-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tree-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease-in-out;
}

.pill-dht {
  background: #fffbeb;
  color: #78350f;
  border-color: #fde68a;
}
.pill-dht:hover {
  background: #fef3c7;
  border-color: #d97706;
  text-decoration: none;
  transform: translateY(-1px);
}

.pill-test {
  background: #f0f9ff;
  color: #0c4a6e;
  border-color: #bae6fd;
}
.pill-test:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  text-decoration: none;
  transform: translateY(-1px);
}

.pill-nor19 {
  background: #fff1f2;
  color: #881337;
  border-color: #fecdd3;
}
.pill-nor19:hover {
  background: #ffe4e6;
  border-color: #e11d48;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Horizontal Tree Legend */
.horizontal-tree-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 14px;
  background: #f8f9fa;
  border: 1px solid var(--wiki-border-light);
  font-size: 12px;
  margin-top: 8px;
  color: #334155;
  border-radius: 2px;
}

.legend-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-pill {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Compound Comparator Panel & Canvas */
.comparator-panel {
  background: #ffffff;
  border: 1px solid var(--wiki-border);
  padding: 20px;
  margin: 16px 0;
  border-radius: 2px;
}

.comparator-selectors {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--wiki-border-light);
  border-radius: 2px;
}

.comparator-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--wiki-border);
  font-size: 13px;
  background: #ffffff;
  border-radius: 2px;
}

.comparator-chart-wrap {
  width: 100%;
  height: 360px;
  position: relative;
  margin: 20px 0;
  background: #ffffff;
}

/* Wikipedia Infobox Radar Chart Wrapper */
.infobox-radar-wrap {
  width: 100%;
  height: 220px;
  position: relative;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid var(--wiki-border-light);
  padding: 6px;
}
