/* ==========================================================================
   Biohub Documentation Theme
   Inspired by OPS UI
   ========================================================================== */

/* ==========================================================================
   Color System
   ========================================================================== */

:root {
  --biohub-indigo: #6E4FF9;
  --biohub-indigo-light: #F1F0FF;

  --biohub-gray-600: #767676;
  --biohub-gray-200: #DFDFDF;

  --biohub-bg: #FFFFFF;
  --biohub-surface: #FFFFFF;

  --biohub-text: #111111;
  --biohub-text-secondary: #767676;

  --biohub-header: #F5F5F5;
  --biohub-footer: #000000;

  --biohub-border: #E8E8E8;
}

/* Dark mode */

[data-md-color-scheme="slate"] {
  --biohub-bg: #121212;
  --biohub-surface: #1B1B1B;

  --biohub-text: #F5F5F5;
  --biohub-text-secondary: #B0B0B0;

  --biohub-header: #1A1A1A;
  --biohub-footer: #000000;

  --biohub-border: #2B2B2B;
}

/* ==========================================================================
   Global
   ========================================================================== */

html,
body {
  --md-text-font-family: "Inter", sans-serif;
  --md-code-font-family: "Inter", sans-serif;

  background-color: var(--biohub-bg);
}

body {
  color: var(--biohub-text);
}

/* ==========================================================================
   Typography
   ========================================================================== */

.md-typeset {
  font-size: 14px;
  line-height: 24px;
  font-weight: 400;
  color: var(--biohub-text);
}

.md-typeset h1 {
  font-size: 26px;
  line-height: 34px;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.md-typeset h2 {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  margin-top: 2.5rem;
}

.md-typeset h3,
.md-typeset h4 {
  font-weight: 600;
}

.md-typeset p,
.md-typeset li {
  color: var(--biohub-text);
}

.text-secondary {
  color: var(--biohub-text-secondary);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.md-grid {
  max-width: 1440px;
}

.md-main {
  background-color: var(--biohub-bg);
}

.md-content {
  padding-bottom: 5rem;
}

/* ==========================================================================
   Tile Grid
   ========================================================================== */

.tile-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1.5rem;

  margin-top: 2rem;
  margin-bottom: 2rem;
  grid-template-columns: 1fr;

}

/* Tile card */

.tile {
  display: block;

  background-color: var(--biohub-surface);

  border: 1px solid var(--biohub-border);

  border-radius: 12px;

  padding: 0.5rem;

  text-decoration: none !important;

  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    background-color 0.15s ease;

  color: var(--biohub-text) !important;
}

/* Hover */

.tile:hover {
  border-color: var(--biohub-indigo);

  background-color: var(--biohub-indigo-light);

  transform: translateY(-1px);
}

/* Tile title */

.tile-title {
  font-size: 16px;

  font-weight: 600;

  margin-bottom: 0.5rem;

  color: var(--biohub-text);
}

/* Tile description */

.tile-tagline {
  font-size: 14px;

  line-height: 1.6;

  color: var(--biohub-text-secondary);
}

/* ==========================================================================
   Header
   ========================================================================== */

.md-header {
  background-color: var(--biohub-header);

  color: var(--biohub-text);

  border-bottom: none !important;

  box-shadow: none;

  height: 60px;

  min-height: 60px;
}

.md-header__inner {
  height: 60px;

  min-height: 60px;

  align-items: center;
}

/* Remove subtle divider lines */

.md-tabs,
.md-tabs__list,
.md-tabs__item,
.md-header,
.md-header__inner {
  border: none !important;

  box-shadow: none !important;
}

/* ==========================================================================
   Header Logo
   ========================================================================== */

.md-header__button.md-logo {
  padding: 0 !important;

  margin-right: 1rem !important;

  display: flex;

  align-items: center;

  height: 60px;
}

/* Header logo */

.md-header__button.md-logo img,
.md-header__button.md-logo svg,
.md-logo img,
.md-logo svg {
  display: block !important;

  height: 54px !important;

  width: auto !important;

  max-height: 54px !important;

  object-fit: contain;
}

/* ==========================================================================
   Header Title
   ========================================================================== */

.md-header__title {
  margin-left: 0.5rem;
}

/* Hide duplicate built-in title */

.md-header__topic:last-child {
  display: none;
}

/* ==========================================================================
   Search
   ========================================================================== */

.md-search__form {
  background-color: white;

  border: 1px solid var(--biohub-border);

  border-radius: 10px;

  box-shadow: none;
}

[data-md-color-scheme="slate"] .md-search__form {
  background-color: #242424;
}

.md-search__input {
  font-size: 14px;
}

/* Header icons */

.md-header__button {
  color: var(--biohub-text);
}

/* Optional: tighter footer alignment */

.md-footer-meta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.md-footer-meta__left {
  color: white;
  justify-content: left;
}
/* ==========================================================================
   Top Tabs
   ========================================================================== */

.md-tabs {
  background-color: var(--biohub-header);

  height: 48px;
}

.md-tabs__list {
  gap: 1.5rem;
}

.md-tabs__link {
  color: black !important;

  font-size: 15px;

  font-weight: 700;
}

/* Active tab */

.md-tabs__link--active,
.md-tabs__link:hover {
  color: var(--biohub-indigo) !important;
}

/* ==========================================================================
   Left Sidebar
   ========================================================================== */

.md-sidebar--primary {
  border-right: 1px solid var(--biohub-border);
}

.md-sidebar {
  background-color: var(--biohub-bg);
  padding-top: 1rem;
}

.md-nav__title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--biohub-text-secondary);
}

.md-nav__link {
  border-radius: 8px;

  font-size: 14px;

  margin-bottom: 0.15rem;

  transition: all 0.15s ease;
}

.md-nav__link:hover {
  background-color: var(--biohub-indigo-light);
  color: var(--biohub-indigo);
}

.md-nav__link--active {
  background-color: var(--biohub-indigo-light);
  color: var(--biohub-indigo);
  font-weight: 600;
}

/* ==========================================================================
   Right Sidebar / TOC
   ========================================================================== */

.md-sidebar--secondary {
  padding-left: 1rem;
}

.md-nav--secondary .md-nav__title {
  font-size: 13px;
}

.md-nav--secondary .md-nav__link {
  font-size: 13px;
  color: var(--biohub-text-secondary);
}

.md-nav--secondary .md-nav__link--active {
  color: var(--biohub-indigo);
}

/* ==========================================================================
   Cards / Surfaces
   ========================================================================== */

.md-typeset .admonition,
.md-typeset details,
.tile {
  background-color: var(--biohub-surface);

  border: 1px solid var(--biohub-border);

  border-radius: 12px;

  box-shadow: none;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.md-typeset table:not([class]) {
  background-color: var(--biohub-surface);

  border: 1px solid var(--biohub-border);

  border-radius: 12px;

  overflow: hidden;

  font-size: 14px;
}

.md-typeset table:not([class]) th {
  background-color: var(--biohub-indigo-light);

  color: var(--biohub-text);

  font-weight: 600;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  border-bottom: 1px solid var(--biohub-border);

  padding: 12px 16px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.md-button {
  border-radius: 10px;
  font-weight: 500;
}

.md-button--primary {
  background-color: var(--biohub-indigo);
  border-color: var(--biohub-indigo);
}

/* ==========================================================================
   Code
   ========================================================================== */

.md-typeset code {
  border-radius: 6px;
}

.md-typeset pre {
  border-radius: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.md-footer,
.md-footer-meta {
  background-color: var(--biohub-footer);
  color: rgba(255,255,255,0.7);

  border-top: none;
}

.md-footer a {
  color: white;
}

.md-footer-meta__inner {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Footer logo sizing */

.md-footer img,
.md-footer svg {
  height: 54px !important;

  width: auto !important;

  max-height: 54px !important;

  object-fit: contain;
}

/* ==========================================================================
   Tile Grid
   ========================================================================== */

.tile-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1.5rem;

  margin-top: 2rem;
  margin-bottom: 2rem;
}

.tile {
  padding: 1.5rem;

  transition: border-color 0.15s ease;
}

.tile:hover {
  border-color: var(--biohub-indigo);
}

.tile h3 {
  margin-top: 0;
}

/* ==========================================================================
   Images
   ========================================================================== */

.md-typeset img {
  border-radius: 10px;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media screen and (max-width: 768px) {

  .tile-grid {
    grid-template-columns: 1fr;
  }

  .md-sidebar--primary {
    border-right: none;
  }
}

/* Theme toggle icon */

.md-header__button[for="__palette"] {
  color: var(--biohub-text);

  opacity: 0.8;
}

.md-header__button[for="__palette"]:hover {
  color: var(--biohub-indigo);

  opacity: 1;
}

/* ==========================================================================
   Theme Toggle
   ========================================================================== */

.md-header__button[for="__palette"] {
  display: flex !important;

  align-items: center;

  color: black !important;

  opacity: 1;

  margin-left: 0.5rem;
}

.md-header__button[for="__palette"]:hover {
  color: var(--biohub-indigo) !important;
}

/* Slightly larger lightbulb icon */

.md-header__button[for="__palette"] svg {
  width: 22px;

  height: 22px;
}

/* ==========================================================================
   Hero Buttons
   ========================================================================== */

.hero-buttons {
  width: 100%;

  display: flex !important;

  justify-content: center !important;

  align-items: center;

  gap: 1rem;

  margin: 1rem auto 0.5rem auto;

  flex-wrap: wrap;
}

.md-typeset .hero-button,
.md-typeset a.hero-button {
  display: inline-flex !important;

  align-items: center;

  justify-content: center;

  background-color: var(--biohub-indigo) !important;

  color: white !important;

  border: none !important;

  border-radius: 999px !important;

  padding: 0.7rem 1.3rem !important;

  min-width: 260px;

  min-height: 52px;

  font-size: 15px !important;

  font-weight: 700;

  line-height: 1;

  text-decoration: none !important;

  box-shadow: none !important;

  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.md-typeset .hero-button:hover,
.md-typeset a.hero-button:hover {
  background-color: var(--biohub-indigo) !important;

  color: white !important;

  opacity: 0.92;

  transform: translateY(-1px);
}
