/* Custom CSS for RNA-Seq Analysis Course Website */

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* Code blocks */
pre {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
}

/* Inline code only — does not affect code inside pre blocks */
:not(pre) > code {
  color: #e83e8c;
  background-color: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Bash/Shell commands styling */
pre.bash,
pre.shell {
  background-color: #edf2fb;
  border-left: 3px solid #4a6fa5;
}

/* R code specific styling */
pre.r {
  background-color: #f0f7fb;
  border-left: 3px solid #276fbf;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
}

table th {
  background-color: #276fbf;
  color: white;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

table tr:hover {
  background-color: #f8f9fa;
}

/* Bioinformatics-specific table styling */
.gene-table th:nth-child(1),
.gene-table th:nth-child(2) {
  background-color: #28a745;
}

/* Callout boxes */
.callout {
  padding: 1rem;
  margin: 1.5rem 0;
  border-left: 4px solid #007bff;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.callout-note {
  border-left-color: #17a2b8;
  background-color: #e7f7fc;
}

.callout-tip {
  border-left-color: #28a745;
  background-color: #e8f5e9;
}

.callout-warning {
  border-left-color: #ffc107;
  background-color: #fff8e1;
}

.callout-important {
  border-left-color: #dc3545;
  background-color: #fdecea;
}

/* AI Prompt boxes - special styling for demo prompts */
.callout-tip.ai-prompt {
  border-left-color: #6c5ce7;
  background-color: #f3f0ff;
  border-left-width: 6px;
}

.callout-tip.ai-prompt::before {
  content: "🤖 ";
  font-size: 1.2em;
}

/* Navigation */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}

/* Footer */
.page-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #dee2e6;
  font-size: 0.9rem;
  color: #6c757d;
}

/* Details/Summary for collapsible content */
details {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: #f8f9fa;
}

summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem;
  margin: -1rem -1rem 0 -1rem;
  background-color: #e9ecef;
  border-radius: 4px 4px 0 0;
  user-select: none;
}

summary:hover {
  background-color: #dee2e6;
}

details[open] summary {
  margin-bottom: 1rem;
}

/* QC metrics badges */
.qc-pass {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #28a745;
  color: white;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
}

.qc-warn {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #ffc107;
  color: #000;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
}

.qc-fail {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #dc3545;
  color: white;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
}

/* Buttons and links */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
  text-decoration: none;
}

/* Emoji and icons */
.icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
}

/* Pipeline flowchart specific */
.pipeline-step {
  background-color: #f0f7fb;
  border: 2px solid #276fbf;
  border-radius: 8px;
  padding: 1rem;
  margin: 0.5rem 0;
}

.pipeline-step h4 {
  margin-top: 0;
  color: #276fbf;
}

/* Gene expression heatmap color legend */
.expression-high {
  color: #d32f2f;
  font-weight: 600;
}

.expression-low {
  color: #1976d2;
  font-weight: 600;
}

/* Checklist styling */
ul.task-list {
  list-style: none;
  padding-left: 0;
}

ul.task-list li {
  padding-left: 1.5rem;
  position: relative;
}

ul.task-list li::before {
  content: "☐";
  position: absolute;
  left: 0;
  font-size: 1.2em;
}

ul.task-list li.checked::before {
  content: "☑";
  color: #28a745;
}

/* Software version badges */
.version-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background-color: #6c757d;
  color: white;
  border-radius: 10px;
  font-size: 0.8em;
  font-family: monospace;
}

/* Command line examples */
.terminal {
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
  overflow-x: auto;
}

.terminal::before {
  content: "$ ";
  color: #50fa7b;
  font-weight: bold;
}

/* Statistics formulas */
.formula {
  background-color: #fff9e6;
  border-left: 3px solid #ffc107;
  padding: 1rem;
  margin: 1rem 0;
  font-family: "Times New Roman", Times, serif;
}

/* Glossary terms */
.glossary-term {
  font-weight: 600;
  color: #276fbf;
  border-bottom: 1px dotted #276fbf;
  cursor: help;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  table {
    font-size: 0.9rem;
  }
  
  .pipeline-step {
    padding: 0.75rem;
  }
}

/* Print styles */
@media print {
  .navbar,
  .page-footer {
    display: none;
  }
  
  pre {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
  
  .callout {
    page-break-inside: avoid;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .callout-note {
    background-color: #1a3a4a;
  }
  
  .callout-tip {
    background-color: #1a3a2a;
  }
  
  .callout-warning {
    background-color: #3a3a1a;
  }
  
  .callout-important {
    background-color: #3a1a1a;
  }
}
