/* Wikipedia-inspired theme overrides for MkDocs Material */

/* ===== COLOR SCHEME ===== */
:root {
  /* Wikipedia palette */
  --wiki-bg: #f8f9fa;
  --wiki-content-bg: #ffffff;
  --wiki-border: #a2a9b1;
  --wiki-link: #0645ad;
  --wiki-link-visited: #0b0080;
  --wiki-link-hover: #0645ad;
  --wiki-heading-border: #a2a9b1;
  --wiki-toc-bg: #f8f9fa;
  --wiki-infobox-bg: #f8f9fa;
  --wiki-table-header: #eaecf0;
  --wiki-table-border: #a2a9b1;
  --wiki-text: #202122;
  --wiki-muted: #54595d;
}

/* ===== BODY & BACKGROUND ===== */
[data-md-color-scheme="default"] {
  --md-default-bg-color: var(--wiki-bg);
  --md-primary-fg-color: #ffffff;
  --md-primary-bg-color: #1a1a2e;
  --md-accent-fg-color: var(--wiki-link);
  --md-typeset-a-color: var(--wiki-link);
}

/* Main content area - white background like Wikipedia */
.md-content {
  background: var(--wiki-content-bg);
  border: 1px solid var(--wiki-border);
  border-radius: 0;
  margin: 0;
}

.md-main__inner {
  margin-top: 0;
}

/* ===== TYPOGRAPHY ===== */
.md-typeset {
  font-family: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--wiki-text);
}

/* Headings - Wikipedia style with bottom border */
.md-typeset h1 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-weight: normal;
  font-size: 1.8em;
  border-bottom: 1px solid var(--wiki-heading-border);
  padding-bottom: 0.25em;
  margin-bottom: 0.5em;
  color: var(--wiki-text);
}

.md-typeset h2 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-weight: normal;
  font-size: 1.5em;
  border-bottom: 1px solid var(--wiki-heading-border);
  padding-bottom: 0.2em;
  margin-top: 1.5em;
  color: var(--wiki-text);
}

.md-typeset h3 {
  font-family: 'Linux Libertine', 'Georgia', 'Times', serif;
  font-weight: bold;
  font-size: 1.2em;
  border-bottom: none;
  color: var(--wiki-text);
}

/* ===== LINKS ===== */
.md-typeset a {
  color: var(--wiki-link);
  text-decoration: none;
}

.md-typeset a:hover {
  text-decoration: underline;
}

.md-typeset a:visited {
  color: var(--wiki-link-visited);
}

/* ===== TABLES - Wikipedia style ===== */
.md-typeset table:not([class]) {
  border: 1px solid var(--wiki-table-border);
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--wiki-content-bg);
}

.md-typeset table:not([class]) th {
  background: var(--wiki-table-header);
  border: 1px solid var(--wiki-table-border);
  padding: 0.4em 0.6em;
  font-weight: bold;
  text-align: left;
}

.md-typeset table:not([class]) td {
  border: 1px solid var(--wiki-table-border);
  padding: 0.4em 0.6em;
  vertical-align: top;
}

/* ===== BLOCKQUOTES as Wikipedia infobox ===== */
.md-typeset blockquote {
  background: var(--wiki-infobox-bg);
  border: 1px solid var(--wiki-table-border);
  border-left: 1px solid var(--wiki-table-border);
  padding: 0.8em 1em;
  margin: 0.5em 0 1em 0;
  font-size: 0.9em;
  color: var(--wiki-muted);
}

/* ===== NAVIGATION ===== */
/* Top header bar */
.md-header {
  background-color: #1a1a2e;
  box-shadow: none;
  border-bottom: 1px solid #333;
}

/* Left sidebar - TOC style */
.md-sidebar {
  background: var(--wiki-bg);
}

.md-nav__link {
  font-size: 0.8rem;
}

/* ===== HORIZONTAL RULES ===== */
.md-typeset hr {
  border-top: 1px solid var(--wiki-heading-border);
}

/* ===== LISTS ===== */
.md-typeset ul, .md-typeset ol {
  margin-left: 1.5em;
}

/* ===== CODE ===== */
.md-typeset code {
  background: var(--wiki-infobox-bg);
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0.1em 0.3em;
  font-size: 0.85em;
}

/* ===== TABLE OF CONTENTS (right side) ===== */
.md-sidebar--secondary .md-sidebar__scrollwrap {
  background: var(--wiki-toc-bg);
  border: 1px solid var(--wiki-border);
  padding: 0.5em;
}

/* ===== FOOTER ===== */
.md-footer {
  background: var(--wiki-bg);
  border-top: 1px solid var(--wiki-border);
  color: var(--wiki-muted);
}

/* ===== STATUS EMOJI - make them more visible ===== */

/* ===== SEARCH ===== */
.md-search__input {
  background: var(--wiki-content-bg);
  border: 1px solid var(--wiki-border);
}

/* ===== RESPONSIVE ===== */
@media screen and (min-width: 76.25em) {
  .md-content {
    margin-left: 0.5em;
    margin-right: 0.5em;
  }
}

/* Wikipedia "This article" style notices */
.md-typeset .admonition,
.md-typeset details {
  border-left: 3px solid var(--wiki-link);
  background: var(--wiki-infobox-bg);
  border-radius: 0;
  box-shadow: none;
}
