/*
 * SPDX-FileCopyrightText: 2025 Land Baden-Württemberg <InnoLab@stm.bwl.de>
 *
 * SPDX-License-Identifier: MPL-2.0
 */

/***
General
***/

:root {
  --md-primary-fg-color: rgb(32, 50, 87);
  --md-accent-fg-color: rgb(21, 68, 255);
  --md-text-font: "Open Sans";
}

html {
  overflow-y: scroll;
}

/***
Schriftarten einbetten
***/

@font-face {
  font-family: "Space Grotesk";
  color: #ffffff;
  src: local("SpaceGrotesk"),
    url("fonts/SpaceGrotesk.ttf") format("truetype");
  font-weight: normal;
}

@font-face {
  font-family: "Open Sans";
  color: #ffffff;
  src: local("OpenSans"),
    url("fonts/OpenSans.ttf") format("truetype");
  font-weight: normal;
}

/***
Navigation
***/

.md-nav {
  font-family: 'Space Grotesk';
}

/***
Überschriften
***/

.md-typeset {
  & a {
    color: rgb(21, 68, 255)
  }

  & h1 {
    color: rgb(19, 31, 48);
    font-weight: bold;
    font-size: 3em;
    font-family: 'Space Grotesk';
    margin: 0.5em 0;
  }

  & h2 {
      color: rgb(21, 68, 255);
      font-weight: bold;
      font-size: 2em;
      font-family: 'Space Grotesk';
      margin: 0.5em 0;
  }
  & h3 {
    font-weight: bold;
    font-size: 1.8em;
    font-family: 'Space Grotesk';
  }
}

/***
Inhalte
***/

.md-content {
  & p {
    color: rgb(19, 31, 48);
    font-size: 1em;
    font-family: 'Open Sans';
  }

  & img {
    max-width: 100%;   /* Image will shrink to fit its container */
    height: auto;      /* Preserve aspect ratio */
    display: block;    /* Avoid small gaps below images */
    margin: 0 auto;    /* Optional: center images if narrower than container */
  }
}

/***
Code-Blöcke
***/

.highlight {
  border: 1px solid #b6bcc8;
  border-radius: 8px;

  & pre {
    margin: 0;
    border-radius: 8px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  & span.filename {
    font-family: 'Space Grotesk';
    margin-top: 0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }

  & > pre > code {
    border-radius: 8px;
  }
}

/***
Admonition
***/

/*
Increase font size of Admonitions
For details, see: https://github.com/squidfunk/mkdocs-material/discussions/2260
*/
.md-typeset .admonition,
.md-typeset details {
  font-size: 16px
}

.md-typeset .info > summary,
.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
  font-family: "Open Sans";
  font-size: 1.2em;
  color: rgb(32, 50, 87);
  background-color: rgba(255, 255, 255, 1);
}

.md-typeset .info > p,
.md-typeset .warning > p {
  color:rgb(32, 50, 87);
  font-family: "Space Grotesk";
}

.md-typeset .info > summary::after {
  background-color: rgb(32, 50, 87);
}

/***
Footer
***/

div.md-copyright__highlight {
  display: table;
  width: 100%;
  table-layout: fixed;

  & span {
    display: table-cell;
    text-align: left;
  }
}

.hosted-by svg {
  vertical-align: middle;
  width: auto;
  height: 1em;
  margin-left: 5px;
  margin-right: 5px;
}
