@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,700&family=Roboto+Slab:wght@300;400;600;700&display=swap');

/* ==============================================================================
   Brand Typography (Roboto Slab & Nunito)
   ============================================================================== */
:root {
  /* Site-wide body font */
  --md-text-font: "Nunito", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif !important;
}

/* Headings, Brand Titles & Top Tabs (Roboto Slab) */
h1,
h2,
h3,
h4,
h5,
h6,
.md-header__title,
.md-nav__title,
.md-nav__link--active,
.md-footer-meta__title,
.md-banner,
.md-tabs__link {
  font-family: "Roboto Slab", Georgia, serif !important;
  font-weight: 600 !important;
}

/* Ensure Top Navigation Tabs (Home & API Reference) use one of the main fonts */
.md-tabs__link,
.md-tabs__item a {
  font-family: "Roboto Slab", Georgia, serif !important;
  font-weight: 600 !important;
}


/* Ensure strong heading highlights on hover */
h1:hover,
h2:hover,
h3:hover,
h4:hover,
h5:hover,
h6:hover {
  font-weight: 700 !important;
}

/* ==============================================================================
   Light Mode Color Palette
   ============================================================================== */
:root,
[data-md-color-scheme="default"] {
  /* Brand Plum/Burgundy tones */
  --md-primary-fg-color: #7d2a44;
  /* #7d2a44 burgundy primary */
  --md-primary-fg-color--light: #913b56;
  /* lighter burgundy for hover states */
  --md-primary-fg-color--dark: #4a2339;
  /* #4a2339 dark plum */

  /* Accent elements */
  --md-accent-fg-color: #7d2a44;
  --md-accent-fg-color--transparent: rgba(125, 42, 68, 0.1);

  /* Body Text adjustments to match primary website */
  --md-typeset-color: #3f4650;
  /* #3f4650 dark slate text */
  --md-default-fg-color: #3f4650;
  --md-default-fg-color--light: #545e6c;
  /* muted slate text */

  /* Link Color */
  --md-typeset-a-color: #7d2a44;
}

/* ==============================================================================
   Dark Mode Color Palette (Slate Theme overrides)
   ============================================================================== */
[data-md-color-scheme="slate"] {
  /* Accessible lighter Plum/Burgundy tones for dark backgrounds */
  --md-primary-fg-color: #913b56;
  --md-primary-fg-color--light: #a6536b;
  --md-primary-fg-color--dark: #7d2a44;

  /* Accent elements in dark mode */
  --md-accent-fg-color: #bc7085;
  /* rose-gold burgundy */
  --md-accent-fg-color--transparent: rgba(188, 112, 133, 0.15);

  /* Keep standard dark mode background/foreground for visibility, but accent link colors with primary colors */
  --md-typeset-a-color: #bc7085;
}

/* ==============================================================================
   Custom Design Enhancements & Micro-animations
   ============================================================================== */
/* Premium smooth transitions */
a,
button,
.md-nav__link,
.md-search-result__link {
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Styled active tabs */
.md-tabs__link--active {
  font-weight: 700 !important;
  color: #ffffff !important;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(125, 42, 68, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 42, 68, 0.6);
}

/* ==============================================================================
   Sidebar Navigation Overrides
   ============================================================================== */
/* Style Module Titles (Black in Light Mode, White in Dark Mode, Bold, with bottom line fading to transparent on the right) */
.md-nav__item--section>.md-nav__link,
.md-nav__item--nested>.md-nav__link {
  color: #000000 !important;
  font-weight: 700 !important;
  margin-top: 14px !important;
  display: flex !important;
  width: 100% !important;
  border-bottom: none !important;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.25), transparent) !important;
  background-size: 100% 1.5px !important;
  background-repeat: no-repeat !important;
  background-position: bottom left !important;
  padding-bottom: 6px !important;
  margin-bottom: 8px !important;
}

/* Dark Mode Module Titles Override (White text & white fading line in Slate Mode) */
[data-md-color-scheme="slate"] .md-nav__item--section>.md-nav__link,
[data-md-color-scheme="slate"] .md-nav__item--nested>.md-nav__link {
  color: #ffffff !important;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.25), transparent) !important;
}


/* Indent Sidebar Sub-items slightly (left-padded by 1.2rem) */
.md-nav--primary .md-nav__list {
  padding-left: 1.2rem !important;
  border-left: 2px solid transparent !important;
}

.md-nav--primary .md-nav__list:hover {
  padding-left: calc(1.2rem - 2px) !important;
}

.md-nav--primary .md-nav__list {
  /* border-left: 2px solid var(--md-primary-fg-color) !important; */
  padding-left: calc(1.2rem - 2px) !important;
  /* offset border-left width */
  font-weight: 600 !important;
}

/* ==============================================================================
   MkDocstrings Examples Section Overrides
   ============================================================================== */
/* Hide the redundant "Examples:" section header generated by mkdocstrings */
p:has(> .doc-section-title):has(+ details.example) {
  display: none;
}

/* Hide the repository statistics (stars, forks) from the top navigation header */
.md-header__source .md-source__fact,
.md-source__facts {
  display: none !important;
}

/* Custom mathbox / Mathematical Collapsible Admonitions */
.md-typeset .admonition.mathbox,
.md-typeset details.mathbox,
.md-typeset .admonition.mathematical,
.md-typeset details.mathematical {
  border-color: #e91e63 !important;
}

.md-typeset .mathbox>.admonition-title,
.md-typeset details.mathbox>summary,
.md-typeset .mathematical>.admonition-title,
.md-typeset details.mathematical>summary {
  background-color: rgba(233, 30, 99, 0.08) !important;
  border-color: #e91e63 !important;
}

.md-typeset .mathbox>.admonition-title::before,
.md-typeset details.mathbox>summary::before,
.md-typeset .mathematical>.admonition-title::before,
.md-typeset details.mathematical>summary::before {
  background-color: #e91e63 !important;
}