/* AEGIS documentation custom styles */

/* Brand color - matches the app's steel blue */
:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #5272C7;
  --md-primary-fg-color--light: #6B8AE0;
  --md-primary-fg-color--dark: #3D5AA0;
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #5272C7;
  --md-primary-fg-color--light: #6B8AE0;
  --md-primary-fg-color--dark: #3D5AA0;
}

/* Logo sizing in header */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.6rem;
  width: auto;
}

/* Equation numbering and spacing */
.MathJax {
  font-size: 1.05em;
}

/* Table improvements */
.md-typeset table:not([class]) {
  border: 1px solid var(--md-typeset-table-color);
  border-radius: 4px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color--light);
}

/* Admonition tip color override */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: #009688;
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(0, 150, 136, 0.1);
}

/* Feature grid cards */
.md-typeset .grid.cards > ul > li {
  border: 1px solid var(--md-typeset-table-color);
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.md-typeset .grid.cards > ul > li:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Code block styling */
.md-typeset code {
  border-radius: 3px;
}

/* Notebook output (if notebooks are added later) */
.output_text pre {
  max-height: 400px;
  overflow-y: auto;
}

/* Footer institutional logos */
.aegis-affiliations {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.aegis-affiliations a {
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.aegis-affiliations a:hover {
  opacity: 0.85;
}
.aegis-affiliations img {
  height: 28px;
  width: auto;
}
[data-md-color-scheme="default"] .aegis-affiliations {
  border-top-color: rgba(0, 0, 0, 0.1);
}
[data-md-color-scheme="default"] .aegis-affiliations img {
  filter: grayscale(100%);
}
[data-md-color-scheme="default"] .aegis-affiliations a:hover img {
  filter: none;
}
[data-md-color-scheme="slate"] .aegis-affiliations img {
  filter: grayscale(100%) brightness(2);
}
[data-md-color-scheme="slate"] .aegis-affiliations a:hover img {
  filter: brightness(2);
}

/* Documentation figures */
.md-typeset img[src*="diagrams/"] {
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
  max-width: 100%;
  height: auto;
}

/* Wide plots (landscape): full content width */
.md-typeset .fig-wide img {
  width: min(100%, 720px);
}

/* Medium figures: ~500px */
.md-typeset .fig-medium img {
  width: min(100%, 500px);
}

/* Portrait figures (3D renders): constrained width */
.md-typeset .fig-portrait img {
  width: min(100%, 380px);
}

/* Figure captions */
.md-typeset .fig-caption {
  display: block;
  text-align: center;
  font-size: 0.85em;
  color: var(--md-default-fg-color--light);
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

/* Level comparison table highlighting */
.md-typeset table tr:nth-child(3) {
  /* Level 2 (default) row - subtle highlight */
}
