/* Semantica Documentation - Monochrome Pro Theme */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* 
   ==========================================================================
   Color Variables - Monochrome Pro
   Primary: #212121 (Grey 900)
   Accent: #2962FF (Electric Blue)
   ========================================================================== 
*/
:root {
  /* Light Mode */
  --md-default-bg-color: #FFFFFF;
  --md-default-fg-color: #212121;
  --md-default-fg-color--light: #616161;
  --md-default-fg-color--lighter: #9E9E9E;
  --md-default-fg-color--lightest: #E0E0E0;

  --md-primary-fg-color: #212121;
  --md-primary-fg-color--light: #484848;
  --md-primary-fg-color--dark: #000000;

  --md-accent-fg-color: #2962FF;

  /* Code blocks */
  --md-code-bg-color: #F5F5F5;
  --md-code-fg-color: #212121;
}

[data-md-color-scheme="slate"] {
  /* Dark Mode */
  --md-default-bg-color: #0F1115;
  --md-default-fg-color: #E0E0E0;

  --md-primary-fg-color: #0F1115;
  --md-primary-fg-color--light: #212121;
  --md-primary-fg-color--dark: #000000;
}

/* 
   ==========================================================================
   Typography
   ========================================================================== 
*/
.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.md-typeset p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Links */
.md-typeset a {
  color: var(--md-accent-fg-color);
  text-decoration: none;
  font-weight: 500;
  background-color: #F1F8F5;
}

/* 
   ==========================================================================
   Admonitions
   ========================================================================== 
*/
/* Tip */
.md-typeset .admonition.tip .admonition-title {
  color: #00C853;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip {
  border-color: #2E303E;
  border-left-color: #69F0AE;
  background-color: #0E1B14;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip .admonition-title {
  color: #69F0AE;
}

/* Warning */
.md-typeset .admonition.warning {
  border-color: #E0E0E0;
  border-left-color: #FFAB00;
  background-color: #FFF8E1;
}

.md-typeset .admonition.warning .admonition-title {
  color: #FFAB00;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.warning {
  border-color: #2E303E;
  border-left-color: #FFD740;
  background-color: #1F1B0E;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.warning .admonition-title {
  color: #FFD740;
}

/* Danger */
.md-typeset .admonition.danger {
  border-color: #E0E0E0;
  border-left-color: #FF1744;
  background-color: #FFEBEE;
}

.md-typeset .admonition.danger .admonition-title {
  color: #FF1744;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.danger {
  border-color: #2E303E;
  border-left-color: #FF5252;
  background-color: #241214;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.danger .admonition-title {
  color: #FF5252;
}

/* 
   ==========================================================================
   Code Blocks
   ========================================================================== 
*/
.md-typeset pre {
  background-color: var(--md-code-bg-color);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

[data-md-color-scheme="slate"] .md-typeset pre {
  border-color: rgba(255, 255, 255, 0.05);
}

/* 
   ==========================================================================
   Scrollbars
   ========================================================================== 
*/
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background-color: #2962FF;
}

/* 
   ==========================================================================
   Footer Attribution - Keep MkDocs Credit Visible
   ========================================================================== 
*/
.md-footer-meta__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.md-footer-copyright {
  opacity: 1 !important;
  color: var(--md-default-fg-color--light) !important;
}

.md-footer-copyright__highlight {
  opacity: 1 !important;
  color: var(--md-default-fg-color) !important;
  font-weight: 500 !important;
}

[data-md-color-scheme="slate"] .md-footer-copyright {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-md-color-scheme="slate"] .md-footer-copyright__highlight {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* 
   ==========================================================================
   Active Link Highlighting
   ========================================================================== 
*/
/* Left Sidebar (Navigation) - Active Link */
.md-nav__link--active {
  color: var(--md-accent-fg-color) !important;
  font-weight: bold;
}

/* Right Sidebar (Table of Contents) - Active Link */
.md-nav__item--active > .md-nav__link {
  color: var(--md-accent-fg-color) !important;
  border-left: 2px solid var(--md-accent-fg-color);
  padding-left: 0.5rem;
}

/* Ensure nested items in TOC don't inherit the border unless active themselves */
.md-nav__item .md-nav__item--active > .md-nav__link {
  border-left: 2px solid var(--md-accent-fg-color);
}

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

/* Widen the overall grid */
.md-grid {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5rem;
}

/* Narrow left sidebar to give content more room */
.md-sidebar--primary {
  width: 11rem;
  padding-right: 0.25rem;
  padding-left: 0.25rem;
}

/* Right TOC sidebar */
.md-sidebar--secondary {
  width: 11rem;
  padding-left: 0.5rem;
  padding-right: 0;
  margin-left: 0;
}

.md-sidebar--secondary .md-nav {
  width: 11rem;
}

/* Tighten TOC list spacing */
.md-sidebar--secondary .md-nav__list {
  padding-bottom: 1.5rem;
  margin: 0;
}

.md-sidebar--secondary .md-nav__item {
  padding: 0;
  margin: 0;
}

.md-sidebar--secondary .md-nav__link {
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  line-height: 1.4;
  font-size: 0.7rem;
  margin: 0;
}

/* Nested TOC items (h3, h4) */
.md-sidebar--secondary .md-nav__item .md-nav__item .md-nav__link {
  padding-left: 0.6rem;
  font-size: 0.68rem;
}

/* Remove extra gap between TOC title and first item */
.md-sidebar--secondary .md-nav__title {
  margin-bottom: 0.25rem;
  padding-bottom: 0.25rem;
}

/* Give the main content area maximum available width */
.md-content {
  max-width: none;
  padding-left: 1rem;
  padding-right: 1rem;
}

.md-content__inner {
  max-width: none;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: 0;
  margin-right: 0;
}

.md-main__inner {
  margin-left: 0;
  margin-right: 0;
}

/* Ensure text content is left-aligned by default */
.md-typeset {
  text-align: left;
}

/* Keep hero section centered */
.md-typeset > div[align="center"] {
  text-align: center;
}
