/* Bridgic Documentation Custom Styles */
/* Custom CSS styles for Bridgic documentation site */
/* Provides clean, professional styling with brand consistency */

/* ========================================== */
/* HEADER AND BRANDING STYLES */
/* ========================================== */

/* Logo styling in header */
.md-header__button.md-logo {
  margin: 0.2rem;
  /* temporarily hide the logo */
  display: none;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.8rem;
  width: auto;
}
/* Adjust the placeholder under the icon that is temporarily hidden */
.md-header__title {
  margin-left: 0.5rem !important;
}

/* ========================================== */
/* HERO SECTION STYLES */
/* ========================================== */

/* Main hero section - clean and professional styling */
.md-typeset .hero {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--md-default-bg-color);
  color: inherit;
  margin: -1rem -1rem 2rem -1rem;
  border: 1px solid var(--md-default-bg-color--lightest);
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
}

/* Add subtle texture instead of animation */
.md-typeset .hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 25%, rgba(0,0,0,0.02) 25%, rgba(0,0,0,0.02) 50%, transparent 50%, transparent 75%, rgba(0,0,0,0.02) 75%);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Hero title styling */
.md-typeset .hero h1 {
  color: inherit;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

/* Hero subtitle styling */
.md-typeset .hero p {
  color: #4d4d4d;
  font-size: 1.2rem;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* ========================================== */
/* CODE BLOCK STYLES: use Material defaults  */
/* ========================================== */

/* ========================================== */
/* ADMONITION STYLES */
/* ========================================== */

/* Custom tip admonition styling */
.md-typeset .admonition.tip {
  border-color: var(--bridgic-purple);
}

/* Tip admonition title styling */
.md-typeset .admonition.tip > .admonition-title {
  background-color: var(--bridgic-primary-light);
  border-color: var(--bridgic-purple);
}

/* Tip admonition icon styling */
.md-typeset .admonition.tip > .admonition-title::before {
  background-color: var(--bridgic-purple);
  mask-image: var(--md-admonition-icon--tip);
}

/* ========================================== */
/* NAVIGATION STYLES */
/* ========================================== */

/* Navigation title styling */
.md-nav__title {
  font-weight: 700;
}

/* Active navigation link styling */
.md-nav__item--active > .md-nav__link {
  color: inherit;
  font-weight: 600;
}

/* Enhanced focus states for navigation */
.md-nav__link:focus,
.md-nav__link:hover {
  color: var(--md-accent-fg-color);
}

/* ========================================== */
/* BUTTON STYLES */
/* ========================================== */

/* Primary button styling - clean and professional */
.md-button {
  background: transparent;
  border: 1px solid var(--md-default-bg-color--lightest);
  color: var(--md-default-fg-color);
  font-weight: 600;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
}

/* Button hover effects - subtle and clean */
.md-button:hover {
  background: var(--md-default-bg-color--lighter);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Primary button variant */
.md-button--primary {
  background: var(--md-accent-fg-color);
  color: #ffffff;
}

/* ========================================== */
/* TABLE STYLES */
/* ========================================== */

/* Enhanced table styling */
.md-typeset table:not([class]) {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Table header styling - clean and professional */
.md-typeset table:not([class]) th {
  background: var(--md-default-bg-color--light);
  color: var(--md-default-fg-color);
  font-weight: 600;
}

/* ========================================== */
/* DOCUMENTATION HEADING STYLES */
/* ========================================== */

/* Special heading styling for documentation sections */
.doc-heading {
  padding: 0;
  background: transparent;
  border-left: 0;
  border-radius: 0;
  margin: 0;
}

/* Documentation heading text styling */
.doc-heading h1,
.doc-heading h2,
.doc-heading h3 {
  margin: 0;
  color: inherit; /* keep headings consistent with theme */
}

/* ========================================== */
/* SEARCH STYLES */
/* ========================================== */

/* Enhanced search form styling */
.md-search__form {
  border-radius: 2rem;
}

/* Search input styling */
.md-search__input {
  border-radius: 2rem;
}

/* ========================================== */
/* FOOTER STYLES */
/* ========================================== */

/* Custom footer styling */
.md-footer {
  background: #F5F5F5;
  color: #666666;
}

/* Footer metadata section */
.md-footer-meta {
  background: #4d4d4d;
  color: #ffffff;
}

/* Ensure footer links are legible on light background */
.md-footer a,
.md-footer-meta a {
  color: #1E88E5;
}

.md-footer a:hover,
.md-footer-meta a:hover {
  color: #1565C0;
}


/* ========================================== */
/* MOBILE RESPONSIVE STYLES */
/* ========================================== */

/* Mobile optimizations for tablets and phones */
@media screen and (max-width: 76.1875em) {
  .md-typeset .hero {
    padding: 2rem 1rem;
    margin: -1rem -0.8rem 1.5rem -0.8rem;
  }
  
  /* Responsive hero title */
  .md-typeset .hero h1 {
    font-size: 2rem;
  }
  
  /* Responsive hero subtitle */
  .md-typeset .hero p {
    font-size: 1rem;
  }
}

/* ========================================== */
/* DARK MODE ADJUSTMENTS */
/* ========================================== */

/* Dark mode color adjustments */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #333333;
  --md-accent-fg-color: #64B5F6;
  
  --md-default-bg-color: #1E1E1E;
  --md-default-bg-color--light: #2a2a2a;
  --md-default-bg-color--lighter: #3a3a3a;
  --md-default-bg-color--lightest: #4a4a4a;
  --md-default-fg-color: #FFFFFF;
}

/* Dark mode footer colors and links */
[data-md-color-scheme="slate"] .md-footer {
  background: #1E1E1E;
  color: #BDBDBD;
}

[data-md-color-scheme="slate"] .md-footer-meta {
  background: #4d4d4d;
  color: #ffffff;
}

[data-md-color-scheme="slate"] .md-footer a,
[data-md-color-scheme="slate"] .md-footer-meta a {
  color: #64B5F6;
}

[data-md-color-scheme="slate"] .md-footer a:hover,
[data-md-color-scheme="slate"] .md-footer-meta a:hover {
  color: #90CAF9;
}

/* Soften quote borders (regular blockquote + details.quote) */
.md-typeset blockquote {
  border-left-color: var(--md-default-fg-color--lightest);
}

.md-typeset details.quote {
  border-color: var(--md-default-fg-color--lightest);
}

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

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

/* Remove drop shadows from details components (including quote/source blocks) */
.md-typeset details {
  box-shadow: none !important;
}

/* Dark mode hero section */
[data-md-color-scheme="slate"] .md-typeset .hero {
  background: var(--md-default-bg-color);
  border-color: var(--md-default-bg-color--lighter);
}

/* Improve hero subtitle contrast in dark mode */
[data-md-color-scheme="slate"] .md-typeset .hero p {
  color: #d1d5db;
}

/* Dark mode documentation headings */
[data-md-color-scheme="slate"] .doc-heading {
  background: transparent;
  border: 0;
}

/* Dark mode heading text colors */
[data-md-color-scheme="slate"] .doc-heading h1,
[data-md-color-scheme="slate"] .doc-heading h2,
[data-md-color-scheme="slate"] .doc-heading h3 {
  color: inherit;
}

/* ========================================== */
/* SCROLLBAR STYLES */
/* ========================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--md-default-bg-color--lighter);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c5cbd5;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #aeb6c2;
  opacity: 0.9;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #c5cbd5 var(--md-default-bg-color--lighter);
}

/* ========================================== */
/* ACTIVE NAVIGATION INDICATOR */
/* ========================================== */

/* Active navigation item indicator line */
/* .md-nav__item--active > .md-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--bridgic-primary);
  border-radius: 1px;
} */

/* ========================================== */
/* JUPYTER NOTEBOOK STYLES */
/* ========================================== */

/* remove Jupyter code cell's In[idx] identifier */
.jp-InputPrompt {
  display: none !important;
}

/* remove Jupyter code cell's Out[idx] identifier */
.jp-OutputPrompt {
  display: none !important;
}

/* ========================================== */
/* BADGE STYLES */
/* ========================================== */

/* Base badge styling - clean and professional */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--md-default-fg-color);
  background: var(--md-default-bg-color--light);
  border: 1px solid var(--md-default-bg-color--lightest);
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Badge variants for different statuses */
.badge--new {
  background: #10b981; /* Green for new features */
}

.badge--beta {
  background: #f59e0b; /* Orange for beta features */
}

.badge--deprecated {
  background: #ef4444; /* Red for deprecated features */
}

/* ========================================== */
/* API REFERENCE SYMBOL BADGES (func / meth)  */
/* ========================================== */

/* Base style for symbol badges injected by custom mkdocstrings template */
.doc-symbol {
  /* display: inline-block; */
  vertical-align: middle;
  border-radius: 0.375rem; /* slightly rounder, more premium */
  background: var(--bridgic-primary);
  color: #fff;
  font-weight: 700; /* a bit bolder */
  font-size: 0.75rem; /* larger for presence */
  line-height: 1.15;
  padding: 0.12rem 0.45rem; /* roomier */
  margin-right: 0.4rem;
  text-transform: lowercase;
  letter-spacing: 0.2px; /* subtle tracking for air */
  opacity: 0.98;
}

/* Size/context variants */
.doc-symbol-heading {
  font-size: 0.8rem; /* Larger in headings */
}

.doc-symbol-toc {
  font-size: 0.66rem; /* Compact in ToC but readable */
  opacity: 0.95;
}

/* Symbol type content */
.doc-symbol-function::after {
  content: "func";
}

.doc-symbol-method::after {
  content: "meth";
}

/* Improve spacing when placed before titles */
.doc .doc-heading .doc-symbol-heading + .doc-function-name,
.doc .doc-heading .doc-symbol-heading + .doc-object-name {
  margin-left: 0.125rem;
}

/* ToC alignment for symbol + text */
.md-nav__link .doc-symbol-toc {
  position: relative;
  top: -0.02rem; /* Optical alignment */
}

/* Dark mode adjustments for contrast */
[data-md-color-scheme="slate"] .doc-symbol {
  background: #374151;
  color: #fff;
}

/* ========================================== */
/* API REFERENCE TYPOGRAPHY & SPACING         */
/* ========================================== */

/* Scope tweaks to mkdocstrings objects only to avoid global overrides */
.md-typeset .doc.doc-object {
  margin: 1.1rem 0 1.25rem 0;
}

/* Heading block for functions/classes inside API reference */
.md-typeset .doc .doc-heading {
  margin: 0.4rem 0 0.6rem 0;
}

/* Level mapping in mkdocstrings pages typically starts from h2 under content */
.md-typeset .doc h2.doc-heading { /* Top-level object (e.g., class/function) */
  font-size: 1.35rem;
  font-weight: 700;
}

.md-typeset .doc h3.doc-heading { /* Members of class / nested objects */
  font-size: 1.2rem;
  font-weight: 650;
}

.md-typeset .doc h4.doc-heading { /* Subsections like Parameters/Returns */
  font-size: 1.05rem;
  font-weight: 600;
}

/* Lists inside API sections: slightly tighter for dense reference pages */
.md-typeset .doc ul,
.md-typeset .doc ol {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.md-typeset .tabbed-content {
  margin-top: 0.25rem;
}

/* Parameter/attribute tables usually inherit Material styles; add subtle spacing */
.md-typeset .doc table:not([class]) {
  margin: 0.75rem 0 1rem 0;
}

/* Docstring paragraph spacing trimmed slightly */
.md-typeset .doc p {
  margin: 0.35rem 0 0.6rem 0;
}

/* Dark mode keeps the same proportions */
[data-md-color-scheme="slate"] .md-typeset .doc h2.doc-heading { font-size: 1.35rem; }
[data-md-color-scheme="slate"] .md-typeset .doc h3.doc-heading { font-size: 1.2rem; }
[data-md-color-scheme="slate"] .md-typeset .doc h4.doc-heading { font-size: 1.05rem; }

/* ========================================== */
/* JUPYTER NOTEBOOK STYLES (mkdocs-jupyter)   */
/* Match Material UI rounding, spacing, and colors */
/* ========================================== */

/* Cell container spacing */
.jupyter-cell, .jupyter-code-cell, .jupyter-raw-cell, .jupyter-markdown-cell {
  margin: 0.5rem 0 0.5rem 0;
}

/* Code cell block */
.jupyter-code-cell .highlight pre {
  background: var(--md-code-bg-color) !important;
  color: var(--md-code-fg-color) !important;
  border-radius: 0.4rem; /* Material rounding */
  padding: 0.9em 1.1em;
  font-family: var(--md-code-font-family), Roboto Mono, ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .85em;
  line-height: 1.5;
  box-shadow: none;
  border: 1px solid var(--md-default-bg-color--lightest);
}

/* Line numbers gutter */
.jupyter-code-cell .highlight .linenos {
  background: transparent;
  color: var(--md-code-hl-number-color);
  margin-right: 1em;
  opacity: .9;
}

/* Output blocks */
.jupyter-output, .jupyter-stdout, .jupyter-stderr, .jupyter-error, .jupyter-execute-result {
  background: var(--md-default-bg-color--light);
  color: var(--md-default-fg-color);
  border: 1px solid var(--md-default-bg-color--lightest);
  border-radius: 0.4rem;
  padding: .75rem 1rem;
  margin-top: .5rem;
}

/* Error output emphasis */
.jupyter-error {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.35);
}

/* Stdout and Stderr with gentle contrast */
.jupyter-stdout {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--md-default-bg-color--lightest);
}

.jupyter-stderr {
  background: rgba(245, 158, 11, 0.08); /* amber tint */
  border-color: rgba(245, 158, 11, 0.35);
}

/* Images and tables inside outputs */
.jupyter-output img, .jupyter-execute-result img {
  border-radius: .375rem;
}
.jupyter-output table, .jupyter-execute-result table {
  border-radius: .375rem;
  overflow: hidden;
}

/* Dark mode refinements for code & outputs */
[data-md-color-scheme="slate"] .jupyter-code-cell .highlight pre {
  filter: contrast(.98);
  border-color: rgba(255,255,255,.08);
}
[data-md-color-scheme="slate"] .jupyter-output,
[data-md-color-scheme="slate"] .jupyter-stdout,
[data-md-color-scheme="slate"] .jupyter-stderr,
[data-md-color-scheme="slate"] .jupyter-error,
[data-md-color-scheme="slate"] .jupyter-execute-result {
  background: #1f1f1f;
  border-color: rgba(255,255,255,.10);
}
[data-md-color-scheme="slate"] .jupyter-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
}
[data-md-color-scheme="slate"] .jupyter-stderr {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
}

.jupyter-wrapper .jp-InputArea-editor, .jp-OutputArea-output {
  border: 1px solid var(--md-default-fg-color--lightest) !important;
  border-radius: 0.4rem !important;
  margin: 0.5rem 0 0.5rem 0;
  background: var(--jp-cell-editor-background);
  color: var(--jp-mirror-editor-variable-color);
}

[data-md-color-scheme="slate"] .jupyter-wrapper .jp-InputArea-editor,
[data-md-color-scheme="slate"] .jp-OutputArea-output {
  border: 1px solid var(--md-default-bg-color--lightest) !important;
}

.jupyter-wrapper .jp-InputPrompt, .jupyter-wrapper .jp-OutputPrompt {
  display: none !important;
}
.jupyter-code-cell  {
  padding: 0.5rem !important;
}
.jupyter-wrapper .zeroclipboard-container .clipboard-copy-icon, .notice {
  color: var(--md-grey-500) !important;
}

.md-typeset .md-code__content {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: .2rem;
}

[data-md-color-scheme="slate"] .md-typeset .md-code__content {
  border: 1px solid var(--md-default-bg-color--lightest);
  border-radius: .2rem;
}

.md-typeset .highlighttable>tbody>tr>.code>div>pre>code {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.highlighttable .linenodiv {
  box-shadow: none;
}

.js .md-typeset .tabbed-labels:before {
  border-radius: .2rem;
}

.md-typeset .tabbed-block>.highlight:first-child>.highlighttable>tbody>tr>.filename span.filename, .md-typeset .tabbed-block>.highlight:first-child>.highlighttable>tbody>tr>.linenos {
  border-top-left-radius: .2rem;
}

.highlighttable .linenos {
  border-bottom-left-radius: .2rem;
}