/*
 * Copyright 2026 AeroLog Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

:root {
  --md-primary-fg-color: #1e2638;
  --md-primary-fg-color--light: #323d57;
  --md-primary-fg-color--dark: #121824;
  --md-accent-fg-color: #38bdf8;
  --md-typeset-a-color: #0284c7;
  --md-code-font: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #161b26;
  --md-primary-fg-color--light: #232a3b;
  --md-primary-fg-color--dark: #0d1117;
  --md-accent-fg-color: #38bdf8;
  --md-typeset-a-color: #38bdf8;
}

/* Sidebar item compact styling */
.md-nav__item .md-nav__link {
  font-size: 0.82rem;
  line-height: 1.45;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  border-radius: 4px;
}

.md-nav__item--active > .md-nav__link {
  font-weight: 600;
  color: var(--md-accent-fg-color);
}

.md-nav__title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Crisp technical headings */
.md-typeset h1 {
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding-bottom: 0.5rem;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  padding-bottom: 0.3rem;
}

.md-typeset h3 {
  font-weight: 650;
  letter-spacing: -0.015em;
  margin-top: 1.6rem;
}

/* Clean technical admonitions */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 6px;
  box-shadow: none;
  border-left-width: 4px;
  font-size: 0.85rem;
}

/* Code blocks */
.md-typeset pre > code {
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Tables */
.md-typeset table:not([class]) {
  border-radius: 6px;
  font-size: 0.83rem;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) th {
  background-color: var(--md-default-bg-color--lighter);
  font-weight: 650;
}

/* Mermaid Diagram Containment & Responsive Typography */
.mermaid {
  text-align: center;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 1.5rem 0;
  max-width: 100%;
}

.mermaid svg {
  max-width: 100% !important;
  height: auto !important;
  font-family: inherit !important;
}

.mermaid .label,
.mermaid .nodeLabel,
.mermaid span.nodeLabel {
  display: inline-block;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  line-height: 1.4 !important;
}

.mermaid .noteText,
.mermaid .actor {
  font-size: 0.82rem !important;
}
