/* AFRY Brand Identity
 * Primary:   Industrial Moss 500  #244C3B (moss green)
 * Accent:    Alloy Teal 500       #5F8E99
 * CTA:       Bright Yellow        #F3FFAF  (black text, uppercase)
 * BG:        Stone Grey 200       #F5F5F5
 * Font:      Inter (Campton Neue substitute)
 * Corners:   Sharp (border-radius: 0)
 */

/* ── ReadTheDocs Theme Customization ─────────────────────────────────── */

/* Page content background - pure white for clean reading */
body,
.wy-nav-content-wrap,
.wy-nav-content {
  background-color: #ffffff !important;
}

/* Mobile top navbar - moss green */
.wy-nav-top {
  background-color: #244c3b !important;
}

/* Sidebar background - moss green throughout */
.wy-nav-side,
.wy-side-scroll,
.wy-side-nav-search,
.wy-menu-vertical {
  background-color: #244c3b !important;
}

.wy-side-nav-search {
  border-bottom-color: #153326 !important;
}

/* Search input */
.wy-side-nav-search input {
  border-color: #3e6452 !important;
}

/* Sidebar nav links - white for readability on dark green */
.wy-menu-vertical a {
  color: rgba(255, 255, 255, 0.85) !important;
}

.wy-menu-vertical a:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Active/current page link */
.wy-menu-vertical li.current > a {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-right: 3px solid #5f8e99 !important;
}

/* Sidebar section headers (e.g. "GENERAL", "GETTING STARTED") - greener tint */
.wy-menu-vertical p.caption,
.wy-menu-vertical p.caption span,
.wy-menu-vertical p.caption .caption-text,
.wy-menu-vertical .caption-text {
  color: #9fc3b5 !important;
  background-color: transparent !important;
}

/* Remove grey background from expanded top-level nav items */
.wy-menu-vertical li.current {
  background-color: rgba(0, 0, 0, 0.15) !important;
}

.wy-menu-vertical li.toctree-l1.current > a {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Sub-items in expanded sections */
.wy-menu-vertical li.toctree-l2 a,
.wy-menu-vertical li.toctree-l3 a {
  color: rgba(255, 255, 255, 0.75) !important;
}

.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l2 a:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Version switcher at bottom */
.rst-versions {
  background-color: #153326 !important;
  border-top-color: #3e6452 !important;
}

.rst-versions .rst-current-version {
  background-color: #153326 !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Content area links - accent teal */
.wy-nav-content a {
  color: #5f8e99 !important;
}

.wy-nav-content a:visited {
  color: #3e6452 !important;
}

.wy-nav-content a:hover {
  color: #244c3b !important;
  text-decoration: underline;
}

/* Admonition styling */
.admonition,
.note,
.warning,
.caution,
.danger {
  border-left-color: #244c3b !important;
}

.admonition .admonition-title {
  background-color: #244c3b !important;
  color: #ffffff !important;
}

/* Inline code */
code {
  background-color: #f0f4f3;
  color: #244c3b !important;
}

/* ── MkDocs Material Theme Fallback ──────────────────────────────────── */
:root {
  --md-primary-fg-color: #244c3b;
  --md-primary-fg-color--light: #3e6452;
  --md-primary-fg-color--dark: #153326;
  --md-accent-fg-color: #5f8e99;
  --md-accent-fg-color--transparent: rgba(95, 142, 153, 0.1);

  /* Stone Grey 200 page background */
  --md-default-bg-color: #f5f5f5;
  --md-default-bg-color--light: #fafafa;
  --md-default-bg-color--lighter: #ffffff;
  --md-default-bg-color--lightest: #ffffff;

  /* Code block background */
  --md-code-bg-color: #eaeaea;

  /* Admonition accent */
  --md-admonition-icon--note: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 9h2V7h-2m1 13c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m-1 15h2v-6h-2v6z"/></svg>');
}

/* ── Typography ──────────────────────────────────────────────────────── */

/* MkDocs Material loads Inter because we declared font.text: Inter  */
/* Ensure consistent weight rendering */
.md-typeset {
  font-size: 0.85rem;
  line-height: 1.65;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-weight: 300; /* Campton Neue Extra Light feel */
  letter-spacing: -0.02em;
}

.md-typeset h1 {
  font-weight: 200;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.md-header {
  background-color: #244c3b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.md-header__title {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Search input in header */
.md-search__input {
  border-radius: 0 !important;
  background-color: rgba(255, 255, 255, 0.12);
}

/* ── Navigation ──────────────────────────────────────────────────────── */
.md-nav--primary .md-nav__title {
  background-color: #1d3f31;
  color: #ffffff;
}

.md-nav__item--active > .md-nav__link {
  color: #244c3b;
  font-weight: 600;
}

.md-nav__link:hover,
.md-nav__link:focus {
  color: #3e6452;
}

/* Tabs bar */
.md-tabs {
  background-color: #1d3f31;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: #f3ffaf;
  opacity: 1;
}

/* ── Sidebar & TOC ───────────────────────────────────────────────────── */
.md-sidebar--secondary .md-nav__link--active {
  color: #244c3b;
  font-weight: 600;
  border-left: 3px solid #5f8e99;
  padding-left: 0.4em;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

/* All md-button: sharp corners */
.md-button {
  border-radius: 0 !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  transition:
    background 0.15s,
    color 0.15s;
}

/* Primary button: Bright Yellow + black text */
.md-button--primary {
  background-color: #f3ffaf !important;
  color: #000000 !important;
  border-color: #f3ffaf !important;
}

.md-button--primary:hover {
  background-color: #e5f5a0 !important;
  color: #000000 !important;
  border-color: #e5f5a0 !important;
}

/* Secondary / outline button */
.md-button:not(.md-button--primary) {
  border: 2px solid #244c3b !important;
  color: #244c3b !important;
  background: transparent !important;
}

.md-button:not(.md-button--primary):hover {
  background: #244c3b !important;
  color: #ffffff !important;
}

/* ── Cards, panels, admonitions ──────────────────────────────────────── */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 0 !important;
  border-left: 4px solid #244c3b;
}

.md-typeset .admonition-title,
.md-typeset summary {
  border-radius: 0 !important;
}

/* ── Code blocks ──────────────────────────────────────────────────────── */
.md-typeset pre > code {
  border-radius: 0 !important;
}

/* ── Search results ──────────────────────────────────────────────────── */
.md-search-result__link:hover .md-search-result__article,
.md-search-result__link:focus .md-search-result__article {
  background-color: #ebf7f0;
}

/* ── Downloads page ──────────────────────────────────────────────────── */
.downloads-page {
  padding: 1em 0;
}
